Skip to content

pr:review: accept a "Diff unchanged" correctness skip only when an earlier reviewed commit has the same patch-id - #37

Merged
thejackshelton merged 2 commits into
masterfrom
pr-review-diff-unchanged
Sep 30, 2026
Merged

thejackshelton merged 2 commits into
masterfrom
pr-review-diff-unchanged

Conversation

@thejackshelton

@thejackshelton thejackshelton commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

AGENTS.md step 7 merges origin/master into a PR right before merging. When that merge leaves the PR's own diff unchanged, Macroscope skips the correctness check as "Diff unchanged". pr:review counted every skip as no review, so such a PR (for example #29) could never pass.

What changed:

  • A correctness check skipped with output title exactly "Diff unchanged" now counts as passed only when both hold:

    • an earlier commit of the same PR has completed, successful correctness runs;
    • that commit's three-dot diff (against its merge-base with the base branch) has the same git patch-id --stable as the head's.

    pr:review prints the vouching commit and patch-id, or why nothing vouched.

  • Missing commits are fetched. If a commit still can't be read, or a diff is empty, the check does not pass and the reason is printed.

  • Every other skip reason still fails, including the cost limit and "Prerequisite check(s) not found". Unanswered findings still block.

  • gh JSON (check runs, review comments, PR commits) and git output are validated; malformed input throws.

  • The decision is a pure function in scripts/pr-review-vouch.ts. Unit tests in packages/parity/test/pr-review.test.ts cover the passing case, patch-id mismatch, no earlier success, other skip titles, an unfetchable commit and an empty diff, plus input parsing. No existing test or fixture changed.

What passed:

  • pnpm typecheck
  • pnpm test: 120 files, 2401 tests
  • pnpm pr:review 29 exits 0, vouched by 0be4c3d with patch-id 0f7694f27ea03a5d17264fd9e6f7c733c619722b. ec15d1a, whose skip was "Prerequisite check(s) not found", correctly does not vouch.

🤖 Generated with Claude Code

Note

Accept a 'Diff unchanged' correctness skip only when an earlier reviewed commit has the same patch-id

  • A completed 'Diff unchanged' correctness skip now passes only when an earlier commit of the same PR has a successful correctness review and the same non-empty git patch ID. The CLI computes stable patch IDs against the PR base branch, fetching missing commits from origin as needed.
  • Adds a new module pr-review-vouch.ts with strict parsers for check runs, review comments, PR commits, and patch-id output. Malformed GitHub API data now throws instead of being silently flattened, and commit identifiers must be 40-char lowercase hex SHAs.
  • The wait loop now uses a verdict-based settlement: failures settle immediately, and the review waits while any verdict is pending or no correctness check has started. Vouch results are cached per check-run URL, and the output reports the vouching commit or the failure reason for each skip.
  • Extensive test coverage added in pr-review.test.ts.
  • Behavioral Change: pr-review.ts no longer settles after unrelated checks finish unless a correctness check is present, and unvouched 'Diff unchanged' skips now fail the review.

Macroscope summarized 3fc2ccc.

…y when an earlier reviewed commit of the PR has the same three-dot patch id; gh JSON and git output are checked
Comment thread scripts/pr-review.ts
@macroscopeapp

macroscopeapp Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Approved at 3fc2ccc

Macroscope's review found this PR approvable — The changes affect only the developer-facing PR-review harness and add tested logic for validating and vouching “Diff unchanged” skips; no customer runtime or production deployment path is modified. The added GitHub/git history work changes review-tool behavior but remains isolated to that harness.

You can add or adjust custom eligibility rules. Learn more.

…ait loop, the Failed list and the exit code, with "Diff unchanged" vouches recorded on each poll before settled() (PR #37 round 1)
@thejackshelton
thejackshelton merged commit 2e2d7d1 into master Sep 30, 2026
4 checks passed
@thejackshelton
thejackshelton deleted the pr-review-diff-unchanged branch September 30, 2026 07:22
thejackshelton added a commit that referenced this pull request Sep 30, 2026
#37, showcase group) into MQ-a: pnpm run parity:capture and pnpm run profile:rows to the fixed point (a third run changes nothing); pnpm run parity:dpr-capture; pnpm run layout:vectors; pnpm run layout:dpr-vectors; pnpm run layout:break-vectors; pnpm run parity:break-capture; pnpm run parity:pixel-capture; pnpm run native:gen; pnpm run north-star:check; pnpm run tw:sweep. Generated conflicts were taken from origin/master and regenerated, never hand-merged.
thejackshelton added a commit that referenced this pull request Sep 30, 2026
Conflicts: faults.ts keeps both sets of appended plants (the four fonts plants, then blockifySkipped and inlineFlexToBlock); the Tailwind snapshot takes master's side here and is regenerated in the next commit.
thejackshelton added a commit that referenced this pull request Sep 30, 2026
…it, #37) into wm0-horizontal-tb

Only packages/parity/out/lanes.json conflicted; it takes master's side here and is rebuilt by the regeneration and device run that follow.
thejackshelton added a commit that referenced this pull request Sep 30, 2026
…o pr/v1a-engine-values; lanes.json and corpus-dpr.json taken from master and regenerated after
thejackshelton added a commit that referenced this pull request Sep 30, 2026
… sequence of 1c8999d, tw:sweep included): only packages/translate/corpus-dpr.json's digests change (V1 engine over master's 388 cases); tw:sweep changes no outcome
thejackshelton added a commit that referenced this pull request Sep 30, 2026
… parity:lanes -- --run-host --run-device) after merging origin/master (#29, #37, #40): 388 cases; frames, applied, lines and layout-vectors pass on ios and android; device-pixels ios 135, android 182, equal to origin/master's; out/device-failures-{ios,android}.json byte-identical to master's; parity:glyph-b3 passes, fringe 0
thejackshelton added a commit that referenced this pull request Sep 30, 2026
…ring, since f799419) into size-ar

Source conflicts resolved by hand: computed-checks.ts imports exactLayoutRatio beside master's FamilyKeyContext; values.ts keeps
ratioValue and exactLayoutRatio before master's font-context featureOf; faults.ts keeps v1b's two calc faults and master's four
font faults. The Tailwind sweep snapshot takes master's side and is regenerated by tw:sweep in the next commit.
thejackshelton added a commit that referenced this pull request Sep 30, 2026
…) into pr/v1b-compiler-values. faults.ts keeps both sides' faults (fonts and blockification, then V1's sumOrderSwapped and dropExplicitZeroPercent); fixtures.ts keeps master's order with values last (values.test.ts); the glyph-clearance pins in pixel-reference.test.ts are master's plus the values-* cases' own increments (edge +12/+12 at DPR 2, +10/+10 at 3, +11/+9 at 2.625, as in 2c7e72a). Generated conflicts (profiles, emitted CSS, pixel manifest, bottom pins, lanes.json, corpus-dpr.json, the Tailwind snapshot, north-star-check.json) taken from master and regenerated after
thejackshelton added a commit that referenced this pull request Sep 30, 2026
…) (regen sequence: grammar:gen, parity:capture, profile:rows, parity:capture, layout:vectors, parity:dpr-capture, layout:dpr-vectors, layout:break-vectors, parity:break-capture, parity:pixel-capture, native:gen, parity:lanes -- --run-host, node --conditions=dragon-internal examples/music-player/tools/check.ts (pnpm run north-star:check fails on master since #39: fixture-reader imports collectFontFaces from the internal entry), wpt:run --target web, wpt:update-expectations --target web, parity:glyph-b3 -- --write-bottom-pins): profiles regain the values rows, emitted CSS digests, pixel manifest and bottom pins gain the values cases, corpus-dpr.json digests; north star supported declarations 159 -> 165 on web and ios (54.6% -> 56.7%)
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