tools: late-push — #224's instrument, detection by CONTENT not SHA - #596
Merged
Conversation
… SHA #224 specified this and it did not exist. A squash merge captures every commit IN THE PR AT MERGE TIME and cannot capture one the author has not pushed yet, so an author who keeps pushing loses everything after the merge — and the PR shows MERGED with no indication anything is missing. Measured there: 37 of 100 merged inside 120s of creation, 25 inside 60s, one at 42 seconds. ⛔ DETECTION IS BY CONTENT, AND #224 IS EXPLICIT. A squash does not preserve shas, so `git merge-base --is-ancestor` answers a different question: whether THIS COMMIT is on main, never whether ITS CONTENT is. Every squashed commit is a non-ancestor, so ancestry alone reports the whole board lost. This compares `git patch-id --stable`. KNOWN-POSITIVE — #224's own, re-verified live before building: PR #339 merged 2026-08-20T19:56:18Z commit 7447b1d authored 19:57:18Z — 60s later docs/DEFECT-CLASSES.md +10, not an ancestor, patch-id absent from 400 commits of main ⇒ `--pr 339` reports exactly that, exit 1. Ten lines genuinely lost. ⚠ #224 says 61s; that is author-vs-commit time. ⛔ TWO DEVIATIONS FROM #224's STATED COMMANDS, and both are honest: 1. `--since 24h` no longer reaches #339, which is 16 days and ~250 merges down. The command was written when the specimen was fresh. `--pr N` is added so the known-positive stays runnable without a git-log per PR over the whole board — and `--limit` is documented as a RECENCY WINDOW, not a filter, on every run. 2. `--since 1s` returns exit 2 VOID, not the exit 0 #224 expected. With no commits on main in the window the patch-id comparison set is EMPTY, so every candidate would read as LOST. Refusing is the correct answer; a clean 0 there would be a lie. ⇒ The condition asked for a detector that "cannot return both is not one" — it returns three, and the third is the one that matters. ⚠ A FINDING IS A CANDIDATE, NOT A PROVEN LOSS. Content that reached main via a conflict resolution or an altered rebase has a different patch-id and reads as lost here. #445 holds: ORPHANED ≠ CONTENT-LOST, and only the first is mechanically decidable. An unreadable head ref is counted and named UNCHECKED, never folded into clean. 7 suite tests including the empty-patch-id VOID and test_control_can_fail; 5 self-test legs, both directions, driven with synthetic state (#402). ⚠ One test failure was MY STUB, not the tool: patch_id() calls `git show` with allow_fail=True, so keying the stub on that returned a stat block where a diff was expected and the finding silently vanished. Keyed on --stat instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTMf4EvaTEnDKXY47efRZZ
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
#224 specified
tools/late-push.pyand it did not exist.⛔ Detection by CONTENT, not SHA — #224 is explicit
A squash does not preserve shas, so
git merge-base --is-ancestoranswers a different question: whether this commit is on main, never whether its content is. Every squashed commit is a non-ancestor, so ancestry alone reports the whole board lost. This comparesgit patch-id --stable.The known-positive — #224's own, re-verified before building
--pr 339reports exactly that, exit 1. Ten lines genuinely lost. (⚠ #224 says 61s — author-vs-commit time.)⛔ Two deviations from #224's stated commands, both honest
1.
--since 24hno longer reaches its own specimen. #339 is 16 days and ~250 merges down; the command was written when it was fresh.--pr Nkeeps the known-positive runnable without a git-log per PR across the board — and--limitis documented as a recency window, not a filter, on every run.2.
--since 1sreturns exit 2 VOID, not the 0 #224 expected. With no commits on main in the window the patch-id comparison set is empty, so every candidate would read as LOST. ⇒ Refusing is correct; a clean 0 there would be a lie. The condition asked for a detector that "cannot return both is not one" — it returns three, and the third is the one that matters.⚠ A finding is a CANDIDATE, not a proven loss
Content that reached main via a conflict resolution or an altered rebase has a different patch-id and reads as lost here. #445 holds: ORPHANED ≠ CONTENT-LOST, and only the first is mechanically decidable. An unreadable head ref is counted and named UNCHECKED, never folded into clean.
Verification
--self-test5 legs both directions, driven with synthetic state (#402) · suite 7/7 including the empty-patch-id VOID andtest_control_can_fail·--help0 · bogus flag 2 ·check-tools-index0.⚠ One test failure was my stub, not the tool:
patch_id()callsgit showwithallow_fail=True, so keying the stub on that returned a stat block where a diff was expected and the finding silently vanished. Keyed on--statinstead.🤖 Generated with Claude Code