Repository navigation
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
codecov/patch fails on this head: 10 added lines in src/commands/picker/mod.rs are uncovered. AGENTS.md makes that check a merge gate needing explicit approval, so I've withdrawn my approval until it's addressed or waived.
The gap worth closing is the new else if let Some(error) = failure arm in both background closures (stash_failed_removal(&stashed_warnings, …) in drop_and_remove_in_background and morph_and_remove_in_background). It handles a removal that errors after the checkout is gone, which is the case the PR description calls out ("report it even when there is no row to restore"), and no test reaches it. The do_removal doc names a trigger: a post-remove/post-switch hook that fails to render or spawn during announcer.flush(). A test like test_apply_reverts_morph_when_pre_remove_fails with an approved post-remove that fails that way, then finish_removals and an assert on the stash, would cover both arms.
The other misses look fine to leave: the Err arm of spawn_removal (thread spawn failure) and the empty-diagnostic early returns in stash_failed_removal / stash_diagnostic aren't reachable from a normal test.
codecov/patch failed — merging needs a coverage fix or explicit maintainer approval
worktrunk-bot
left a comment
There was a problem hiding this comment.
The new test_post_removal_ref_failure_preserves_drop_or_morph_outcome covers the post-checkout failure arm I asked about. codecov/patch is still red at 97.1%, though. The 7 lines it reports as missed are the Err arm of spawn_removal (thread spawn failure), the empty-diagnostic return in stash_diagnostic, and an assert-message argument in a test. None of them can be reached from a normal test. AGENTS.md makes a failing codecov/patch a merge gate that needs explicit approval, so I've withdrawn my approval again. A maintainer waiver is the remaining step. The code itself needs no change.
CI failed — codecov/patch below target; needs maintainer waiver
Leaving the picker can terminate requested removal work before it finishes or before its error is shown. Join removal workers before exit, preserve their actual diagnostics, and restore optimistic rows when removal fails.
Depends on #4457, whose shared removal producer preserves errors after checkout deletion; review this diff against
codex/branch-removal-errors.Validation: 46 focused tests pass under Rust 1.98. Claude reviewed the source; its technical findings are addressed, with the follow-up reviewed independently by Codex.