Repository navigation
fix(ci): build check-affected's uncommitted snapshot outside .git - #8553
Conversation
In the issue lane .git/worktrees is read-only, so --uncommitted died at `git worktree add`. The snapshot now writes its objects to a temporary object directory that borrows the repository's objects as an alternate, and checks the commit out in a scratch repository under the same temp directory. The base is fetched and resolved to a commit in the outer run, and the inner run gets --no-fetch; a failed outer fetch still skips the stale-base check. A shallow clone's boundary is copied across. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #8553 (head aa6639f)No security issues found. I posted no inline comments. The PR changes
|
|
claude-review reviewed Code review: PR #8553 (head aa6639f)No findings. I reviewed all three files changed in this PR. Scope. What I read and traced:
I did not run the test suite or bwrap here. The PR's results (38/38 passing, the case failing before the fix) are author-claimed and unverified by me. Closing issue. The PR uses Edge cases I judged too minor to report:
|
Refs: #8425
Summary
Issue-lane run 39382060403 (#8530), the first admission after #8520, stopped on check-affected again:
could not create directory of .git/worktrees/tree: Read-only file system, with or without the agent sandbox.--uncommittedbuilt its snapshot withgit worktree add, which writes.git/worktrees/, read-only in the lane. Admissions are held until this lands.Fix
scripts/check-affected.sh --uncommitted(:103-148) now writes nothing under.git:$snap/objects, with the repository's object directory as an alternate; the temporary index works as before;$snap/treewhose alternates list both object directories (a shallow clone's boundary file is copied in);--baseto a commit SHA (fetching first only for aremote/branchbase without--no-fetch) and passes--base <sha> --no-fetchto the inner run; a failed fetch still skips stale-base-overlap there.scripts/lib/gate-entry.test.shgains one allowlist row for the new SHA resolution, in the same shape as check-stale-base-overlap.sh's.Verification
.gitread-only: failed before the fix (Read-only file system), passes after;scripts/check-affected.test.sh38/38, including the device-node case and "leaves HEAD, the index and the worktree list as they were".check-affected.sh --tests: 9 passed;check-script-contract.test.shfails 2 cases only because htmlhint is not installed in this fresh worktree (nonpm ci), unrelated.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT