Skip to content

fix(cli): publish leaves out outside files that came in with an imported project - #7598

Merged
jrusso1020 merged 2 commits into
mainfrom
fix/publish-refuse-received-outside-refs
Nov 13, 2026
Merged

jrusso1020 merged 2 commits into
mainfrom
fix/publish-refuse-received-outside-refs

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Publish, cloud render and feedback now leave out outside files that came in with an imported project, and warn naming each one. The person's own outside references keep copying into _ext/ as before.

Claude Opus 5.5

What

  • When the desktop app brings in someone else's project (a Cutroom link, a sync Get of a teammate's version, a reference's source), it lists the files it wrote in .hyperframes/received-files.json.
  • stagePublishFiles reads that record. For a listed HTML/CSS file, every reference that resolves outside the project (a ../ chain, an absolute path, a percent-encoded spelling, or a path through a linked folder whose real path is outside) is left out, with "<file> references <ref>, which leads outside the project and came in with an imported project; it was left out of the upload." A listed project file that is itself a link to something outside is left out the same way. file: URLs are never read by publish, received or not.
  • No record: nothing changes. A record that cannot be read counts every file as received.
  • A project inside a hidden or app-data folder now shares that folder only with what sits beside it. Before, any hidden folder or home AppData/Library the project sat in was skipped all the way up, so <home>/.tool/worktrees/x/p could pull <home>/.tool/auth.json into _ext/. Now only the project's parent folder counts as its surroundings: ../shared/logo.png from <home>/.work/p still copies, ../../../auth.json from <home>/.tool/worktrees/x/p is left out with the existing warning.

Why

A project opened from someone else can point at files outside its folder. Following outside references stays a feature for projects the person wrote; content that arrived from elsewhere should not reach outside its own folder.

Related work

A companion change in the desktop app writes the record.

How

  • privateProjectFile.ts: receivedFiles(projectDir) reads the record (NFC paths); linksOutside is the existing real-path test pulled out of linksToPrivateOutsideFile; inPrivateLocation and inHomeAppData measure against the project's parent folder instead of every ancestor.
  • publishProject.ts: the record is checked in the staging loop (linked files), in includeReferencedProjectFile (in-project paths whose real path is outside), and in archiveTargetOf (outside paths). leaveOut takes the reason.

Trade-off: a project two or more levels down inside a hidden or app-data folder can no longer pull an ordinary sibling asset from further up that same folder (it is left out with a warning). One level up still works.

Test plan

  • Unit tests added/updated: publishProject.absolutePath.test.ts (received refs in HTML, srcset, CSS; absolute, ../, percent-encoded, linked-folder and linked-file spellings; person's own file still copies; unreadable record; buildPublishFileMap and createPublishArchive, which publish and feedback --file-issue call; 12 hidden/app-data cases: 3 project locations x 4 spellings), cloud/render.test.ts (cloud render --dry-run --json through the real CLI: archive holds 1 file, stderr names the left-out reference).
  • Reverting the two source files fails 18 of the new tests; mutating each guard (outside-path check, in-project real-path check, staging-loop link check, hidden bound, app-data bound, unreadable record) fails 3, 1, 1, 4, 8 and 1 tests.
  • vitest on the publish, private-file, cloud render, feedback and publish command suites: 178 passed.
  • Manual testing performed: no live publish against the API.
  • Comments follow CONTRIBUTING.md "Comments"

Not covered: check-then-read still opens the path a second time (same as the existing private-file check), and HTML/CSS are the only files whose references publish follows.

— Rames Jusso

🤖 Generated with Claude Code

…ted project

When the desktop app brings in someone else's project (a Cutroom link, a
sync of a teammate's version, a reference's source), it lists those files
in .hyperframes/received-files.json. Publish, cloud render and feedback
now leave out every file outside the project that a listed file
references or links to, and warn naming the file and the reference. Files
the person wrote keep copying their outside references into _ext/ as
before. A record that cannot be read counts every file as received.

A project inside a hidden or app-data folder now only shares that folder
with assets in the folder it sits in: an outside file further up, in a
hidden or app-data location, is left out with the existing warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 86 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head fe6c9891

publish still uploads a received file's linked-folder video once the proxy bake transcodes it. Details inline. CI is green; the PR is blocked only on review.

Scope

Read publishProject.ts and privateProjectFile.ts end to end, checked the hidden/app-data parent-folder bound against ../, absolute and Windows-drive spellings, and checked the record path format against hyperframes-internal#10482 (posix, NFC, project-relative on both sides). Probed the bake leak with a real ProRes file, buildPublishFileMap and then bakeMediaProxies, no mocks.

— Claude (Genesis)

A video that staging left out of the upload could still reach the
archive as a transcoded proxy. Skip any hostile source whose archive
key staging did not keep.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE — 1 resolved, 0 open, 0 new · fe6c989 → 0ba87a2 · CI green

— Claude (Genesis)

@jrusso1020
jrusso1020 added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit a810a8b Nov 13, 2026
84 checks passed
@jrusso1020
jrusso1020 deleted the fix/publish-refuse-received-outside-refs branch November 13, 2026 00:46
@miguel-heygen miguel-heygen mentioned this pull request Nov 13, 2026
3 of 5 tasks
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