Skip to content

Accept the build-directory link of newer Cargo when publishing the image worker - #136

Merged
172908710 merged 1 commit into
masterfrom
claude/wizardly-cerf-jtw512
Nov 22, 2026
Merged

172908710 merged 1 commit into
masterfrom
claude/wizardly-cerf-jtw512

Conversation

@172908710

Copy link
Copy Markdown
Member

The private Windows package job (MagicPotTeam/MagicPot-Terrarium-Private#340) now fails right after cargo build succeeds:

[image-worker] ENOENT: no such file or directory, lstat '...\.cache\cargo-target\canvas-thumbnail-sidecar\release\deps'

Cause

Cargo publishes the image worker as two hard links. #125 accepts exactly the older layout, where the second link sits at release/deps/canvas_thumbnail_sidecar.exe.

The runner's Cargo has changed since the last package run on 28 October. Its log now shows the new cargo::unused_dependencies lint, and it keeps build artifacts in a build directory, so release/deps no longer exists. Nothing in this repository changed that layout.

Change

  • prepareCargoImageWorkerSource still checks release/deps first.
  • If that link is missing, it looks for the second link inside the build's own Cargo target directory, which build-image-worker.mjs now passes in as searchRoot.
  • The search follows no symbolic links, is bounded, and compares file ids as bigints (NTFS ids are 64-bit). It must find exactly one other link to the same file.
  • Anything else is still refused: a link outside the target directory, a third link, or no second link.
  • The publisher still receives a single-link snapshot, as before.

Checks

  • scripts/cargo-image-worker-source.test.js and scripts/build-image-worker.test.js: 62 passed on Windows (NTFS hard links).
  • Two new cases: the second link in a build directory inside the target directory is accepted, and a link outside it is refused.
  • The real Cargo layout is exercised only by the private Windows package job, after this merges.

Generated by Claude Code

The private Windows package job now fails after cargo build succeeds:
  ENOENT: lstat '...cargo-target/canvas-thumbnail-sidecar/release/deps'

Cargo publishes the image worker as two hard links. Older Cargo puts
the second link in release/deps. The runner's newer Cargo keeps its
build artifacts in a build directory instead, so release/deps does not
exist. The same log shows the new cargo::unused_dependencies lint.

prepareCargoImageWorkerSource still checks release/deps first. If that
link is missing, it looks for the second link inside the build's own
Cargo target directory, which build-image-worker.mjs passes in. The
search follows no symbolic links and compares file ids as bigints, and
exactly one other link to the same file must be found there. Anything
else is still refused, and the publisher still gets a single-link
snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq9PmGwv8Hc1iHFPsAUfND
@172908710
172908710 merged commit c15eb25 into master Nov 22, 2026
18 checks passed
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.

2 participants