Repository navigation
Conversation
…ntity # Conflicts: # src/git/repository/tests.rs # src/git/test.rs
…ntity # Conflicts: # src/git/repository/tests.rs
…t-registration-identity # Conflicts: # src/git/repository/tests.rs
…t-registration-identity # Conflicts: # src/git/repository/tests.rs
worktrunk-bot
left a comment
There was a problem hiding this comment.
Two cases that work with a build of the base branch (codex/git-native-paths) fail with this PR. Details and repros are inline.
- Reftable repositories can't delete any branch. This includes
wt remove,wt mergeand-D. - One unreadable sibling registration makes
wt removefail partway. For example, a.git/worktrees/<id>with nogitdirfile, which Git itself skips. The checkout directory is already gone when the error fires, so the registration is stranded and the branch is kept.
The second also contradicts the description's "Ordinary commands retain usable entries when a sibling identity is unreadable". registration_at is now as strict as the deletion scan.
…ntity # Conflicts: # src/git/repository/tests.rs # src/git/repository/worktrees.rs
…t-registration-identity # Conflicts: # src/git/repository/tests.rs # src/git/repository/worktrees.rs
…n-identity # Conflicts: # src/git/repository/tests.rs # src/git/repository/working_tree.rs # src/git/repository/worktrees.rs # src/git/test.rs
Max chose to keep trusting configured fsmonitor and add only a recheck after the daemon shuts down, with no dependency on #4454. This merge takes main's tree; the next commit adds the recheck. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…4456) Removal's dirty-worktree gate runs before wt stops the fsmonitor daemon, since the daemon answers that `git status` cheaply. A file written while the daemon shuts down therefore reached the rename unchecked. With `core.fsmonitor` configured, removal now runs the gate once more after the stop, with fsmonitor disabled, which rescans without starting a new daemon in the worktree about to go. The first gate stays, so a dirty worktree is still refused off the daemon's answer with its daemon left running. Under fsmonitor the post-stop rescan is what a clean removal passes: one full re-stat per removal there, which also makes `wt` stricter than `git worktree remove` against a stale daemon answer. Without fsmonitor nothing changes. `--force` skips both gates, as before. This narrows the earlier version of this PR, which bypassed fsmonitor for every removal and stacked on #4454; it now targets `main` on its own. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
worktrunk-bot
left a comment
There was a problem hiding this comment.
codecov/patch reports 82.22% of added lines hit against a 98.62% target. The compare report shows 23 misses in the new operation-state reader and 17 in the registration scan, mostly failure paths. The repository's Coverage rule requires explicit maintainer approval before merging with a failing patch check. This holds my approval until those paths are covered or a maintainer accepts the gap.
codecov/patch failed at the reviewed head: 82.22% diff coverage against a 98.62% target.
worktrunk-bot
left a comment
There was a problem hiding this comment.
The PR description still identifies the fish custom-SIGINT full-gate failure as a validation hold. I’m withholding approval until that hold is resolved or withdrawn.
Read detached worktree branch identity from its Git registration, including a paused rebase, rather than discovering a repository through the checkout path. Ordinary inventory resolves entries independently, so an unreadable sibling cannot hide a healthy checkout's identity or make switch try to create it again.
Before branch deletion, take a fresh, complete registration snapshot and protect branches held by HEAD, rebase, bisect, and rebase --update-refs. An unreadable surviving registration refuses deletion. Listing remains tolerant without weakening that destructive boundary.
Validation: the inventory regression failed before its repair and now passes. An instrumented 183-test probe passes, including malformed operation state and ambiguous registration cases. Local added-line coverage is 94.22%; remaining misses are syscall-error and race paths, and Codecov remains a merge gate. Independent source and test reviews found no remaining issues.
Current-commit CI tests pass on Linux, macOS, and Windows. One local full-gate run reported 5,477 passing tests and a fish custom-SIGINT wrapper failure. The exact case passes on this branch and main, clean-main full validation passes with the same concurrency, and two instrumented concurrent foreground-job batches pass 82 tests each with the expected terminal state and signal receipt. That evidence clears the branch-specific fish hold; the original cause remains unestablished. Coverage remains a merge gate.