Repository navigation
Description
What happened
Main's push CI failed 5 times in about 40 runs on Oct 27–28. Every failure was a flaky test, not a regression:
| Run | Job | Test | Cause |
|---|---|---|---|
| 40763918664 | macOS shard 4 | a_timeout_is_failed_even_after_repository_changes_and_its_descendants_end, code_graders::check_timeout_cleans_descendants_before_packet_and_remains_failed |
--timeout 1 also bounds the model Grader and code checks |
| 40552542970 | macOS shard 1 | timed_out_trials_keep_partial_usage_and_exportable_session_ancestry (#1458) |
--timeout 1 cut the agent off before its usage line |
| 40507532942 | macOS shard 4 | a_baseline_built_before_this_change_pauses_at_its_live_warning |
timing ("the warned Trial kept working") |
| 40734161876 | Linux test |
stop_and_resume_preserve_finished_trials_and_refuse_a_changed_bar |
died before recording an outcome instead of interrupted: a race between Stop and the Trial's own end |
| 40627267443 | console-test |
Command details opens with the Inbox subject and full title above its actions (inbox.test.cjs:202) |
layout measured before render (height: 0) |
#1560 fixes the first two rows. The other three are still open.
Why PRs don't catch these
- On a PR, the macOS job runs only the
macos-gatesubset of tests. The full suite runs on macOS only after a push to main, so a macOS-only flake shows up first on main. - A test that fails 1 time in N passes on most PR runs.
Why the existing loop doesn't repair main
Pickup files a CI red on main bug Ticket (#1342), but only when no CI-red Ticket is open. #1458 was filed for row 2. Its Ticket run could not reproduce a macOS timing failure on Linux, so it ended with needs-info. That open needs-info issue then stopped Pickup from filing a Ticket for row 1. Main stayed red, and no Ticket was filed or run for it.
Options, as I'd rank them
-
Make the CI-red Ticket loop handle flakes. Before filing, Pickup re-runs main's failed jobs once (
gh run rerun --failed), as a Check re-run does for a Ticket run (ADR-0010). If the re-run passes, main is green again with no session. The failure is then filed as a flaky Ticket that names the test and both runs, and its Ticket run fixes the timing dependence instead of needing a deterministic repro. A CI-red Ticket inneeds-infoshould not stop Pickup from filing a new report. When an open CI-red Ticket covers a different commit or test, Pickup comments on it instead of staying silent. -
A coding standard for deadlines in tests. Integration tests should not use deadlines of a second or so, because they share runners with everything else. A test that needs something to time out makes that thing hang, and gives everything else several seconds. Add this to
CODING_STANDARDS.mdso the Standards review checks it. -
Find flakes before they reach main. Two choices, each with a cost:
- a scheduled workflow that runs the full macOS suite on main a few times each night;
- running the full macOS suite on PRs that touch
tests/experiments*orsrc/evals/.
nextest
retrieswould make main green but hide the flake, so I'd only use it together with option 1's reporting.
A separate thirdshift command to check and repair main would mostly repeat what Pickup already does every 2 minutes. The gap is in what happens after Pickup files the Ticket, not in noticing that main is red.
Activity
JacobStephens2 commentedon Oct 29, 2026
The maintainer chose options 1 and 2 on 2026-10-29. Option 2, a coding standard for deadlines in tests, is being done separately; this issue is option 1 only. Option 3 is not being done.
Agent Brief
Category: enhancement
Summary: Pickup re-runs a failed Base branch push CI run once before filing a CI-red Ticket. It files a flaky-test Ticket when the re-run passes, and a CI-red Ticket in
needs-infono longer blocks a new report.Current behavior:
Each Pickup pass reads the Base branch's latest push workflow run. If that run failed more than 30 minutes ago, Pickup files one
CI red on <base>: <jobs>Ticket. It labels the Ticketbugandready-for-agent, and includes the failing commit, the run URL and the recognizable failing-test log lines. Pickup does nothing while any open issue has a title startingCI red on, whatever its labels.That is a problem for flaky tests. The Ticket run follows the bug path, cannot reproduce a timing failure on demand, and ends with
needs-info. The Ticket stays open, so it blocks every later report while main stays red. #1458 did exactly this on 2026-10-27/28.Desired behavior:
Re-run before filing. The Base branch's latest push run can complete as
failureon its first attempt. Pickup then asks GitHub to re-run its failed jobs once (gh run rerun <id> --failed), right away, with no 30-minute grace. It says so on stderr, naming the run and the failed jobs, and files nothing on that pass. A run whose failed jobs can't be re-run, or a refused re-run request, goes straight on to filing as today. A run on a later attempt is never re-run again by Pickup.Red again. If the re-run attempt fails too, Pickup files the ordinary
CI red on <base>Ticket. The 30-minute grace still applies, timed from the re-run attempt's completion. The body names both attempts.Green on re-run means flaky. If the re-run attempt succeeds, the Base branch is green again. Pickup files one flaky-test Ticket, with a title that is distinct from
CI red onand recognizable, such asFlaky CI on <base>: <jobs>. Its body has:Pickup files only one per failed attempt, and doesn't file one while an open flaky-test Ticket already names the same test.
No reproduction for a flaky Ticket. A flaky-test Ticket's run does not end with
needs-infofor failing to reproduce the failure on demand. The recorded failure is the evidence. The fix is to remove the test's dependence on timing or scheduling, or the race it exposes. Choose the mechanism, such as its labels or session prompt, so the existing bug Ticket path is unchanged for every other bug.needs-infono longer blocks. An open CI-red Ticket labelledneeds-infodoesn't stop Pickup filing a new CI-red Ticket.New failures get noticed. Suppose an open CI-red Ticket, not in
needs-info, names a different failing commit than the current failure. Pickup then comments the new failure's evidence on that Ticket instead of filing nothing. The comment has the commit, the run URL and the failing-test lines, and is posted at most once per failing commit.Unchanged: read failures still warn and let Pickup continue; red Base branch CI still doesn't hold Self-merges; Base fixes are unaffected; and the cross-host CI filing reservation still covers filing, commenting and re-running.
Key interfaces:
base_ci_failuretoday) reads the run's attempt number, plus the previous attempt's outcome and jobs when there is one.file_ci_red_tickettoday) gains these outcomes: re-run requested, ordinary Ticket filed, flaky Ticket filed, comment posted, nothing to do.docs/guide.mddescribes the new behaviour, and so do the hand-written site pages that mention the CI-red Ticket (search for "30 minutes ago" insite/how-it-works/andsite/architecture/). Record the decision in an ADR next to ADR-0010 and ADR-0020, the Check re-run and Abandoned-job re-run ADRs.Acceptance criteria (the first six are Pickup tests driven by the fake
gh):CI red on <base>with both attempts' evidence. A second-attempt failure is never re-run.CI red onTicket labelledneeds-infodoesn't block filing for a new failure.CI red onTicket for a different commit gets one comment for the new failing commit, and only one, across repeated passes.Out of scope:
ci.ymlchange.Add a coding standard for deadlines in tests (#1561)