Skip to content

ci: bump claude-code-action to fix Bun cpSync symlink ENOENT in pr-review - #12

Merged
Troublor merged 1 commit into
mainfrom
fix/bump-claude-code-action-cpsync-symlink
Aug 11, 2026
Merged

ci: bump claude-code-action to fix Bun cpSync symlink ENOENT in pr-review#12
Troublor merged 1 commit into
mainfrom
fix/bump-claude-code-action-cpsync-symlink

Conversation

@Troublor

Copy link
Copy Markdown
Collaborator

Problem

The pr-review job fails outright with:

ENOENT: no such file or directory, symlink

Root cause

The composite action .github/actions/claude-pr-review pinned anthropics/claude-code-action at c3d45e8. At that revision, restoreConfigFromBase() in 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 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.md as a regular file and the first snapshot write creates .claude-pr/, after which everything works. In stateless-validator, CLAUDE.md is a symlink (git mode 120000), 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 }) plus mkdirSync(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) to 5ef2e550a465a721f4f45e4a7d3c340c873e1dcc.

Verified:

  • dereference: true is present in restore-config.ts at 5ef2e55.
  • gh api compare/c3d45e8...5ef2e55 --jq .statusahead.
  • Upstream is still on v1.0.x, so the trailing # v1 comments 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

…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
@Troublor
Troublor merged commit bab1a46 into main Aug 11, 2026
1 check passed
@Troublor
Troublor deleted the fix/bump-claude-code-action-cpsync-symlink branch August 11, 2026 07:56
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