Repository navigation
Fit review cards again at publish so a stale PR head can't error the review - #22386
Merged
Merged
Conversation
…review #22287's review errored after a clean model pass: the author card came in at 110 KB and pinned-comment.sh refused it against its 60,000-byte budget. The branch was cut on 2026-10-12, before the card budget landed (#22269), and the initial lane runs build-evidence.py from the PR head, so the card was never measured. The update lane already uses the default branch's tooling; the initial lane's publish job didn't re-check. - build-evidence.py grows `--fit AUTHOR BRIEF`: fit two finished cards in place with fit_author_card / fit_brief_card and exit. A card that already fits comes back byte-identical. - The publish job runs it (default-branch checkout) right before pinned-comment.sh. Best-effort: the size check is still the backstop. - Regression test reproduces the shape (an unfitted card from an older head) and covers the CLI and its no-op case. Replayed against #22287's real handoff: 110,267 -> 35,262 bytes, all 118 rows kept (the shed Do-this blocks are already in evidence `detail`), and the fitted card passes validate-pinned.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GWRsY6CwDJHhNhNFUnswxJ
Contributor
Sentinel — merge gate status2 of 5 gates need attention before this can merge.
Break glass: a member of a routing team ( Evaluated at head Need help, or think a gate got it wrong? Ask in |
Collaborator
|
Your site preview for commit 0bee4d8 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-22386-0bee4d8d.s3-website.us-west-2.amazonaws.com |
CamSoper
marked this pull request as ready for review
October 20, 2026 18:51
This branch was successfully deployed
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.
Proposed changes
#22287's pre-merge review errored after a clean model pass. The publish job's
pinned-comment.shrefused the author card: 110,327 bytes against the 60,000-byte budget.Root cause: that branch was cut on 2026-10-12, a day before the card budget landed in #22269. The initial review lane runs
build-evidence.pyfrom the PR head, so the head's old copy built the card and never measured it. The publish job uses the default branch'spinned-comment.sh, which enforces the budget, but it never re-fit the card. (The update lane already runs default-branch tooling, so it doesn't have this gap.) This is the same "workflow from master, scripts from the PR head" problem the workflow already works around for--pr-diff,--approval-scope, andack-request.sh.Changes:
build-evidence.pygets a--fit AUTHOR BRIEFmode. It fits two finished cards in place with the existingfit_author_card/fit_brief_cardand exits. A card that already fits comes back byte-identical.pinned-comment.sh. It's best-effort: if the fit itself fails, the size check is still the backstop, so a publish that would have worked before still works.test_card_budget.py: it builds an unfitted card the way an older head would, runs the CLI on it, checks the card fits, keeps every row, and passesvalidate-pinned.py, and checks the no-op case. The test fails against the currentbuild-evidence.py(unrecognized arguments: --fit).pinned-comment.sherror hint now mention the publish-time fit.Replayed against #22287's real handoff artifact: the card went from 110,267 to 35,262 bytes (❓ links and ❓ Do-this blocks shed). All 4 🚨 and 114 ❓ rows are kept, and the fitted card passes
validate-pinned.py. Nothing is lost: the old head'sbuild()already copied every Do-this block into evidencedetail, and the evidence page shows them.make test-review-pipelinepasses.make lintdoesn't cover these files (.github/and*.mdare prettier-ignored, and the markdown lint only checkscontent/).Note for #22287 itself: its review will still run its own stale composer until the branch merges master. With this change the card publishes anyway, but merging master into that branch would also pick up the current card wording (the old card still tells authors to use the retired
@claude … #update-reviewform).Related issues (optional)
Generated by Claude Code