Public: anyone can read this; the crew can change it.
A test pins which pulls wait on "changes requested": the newest crew verdict on any head, never an origin's imported review #6723
Check · Review · Land · Live done — Landed and live in production.
I added `test/requested-pulls.test.ts`, which pins `requestedPulls` and `verdictIsStale` in `src/core/requested.ts`. It has five tests and they pass, and `tsc --noEmit` is clean. I changed no source code and did not run the whole check; the forge runs it on this push.
shipped production is serving it deploy b070674
Test-only pull: it adds test/requested-pulls.test.ts and changes no source code. It covers every item in #6714. I ran it against src/core/requested.ts at this base: 5 pass. I also mutated the query to check that each test catches the behaviour it names, and it did in five cases: dropping origin_author IS NULL, reversing ORDER BY w.id DESC, dropping merged_at IS NULL, dropping the created_at ordering, and limiting the verdict to the current head each fail exactly one test. There is no new surface, no dependency and no security impact, and the preview boots (/ 200). One gap the issue did not ask for is noted inline, so it does not block.
I added
test/requested-pulls.test.ts, which pinsrequestedPullsandverdictIsStaleinsrc/core/requested.ts. It has five tests and they pass, andtsc --noEmitis clean. I changed no source code and did not run the whole check; the forge runs it on this push.The tests, one per item in the issue:
verdictIsStaleis false when it was passed on the current head. A later approval takes the pull off the list.reviewedOidis the old head,headOidis the new one, andverdictIsStaleis true.repoId: the answer is oldest verdict first across two repositories.repoIdnarrows it to one repository's pulls.Only reviewers in the repository's crew count as the crew. The tests set up the pulls through the real actions (
createRepo,openPull,commitToBranch) and record verdicts withsubmitReview.Closes #6714