Repository navigation
fix: keep dirty changed checks scoped to local edits - #124685
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 16, 2026, 12:20 PM ET / 16:20 UTC. ClawSweeper reviewWhat this changesThis PR snapshots dirty POSIX worktree content through a private Git index and sends that exact tree to the remote changed-check checkout. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the private-index transport fixes dirty POSIX Testbox syncs, but the changed guard still excludes WSL2 even though that path executes a POSIX script; dirty WSL2 changed checks retain the stale-metadata behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Crabbox wrapper delegates changed-file validation to a remote machine. It prepares an isolated checkout and Git metadata so the remote classifier and checks operate on the developer’s intended local tree. flowchart LR
A[Developer worktree] --> B[Changed check request]
B --> C[Remote sync selection]
C --> D[Private Git index]
D --> E[Remote checkout]
E --> F[Changed-file classifier]
F --> G[Scoped checks]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +36, Other +12. Total +48 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the same final-worktree Git tree for WSL2’s generated POSIX script, while retaining the existing native-Windows path, and prove dirty staged, unstaged, deleted, and eligible untracked edits stay scoped remotely. Do we have a high-confidence way to reproduce the issue? Yes, from source: run a dirty delegated changed check with --target windows --windows-mode wsl2; the condition skips the isolated transport, while the WSL2 path runs a POSIX script without the Git bootstrap. Is this the best way to solve the issue? No: the private-index design is the right repair for POSIX transports, but the implementation excludes WSL2 instead of carrying the same bootstrap into its generated script. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2b8e94ea4dba. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* fix(crabbox): preserve dirty changed-gate state Amp-Thread-ID: https://ampcode.com/threads/T-01a00a6a-b64e-74a5-8b15-2d3b966a468d * fix(ci): cover WSL2 dirty changed gates Amp-Thread-ID: https://ampcode.com/threads/T-01a00a6a-b64e-74a5-8b15-2d3b966a468d --------- Co-authored-by: Amp <[email protected]>
What Problem This Solves
Fixes an issue where developers running delegated changed checks from a dirty worktree could test dozens of unrelated recent-main files because the remote box retained stale Git metadata.
Why This Change Was Made
Dirty POSIX changed gates now use the existing isolated-checkout transport. A private Git index snapshots the exact final worktree tree without mutating the user's index, while the existing bundle bootstrap reconstructs the exact merge base and final tree remotely. WSL2 uses that same transport and includes the bootstrap in its generated POSIX script; native Windows keeps its existing PowerShell path.
User Impact
Delegated
check:changedruns from staged, unstaged, deleted, or eligible untracked edits stay scoped to the user's actual changes. This makes remote validation faster and prevents unrelated baseline failures.Evidence
node scripts/run-vitest.mjs test/scripts/crabbox-wrapper.test.ts— 239 passed.tbx_01m05newzp26dy8yzsj462w9ba(completed). Sync reported exactly 3 targeted transport/changed files; remote classification was onlyscripts, testRoot, tooling; all changed checks passed in 2m56s.tbx_01m05pnda8z13v18p9csd62t9v(completed). Remote classification remainedscripts, testRoot, tooling; all changed checks passed in 2m55s..agents/skills/autoreview/scripts/autoreview --mode local— clean, no accepted/actionable findings; overall correctness 0.98.