You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1465145
Browse filesBrowse the repository at this point in the historyBrowse files
Cycle-1 review of PR #12 (Codex + Claude subagent). Two real findings:
1. (Codex) The rendered inspection command was plain `git -C <path> diff`, but rescue
changes are STAGED — getWorktreeDiff/applyWorktreePatch run `git add -A`, so `git diff`
(unstaged-only) can read empty even when staged tracked/binary/formerly-untracked work
exists. A user following the instructions would see "no changes", then force-remove the
worktree + branch and irreversibly lose the staged work. Fixed: render a HEAD/base-
based diff (`git diff <baseCommit> --binary --submodule=diff`) that includes staged
state, plus a `git status --porcelain --ignored -uall` step, and a warning that
ignored/submodule work is NOT in the diff. Regression test asserts the inspection command
references baseCommit (not a bare `diff`).
2. (Claude) runCommand still normalized a signal-terminated OR spawn-failed child to
status:0 (`result.status ?? 0`). A killed git apply (OOM, timeout) or missing git
binary (ENOENT) read as success → false-success reporting on worktree capture/apply. Under
leave-branch this is no longer data-loss (worktree preserved), but it's a correctness
defect with the same root cause. Fixed structurally in process.mjs runCommand:
`failed = signal != null || error; status = failed ? 1 : ...`. Regression tests:
SIGKILL self-kill and ENOENT both report non-zero status.
Codex also flagged "worktree isolation is dead code" — IRRELEVANT to this PR by design:
this is the library layer; companion (--worktree wiring) is the next PR. The leave-branch
invariant claim (Claude) is confirmed: no production Destroy path exists.
Verified: worktree 12/12, process 5/5; full npm test 155 pass / 4 pre-existing.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0189cGaohsYdpkB4otKZnpAt
lines.push("The worktree and branch are kept for inspection. Review the diff, then remove:");
481
+
lines.push("The worktree and branch are kept for inspection. Rescue changes are staged here — review with a HEAD-based diff that includes staged work:");
lines.push("_Warning: ignored files (e.g. .env, dist/) and submodule changes are NOT in the diff above and are NOT captured by the apply patch — copy them out of the worktree before removing, or they are lost._");
0 commit comments