Skip to content

fix(parsers): allow asset names beginning with two dots - #3759

Draft
javierivanov wants to merge 1 commit into
heygen-com:mainfrom
javierivanov:fix/dot-prefixed-asset-paths
Draft

fix(parsers): allow asset names beginning with two dots#3759
javierivanov wants to merge 1 commit into
heygen-com:mainfrom
javierivanov:fix/dot-prefixed-asset-paths

Conversation

@javierivanov

Copy link
Copy Markdown

What

Fix local asset resolution and containment checks for valid names beginning with two dots, such as ..intro.mp4 and ..assets/clip.mp4.

Why

The checks treated every relative path starting with .. as traversal. As a result, local assets with these names were rejected even when they were inside the project. The candidate resolver returned no candidates, which can produce false missing-asset reports.

How

Check for the complete parent-directory segment (.. or .. followed by the platform separator). Apply the same distinction to the existing POSIX-normalized root-clamping fallback. Actual parent and sibling paths remain outside the containment boundary.

Test plan

  • Added 8 regression cases covering dot-prefixed files/directories, parent/sibling rejection, root equality, and root-clamping behavior. Four cases failed before the fix.
  • All 30 focused tests passed: bun run --cwd packages/parsers test --configLoader runner src/assetPaths.test.ts src/assetResolution.test.ts src/rewriteSubCompPaths.test.ts.
  • Parser typecheck passed: bun run --cwd packages/parsers typecheck.
  • oxlint, oxfmt, fallow audit, tracked-artifact, large-file, and commit-message checks passed.
  • Full monorepo build passed: bun run build.
  • The broader pre-commit typecheck commands passed after generating build artifacts: core, studio, and scripts TypeScript checks.
  • Full parser suite after building: 935 passed, 2 failed, 4 skipped, 3 todo. Both failures are existing ffBinaries.test.ts Windows failures, reproduced against the original code (Windows exe preference and PATH fallback spy count).

@javierivanov
javierivanov marked this pull request as draft September 8, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant