Skip to content

rebless_batch.py: one command to fold PRs that carry golden snapshots into one rebless PR - #9120

Merged
squid-protocol merged 1 commit into
mainfrom
rebless-batch-tool
Nov 23, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
rebless-batch-tool

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Why: on 2026-11-23 nine engine PRs (#9053-#9059, #9061, #9067) each committed the same golden-master snapshot files, so every merge re-conflicted the rest and all nine sat red. Doing it by hand took several rounds. This makes it one command.

What it does: python tests/tools/rebless_batch.py --prs 9053,9054,... [--branch NAME] [--dry-run] [--push] [--no-bless]

  1. Fetches main and each PR.
  2. Applies each PR's hand-written change (everything except the three snapshot folders), one commit per PR, to a fresh worktree off main.
  3. Blesses the golden masters once (both legs plus the DOOM-port goldens) with the repo's own golden-lock tool.
  4. With --push, opens a draft PR listing every PR it replaces.

What it will not do: mark the PR ready, merge it, or close the originals. It prints the exact gh pr close commands for a person (or churn) to run once the batch is green. It refuses (exit 2, nothing pushed) if a PR's change no longer applies, or if two PRs edit the same lines of the same file. A PR whose change is already on main is skipped with a note.

Tested: 18 unit tests with tiny temporary git repos (no network): which paths are snapshots, splitting a diff, overlap detection, binary files surviving, a diff that no longer applies, already-on-main, PR title/body text. A real --dry-run against two closed PRs ran end to end and cleaned up after itself.
Not tested: the bless step and --push (they take many minutes and open a real PR). They are the same commands I ran by hand for #9111, wired in; the first real use should be watched.

Ruff and mypy are clean for the new files apart from the repo-wide assert baseline in tests.

🤖 Generated with Claude Code

…draft PR with one re-bless

The recipe done by hand for #9111 (nine PRs, #9053-#9067): apply each PR's hand-written diff to a fresh
branch off main, bless the goldens once, open a draft PR that lists them. Refuses on a diff that does not apply
or two PRs touching the same lines; never marks ready, merges or closes the originals.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review November 23, 2026 14:24
@squid-protocol
squid-protocol merged commit f71cfe7 into main Nov 23, 2026
56 checks passed
@squid-protocol
squid-protocol deleted the rebless-batch-tool branch November 23, 2026 15:01
squid-shepherd Bot pushed a commit that referenced this pull request Nov 23, 2026
…DEF01 deck runs (Part of #8886) (#9131)

* IDCAMS model: DEFINE CLUSTER DATA/INDEX component takes CONTROLINTERVALSIZE/CISZ, so CardDemo's DELDEF01 deck runs (Part of #8886)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Regenerate docs_read_by_tests.txt (stale from #9120)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* cobolrt rule catalogue: isCisz belongs to RT-IDC-DEFINE (Part of #8886)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.

1 participant