Repository navigation
docs(claude): stop coverage from vetoing a better design - #3580
Merged
Merged
Conversation
A session that found a structural improvement in the picker's removal dispatch declined to make it, because routing both call sites through a helper re-indents a closure body and pulls two pre-existing uncovered lines into the patch. The projected `codecov/patch` came to ~97.3% against an `auto` target of ~97.8%, so the improvement was shelved rather than written. Nothing in the Coverage section said the improvement was not negotiable. It read as "a red patch means your change is defective," with the only escape a false-positive appeal, so the cheapest way through was to not make the change. The section now separates the two decisions: the check gates the merge, never the design. Write the change the design calls for, close the gap where it's real, and where it isn't — misses that predate the change, or a path with no deterministic trigger — push and ask before merging with the arithmetic in hand. Two smaller corrections ride along. Deleting "unused" code to green the number now excludes a rarely-reached backstop that's load-bearing, which matters given the Data Safety rules. And the `tests/CLAUDE.md` note on rename false positives now covers the mechanism that caused this: any line the diff relocates counts as a patch line, re-indentation included, not just a `git mv`. Co-Authored-By: Claude Opus 5 <[email protected]>
max-sixty
marked this pull request as ready for review
July 24, 2026 23:10
worktrunk-bot
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The failure this fixes
A session working on the picker found a structural improvement: routing both removal dispatches through a
spawn_removalhelper, so the uninterruptible-cancellation exemption lives in one place instead of being remembered at each spawn site. It declined to make the change, because the helper re-indents the morph closure's body and pulls two pre-existing uncovered lines (a failure-path warn and arevert_morphcall) into the patch. Projectedcodecov/patch: ~97.3% against anautotarget of ~97.8%. Red. The improvement was shelved.The section it was reading said "NEVER merge a PR with failing
codecov/patchwithout explicit user approval," then "on failure, investigate and fix the gap," then "if you believe it's a false positive, ask." Every route treats a red patch as a defect in the change. The cheapest way to satisfy all three is to not make the change.What changed
The Coverage section now separates the two decisions it was conflating. The check gates the merge; it never gates the design. A predicted red patch is not a reason to shelve or water down an improvement, and neither the code nor the tests get contorted to move the number. The merge rule is unchanged: still never merge red without approval. What is new is the route through it when the gap isn't real (misses that predate the change, or a path with no deterministic trigger): push the change and ask, handing over which lines, why they can't be covered, and what the patch percentage comes to.
Two smaller corrections ride along:
tests/CLAUDE.md's note on rename false positives now covers the mechanism that caused this. Codecov counts any line the diff relocates as a patch line, re-indentation included, not just agit mv.The
spawn_removalrefactor itself is not in this PR: it touches picker code mid-flight on #3560.