Repository navigation
fix(hygiene): the unwrap ratchet pins to the MEASURED count, and its failure stops calling tree-first entries "new" - #4213
Merged
Conversation
…failure stops calling tree-first entries "new" Card ca365c81. canary 7fe1d21 went red on this guard (2268 > 2267) after a batch whose PRs were each green alone: the ratchet had three of slack under 2267, two branches spent it independently, and only the merge was over. #4212 writes the four reasons; this pins the baseline to what the tree measures with them written — 2264, read from the test's own output — so the slack that made tonight possible is gone and the next unjustified unwrap is red on ITS branch, not on the merge. Two things about the failure message, both paid for tonight: - It said "First few new ones:" and listed anthropic_adapter.rs:52 onward. The scan has no old set and cannot know what is new; it was printing the tree-first entries, which predate the guard. Finding the four real lines took a CI bisect across eleven commits. The message now says what it prints ("in tree order, NOT necessarily new"), says how to find yours (diff your branch for added unwrap shapes without a same-line comment), and names the green-alone/red-on-merge shape so the next reader does not file it as a flake. - The count now prints under --nocapture on a PASS too, so lowering the baseline after a clean-up is one build and a read, not a deliberately failing second build to make the number appear. Measured: cargo test --lib the_unjustified_unwrap_count_never_rises -- --nocapture → "unjustified production unwraps: 2264 (baseline 2264)", 1 passed, REAL_EXIT 0. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
2 tasks
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.
Card ca365c81. Follow-up to #4212 (which wrote the four reasons and re-greened canary).
What this does
BASELINE_UNJUSTIFIED2267 → 2264, the count the tree measures with fix(deploy): canary green again — #4208's five unjustified unwraps carry their reasons; the consumer enters the repo before reboot (ca365c81) #4212's reasons written. Read from the test's own output, not computed:unjustified production unwraps: 2264 (baseline 2264)— 1 passed, REAL_EXIT 0.anthropic_adapter.rs:52…), which predate the guard. Tonight that sent the reader to the wrong file and the four real lines took a CI bisect across eleven commits to find. It now says what it prints ("in tree order, NOT necessarily new"), how to find yours (diff your branch for added unwrap shapes with no same-line comment), and names the green-alone / red-on-merge shape so nobody files the next one as a flake.--nocaptureon a PASS too, so lowering the baseline after a clean-up is one build and a read, not a deliberately-failing second build.Why the baseline matters more than the comments
7fe1d21 went red with every PR in the batch green on its own head: the ratchet had three of slack under 2267, #4208 and #4209 each spent it, and only the merge was over. A baseline pinned to the measured count has no slack to share — the next unjustified unwrap is red on ITS branch, where its author is, not on canary where everyone's deploy is.
Not in this PR: any code change outside the guard's own file. One file, +15/−2.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE