Repository navigation
ci: review-signal reads the files and the diff of the event's head - #12495
Conversation
The files and the diff now come from a compare of the event's base and head SHAs, so the status and its diff always describe the event's head. A pull request of more than 300 files reads its file list, then confirms its head is the event's; its diff is never classified.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec cdf1876 |
PR Analysis Report🔎 Preview ·
|
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 219 | 219 | 0 |
| Runner pool, runner-minutes a day | 71,349 | 71,349 | 0 (0%) |
| Average concurrent jobs | 49.5 | 49.5 | 0 |
| Time to green (median → this run) | 64.5 min | 46.2 min | −18.3 min |
| Runs a day | 326 | 326 | 0 |
Other workflows: review-signal.yml changed: runs on pull_request_target, pull_request_review, issue_comment, workflow_dispatch; standard runners; its minutes are not measured here
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/review-signal-workflow.test.mjs.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. The approach is sound: the gate now reads the files and the diff of the exact head it posts on. Two things need fixing before approval.
- The test "never classifies the diff of a pull request larger than a compare names" never reaches the over-300 guard: the stubbed file list returns one file, so the run stops at the count check first, and the suite stays green with the guard replaced by
true. Make the list return 301 files, then assert that the diff is not requested and that the status is still posted. - The description says this change and #11856 merge cleanly, but they conflict at the end of
review-signal-workflow.test.mjs. With both blocks kept, all five of #11856's design-label tests fail, because #11856 feeds its files only through thelistFilesstub. Correct that sentence, ideally with onefilesharness parameter that feeds both the compare stub and the list stub.
CI has not run at this head yet because the pull request is a draft.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the status is posted at the event's head, and trusted sources are read there. Verified: the gate writes and source reads use the event's head SHA.
- Claim: files come from a compare of the event's base and head. Verified:
review-signal.ymllines 404-412 and the new compare test. - Claim: the diff comes from the same compare, and the pull request's diff is no longer requested. Verified: lines 545-549; no pull-request diff route is left.
- Claim: over 300 files, the job reads the pull request's list and posts nothing when the head moved. Verified: lines 413-426 and the moved-head test.
- Claim: such a pull request's diff is never classified. True in the code (lines 530-533), but its test does not prove it (first finding).
- Claim: three new cases and one updated case fail on
main. Verified: four failures on the base with the new test file. - Claim: 191 tests pass in the five named files. Consistent: 117 ran here, and the fifth file needs a git checkout and has 74 cases. The formatting check is clean; the workflow lint did not run here.
- Claim: #11856 changes the same two files for a different question, and this change does not fix it. Verified.
- Claim: the two merge cleanly. False (second finding).
- Claim: #11757 is an outside pull request on an older base that already conflicts, and this change neither depends on it nor resolves it. Verified.
- Ownership and landing-path notes: process statements, not checked against code.
- File
.github/workflows/review-signal.yml: clear. - File
.github/scripts/review-signal-workflow.test.mjs: first finding (lines 844-847); its compare stub returns a fixed file list (second finding).
…and the list, and the size guard's case reaches the guard
|
/approve-spec 526b405 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request is marked ready for review. Both earlier findings are fixed: the size-guard case now reaches the guard and fails without it, and the note on #11856 is accurate.
- Non-blocking: merging #11856 also keeps both
filesdefaults in therunSignalparameter list without a conflict marker, so the merged test file fails to load until one line is deleted; with it deleted, all 53 cases pass.
Claims and files checked
Review mode: incremental; reason: none
- Claim: the status is posted at the event's head, and trusted sources are read there. Verified:
review-signal.ymllines 344-346 and 583-586. - Claim: the files and the diff used to come from the pull request itself, which can show a newer push. Verified on the base: the live file list and the pull-request diff.
- Claim: files come from a compare of the event's base and head. Verified: lines 404-412 and the compare case at test lines 802-818.
- Claim: the diff comes from the same compare, and the pull request's diff is no longer requested. Verified: lines 545-549 and the case at test lines 820-825.
- Claim: over 300 files, the job reads the pull request's list and posts nothing when the head moved. Verified: lines 413-426 and the case at test lines 827-846.
- Claim: such a pull request's diff is never classified, so the appearance-only exception stays false. Verified: lines 530-533 and 636.
- Claim: the new cases and the updated case fail on
main. Verified, and five fail there: the four new cases and the updated classifier contract case. - Claim: the size-guard case fails with the guard replaced by
true. Verified. - Claim: 191 tests pass in the five named files. Consistent: 117 pass here in four of them; the fifth needs a git checkout to load.
- Claim: the formatting check and the workflow lint are clean. Formatting verified; the workflow lint was not run here.
- Claim: #11856 changes the same two files for a different question, and this change does not fix it. Verified.
- Claim: the two conflict at the end of the test file, and #11856's tests rebase through the shared
filesparameter. Verified, with the duplicate-parameter note above. - Claim: #11757 is an outside pull request on an older base that rewrites much of the workflow and already conflicts with
main, and this change neither depends on it nor resolves it. Verified. - Ownership and landing-path notes: process statements, not checked against code.
- File
.github/workflows/review-signal.yml: clear. - File
.github/scripts/review-signal-workflow.test.mjs: clear.
What
The status and its diff always describe the event's head.
review-signalposts its gate status at the event's head SHA, and it reads the trusted sources at that head. It read the changed files and the diff from the pull request itself, though, and those can already show a newer push. Now:repos.compareCommitsWithBasehead,basehead: <base.sha>...<head.sha>), which is the pull request's own three-dot diff at that head.application/vnd.github.diff. The workflow no longer requests the pull request's diff.Tests
review-signal-workflow.test.mjs(red-first: the 3 new cases and one updated case fail onmain):true).Local:
review-signal-workflow,review-signal-decision,ci-admission,spec-owner-workflowandworkflow-pathstests: 191 passed.prettier --checkandactionlint: clean.Overlap checked: #11856, #11757 (#11856 changes the same two files to decide when the design-review label comes back at a head an owner cleared, a different question from which commit the files and diff describe; this change does not fix it. Both add a block at the end of
review-signal-workflow.test.mjs, so they conflict there; the harness now takes onefilesparameter that feeds both the compare and the file list, so #11856's tests rebase by passing their files through it. #11757 is an external pull request on an older base that rewrites much of the workflow file and already conflicts with main; this change neither depends on it nor resolves it)Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard, on green, CodeBunny approval and Specs' exact-head
/approve-spec.