ci: bump claude-code-action to fix Bun cpSync symlink ENOENT in pr-review - #12
Merged
Merged
Conversation
…ymlink ENOENT)
The pr-review job failed with "ENOENT: no such file or directory, symlink"
whenever the target repo had a symlinked sensitive path.
Root cause: at the pinned c3d45e8, claude-code-action's
restoreConfigFromBase() (src/github/operations/restore-config.ts) snapshots
sensitive paths with cpSync(p, ".claude-pr/" + p, { recursive: true }) before
".claude-pr/" exists. Under Bun, cpSync does not mkdir the destination parent
when the source is a symlink, so recreating the symlink throws ENOENT and the
whole review job dies. Node does not have this bug; Bun does (reproduced on
1.3.14). This made the failure look flaky: it only triggers when the
first-existing sensitive path is a symlink, e.g. CLAUDE.md (mode 120000) in
stateless-validator.
Upstream fixed this in anthropics/claude-code-action#1596 ("Scope the config
snapshot to files inside the working tree"), which rewrote the snapshot to use
cpSync(src, dest, { recursive: true, dereference: true, filter }) plus
mkdirSync(dirname(dest), { recursive: true }) on every write path. Symlinks are
now copied as dereferenced regular files, so Bun's symlink code path is never
taken.
Bumps all five pins of the action (pr-review x2, interactive, issue-triage,
label-check) to 5ef2e550a465a721f4f45e4a7d3c340c873e1dcc, which is a descendant
of the fix and still v1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Q6FAhuNAb1z9mAXG2f7ky
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
pr-reviewjob fails outright with:Root cause
The composite action
.github/actions/claude-pr-reviewpinnedanthropics/claude-code-actionatc3d45e8. At that revision,restoreConfigFromBase()insrc/github/operations/restore-config.tssnapshots sensitive paths with:…before
.claude-pr/exists. Under Bun,cpSyncdoes notmkdirthe destination parent when the source is a symlink, so recreating the symlink throwsENOENTand the whole review job dies. Node does not have this bug; Bun does (reproduced under Bun 1.3.14).Why it looked flaky
It only triggers when the first-existing sensitive path is a symlink. Most repos keep
CLAUDE.mdas a regular file and the first snapshot write creates.claude-pr/, after which everything works. Instateless-validator,CLAUDE.mdis a symlink (git mode120000), so the very first write takes Bun's broken symlink path and the job fails every time — while other repos pass.Fix
Upstream fixed this in anthropics/claude-code-action#1596 ("Scope the config snapshot to files inside the working tree"), which rewrote the snapshot to use
cpSync(src, dest, { recursive: true, dereference: true, filter })plusmkdirSync(dirname(dest), { recursive: true })on every write path. Symlinks are copied as dereferenced regular files, so Bun's symlink code path is never taken.This PR bumps the pin from
c3d45e8(~179 commits behind) to5ef2e550a465a721f4f45e4a7d3c340c873e1dcc.Verified:
dereference: trueis present inrestore-config.tsat5ef2e55.gh api compare/c3d45e8...5ef2e55 --jq .status→ahead.v1.0.x, so the trailing# v1comments remain accurate.Scope
All five pins of the same action are bumped, since they share the bug:
.github/actions/claude-pr-review/action.yml(x2 — lines 148, 271).github/actions/claude-interactive/action.yml.github/actions/claude-issue-triage/action.yml.github/actions/claude-label-check/action.yml🤖 Generated with Claude Code
https://claude.ai/code/session_013Q6FAhuNAb1z9mAXG2f7ky