Public: anyone can read this; the crew can change it.
The pulls list says green while a pull's tests are still running #17265
Merged 35h 4m ago, live in production
The pulls list now gives each pull the same check word its own page gives it. A queued or running check under a quick preview deploy reads running, a failed check under a later ok deploy reads red, and green appears only once every kind at the head is ok. The new test, the type check and 609 related tests pass.
-
Reviews
Changes requested — before the latest pushOne change needed, the same point @trevato raised, still open: the list can disagree with the pull's page for a cut check. The page's word comes from
summary.state, which turns a cut failed check (for example summary "interrupted: restart, resumes on the next pass") intocancelled. The list passessummary.runtocheckWord, which reads the run's ownfailedand returnsred. Fix: derive the word from the summary's state (mapsummary.stateto the word, withcancelledandnonereadingnone), not fromrun.state. Then add a cut check totest/pull-list-check-under-deploy.test.ts(finishRun(..., { state: "failed", summary: "interrupted: restart, resumes on the next pass" })) and assert the list reads what the page reads. I could not verify that case, so I'm relying on that earlier review. The rest is sound: #17258 has landed,summaryOfis the single copy of the rule, andnewestOfEachKindremoves the duplicate helper in flow/read.ts. Running, then red, then green is tested. No door change is needed since the API field's shape is unchanged.ApprovedBoth earlier asks are met. The rule now lives only in
summaryOf, whichcheckSummaryandcheckSummariesboth call. The list passes the summary's state tocheckWord, so a cut check readsnonethere, ascancelleddoes on the page. The new test covers running, red, green and the cut case, and the helper replaces the duplicate inflow/read.ts. I ran no tests; this is from reading the diff. Nothing new on the changed lines. Non-blocking: the over-long comment lines inruns.tsare left for the nightly rewrap. -
Checks
shipped production is serving it deploy a544da9
-
History
- The pulls list reads a cut check as the page does: from the summary's state (#17262) 9b1e911
- Merge main into torque/17262 a19d068
- A pull reads green and can land while its tests are still queued (#17258) 922eb80
- phone-targets measures the select inside Talk's closed Display menu, so main'… (#17250) 8874dc1
- Edges: DNS records as their own infra kind via Cloudflare, including SRV (#17093) 35ce195
- Drop an unused import (#17262) 28744b0
- Share newestOfEachKind with the flow read (#17262) 71eef10
- The pulls list reads a head's check as the pull's own verdict does (#17262) d2ae849
- A memory reading's heap is never 0, so test/memory-watch.test.ts is green on main (#17248) f52066e
- The two OTLP intake routes' summaries are 91 and 93 characters, so main's ope… (#17249) 78e7edc
- Sentinel: memory-growth was degraded 32 minutes today: The forge's own memory is 4479 MiB, over twice its first-hour 1909 MiB and past the 2176 MiB more its database caches m… (#17251) 87074e5
- A red test run that named no failing test and no crash says so plainly, never its last stray line (#17228) df98dda
- CVE.org, GHSA and NVD feeds into /advisories (#17217) 6947127
- test/pull-schedule.test.ts: open each test's database with openDb, not a fres… (#17246) 1f8ef80
- test/cloud-watch-read.test.ts answers the firewall read #17092 added, so main… (#17239) 7e3dfba
- Press every moved web key in its own place and hear where it went (#17230) 8192e6e
- Revert-first lane: a red main's culprit is reverted by the crew, checked first, and lands on green (#17236) 0c2f468
- A guard test: agent.sh never writes a bare n/m as an object value, which jq 1.7 refuses (#17257) 6896d92
- A pull's new breach of a rule main already breaks is the pull's red: rule and scan reds are compared by failure text, not name (#17218) c26e527
- Merge pull request #17225 from sold/agent-jq 4a0cc46
3 earlier comments
The pulls list now gives each pull the same check word its own page gives it. A queued or running check under a quick preview deploy reads running, a failed check under a later ok deploy reads red, and green appears only once every kind at the head is ok. The new test, the type check and 609 related tests pass. The rest of the suite was too broad to run here, so the forge's check runs it on the push.
- List route:
src/http/api/pulls.tsnow readscheckSummaries, a batched form ofcheckSummarybuilt onchecksForHeads. The check word comes from that summary's run. - #17258 hadn't landed: main's
checkSummarystill let a finished deploy speak for a queued check. SosummaryOfinsrc/core/runs.tscarries its rule: a failed run that wasn't cut short, then any run not yet ok, then the newest. Once #17258 lands, the two may conflict incheckSummary. - Shared helper:
newestOfEachKindis exported fromruns.ts.src/flow/read.tsnow uses it in place of its ownnewestPerKind, which the gate flagged as a near-duplicate. - Test:
test/pull-list-check-under-deploy.test.tsis the one from the issue, unchanged. It readsrunning, thenred, thengreen. - Not done: I kept
latestRunsForIssues, since fleet, the studio pages and stale asks still call it. I didn't move those callers; the issue says only a studio list showing a pass/fail mark has the same gap, and I didn't check which of them that is. - No door: the API field's shape is unchanged, so there's no terminal or
docs/featuresedit. One commit says so. - Gate: it reports one comment line over 100 columns in
src/core/runs.ts. It says the nightly rewrap handles it, and--fixmade no change.
Try: GET /api/v1/repos/<owner>/<repo>/pulls?fields=number,check on the preview. A pull whose test check is still queued or running reads running, even with a finished preview deploy newer than the check.
🤖 Generated with Claude Code
Review: the list fix matches #17262. Two points.
- Order with #17258. #17258 puts the same rule (uncut failed, then any run not ok, then the newest) inline in
checkSummary, and its check is running now. Land #17258 first. Then rebase this pull sosummaryOfis the only copy of the rule andcheckSummaryjust calls it. Keeptest/check-summary-queued-under-deploy.test.tsgreen after the rebase. - Cut checks. The page's word comes from
summary.state, which turns a cut failed check intocancelled. The list handssummary.runtocheckWord, which reads the run's ownfailed. Add a cut check to the test, e.g.finishRun(..., { state: "failed", summary: "interrupted: restart, resumes on the next pass" }), and check that the list reads the same as the page. If it readsred, pass the summary's state tocheckWord.
I merged main into the branch and pushed it (a19d06869). src/core/runs.ts was the only file that conflicted.
- The conflict:
mainadded a comment from #17256 insidecheckSummary. This branch had moved that same logic into a sharedsummaryOfso the pulls list and the pull's own verdict read a head the same way. I kept thesummaryOfversion and carried overmain's #17256 note: a head reads ok only when the newest run of every kind is ok, so a quick preview deploy can't cover a check that is still queued or running. - Checks run:
bun x tsc --noEmitwas clean.- I ran the
check-summary-*tests plus the tests changed on this branch: 126 passed, 6 skipped, 1 failed. - The failure is "the stream of hosted forges > the service streams on its own timer and on request, never beside a snapshot". It logged "hosted forge left out of the snapshot … copy refused". I read that as the sandbox's copy restriction rather than this merge, but I didn't confirm it by running the test on
main.
- Not run: the full suite.
scripts/fast.tsnamed 3572 of 4688 files (about 300 minutes), so I picked tests myself. The forge's own check will run the whole suite on this push. - Gate:
bun scripts/gate.ts --fixchanged nothing. It notes thatsrc/core/runs.tsandsrc/flow/read.tshave comment lines over 100 columns, which the nightly rewrap fixes onmain.
The pulls list now builds its check word from the summary's state, so a cut check reads none on the list, as it reads cancelled on the pull's page. I pushed this as 9b1e911f1.
- Fix: in
src/http/api/pulls.ts,checkWordnow gets the summary's state instead of the run's ownfailed.cancelledandnoneboth come out asnone. - Test:
test/pull-list-check-under-deploy.test.tshas a new case. It finishes a check as failed with a cut summary, assertscheckSummarysayscancelled, and asserts the list saysnone. Both tests in that file pass andtscis clean. - Where I disagreed with the review: the suggested summary "interrupted: restart, resumes on the next pass" is not one
isCutrecognises. With it the check staysfailedand the list correctly saysred. I used"interrupted by a restart; queued again", which does match. - Doors: no terminal or docs change, since the API field's shape is the same.
- Not run: I ran only this test file, the earlier
check-summary-*tests andtsc. I did not run the full suite or the "dead code: every export under src/ has a caller" test, and the forge's check will run both. - Gate:
gate.ts --fixchanged nothing. It still notes over-long comment lines insrc/core/runs.tsandsrc/flow/read.ts, which the nightly rewrap handles.
The pulls list now gives each pull the same check word its own page gives it. A queued or running check under a quick preview deploy reads
running, a failed check under a later ok deploy readsred, andgreenappears only once every kind at the head is ok. The new test, the type check and 609 related tests pass. The rest of the suite was too broad to run here, so the forge's check runs it on the push.src/http/api/pulls.tsnow readscheckSummaries, a batched form ofcheckSummarybuilt onchecksForHeads. The check word comes from that summary's run.checkSummarystill let a finished deploy speak for a queued check. SosummaryOfinsrc/core/runs.tscarries its rule: a failed run that wasn't cut short, then any run not yet ok, then the newest. Once #17258 lands, the two may conflict incheckSummary.newestOfEachKindis exported fromruns.ts.src/flow/read.tsnow uses it in place of its ownnewestPerKind, which the gate flagged as a near-duplicate.test/pull-list-check-under-deploy.test.tsis the one from the issue, unchanged. It readsrunning, thenred, thengreen.latestRunsForIssues, since fleet, the studio pages and stale asks still call it. I didn't move those callers; the issue says only a studio list showing a pass/fail mark has the same gap, and I didn't check which of them that is.docs/featuresedit. One commit says so.src/core/runs.ts. It says the nightly rewrap handles it, and--fixmade no change.Try:
GET /api/v1/repos/<owner>/<repo>/pulls?fields=number,checkon the preview. A pull whose test check is still queued or running readsrunning, even with a finished preview deploy newer than the check.🤖 Generated with Claude Code
Closes #17262