Skip to content

Diff the debt ratchet from the PR's merge-base, not GitHub's stale base.sha - #1329

Merged
trissim merged 1 commit into
mainfrom
fix/ratchet-merge-base
Oct 29, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/ratchet-merge-base

Conversation

@trissim

@trissim trissim commented Oct 29, 2026

Copy link
Copy Markdown

1 file, +5/-2. The Debt ratchet now diffs from git merge-base origin/<base> HEAD instead of github.event.pull_request.base.sha.

The bug

GitHub does not refresh pull_request.base.sha when the base branch moves. So the ratchet compared PR heads against a stale main and charged them for debt that main itself added later.

Witness: toad#1320 (embedded neovim) at c29eaa1

  • The ratchet's base was 6d83f98ac. The real merge-base is 4c3c4f3a0, 15 main commits later.
  • It reported two "introduced" findings in files P928: replace the handwritten Vim subset with embedded Neovim #1320 never touches:
    • NoneAbsence src/toad/screens/main.py:231, from main commit 776f7f9 "Use content readiness for painted reads…"
    • BroadSwallow src/toad/session_navigation.py:319, from main.
  • git diff 4c3c4f3a0 c29eaa12c --stat lists neither file.

After

  • BASE_TIP is origin/<pull_request.base.ref>, or inputs.base for manual dispatch.
  • The ratchet's --base is that tip's merge-base with the head, which is exactly the PR's own change.
  • With fetch-depth: 0, origin/main is present.

Not changed

🤖 Generated with Claude Code

…se.sha

pull_request.base.sha is not refreshed when main moves. toad#1320 at
c29eaa1 was diffed from 6d83f98, fifteen main commits behind its real
merge-base 4c3c4f3, and charged with a NoneAbsence at screens/main.py:231
and a BroadSwallow at session_navigation.py:319 that main commits 776f7f9
and 961e7ca introduced; #1320 touches neither file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dR85kyFKcc2tQAJLhK
Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim

trissim commented Oct 29, 2026

Copy link
Copy Markdown
Author

Carried unchanged into #1320 as d036dc5 (cherry-pick of 073c292, identical stable patch-id ea1a2e50a11d7dfd260fcfc6589f3ed2b7093503). #1329 could not go green alone: toad main imports VimInsert, which textual#208 removed, so every toad PR fails collection until #1320's compatible engine lands. Proof the fix works: #1320 run 40938461799, Debt ratchet SUCCESS against the real merge-base.

@trissim trissim closed this Oct 29, 2026
@trissim trissim reopened this Oct 29, 2026
@trissim
trissim merged commit a086830 into main Oct 29, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants