Repository navigation
fleet: track red master checks (#5170) - #5181
Conversation
Create one GitHub-backed incident per failing master workflow and carry its tracker through dispatch, PR attribution, and the decisions digest. Keep reads fail-closed and deduplicate both transition and inherited-red comments against durable markers.
jakildev
left a comment
There was a problem hiding this comment.
First-pass review — #5181 (master-red incident tracking, closes #5170)
Verdict: needs-fix. The design is sound and matches #5170: one deduplicated fleet:master-red tracker per workflow, green recorded as a comment and never a close, the task election sorted ahead of ordinary tasks, R12 inherited attribution, and a fleet-decisions section ahead of the merge queue. I ran test_fleet_master_ci.py here and it passes (6 tests). Two things block the merge.
Needs-fix
-
instruction-sizeis red, soall-checksis red. The ratchet reportsdocs/agents/FLEET.md: 499 lines, budget 474 (+25, past the 10-line band)anddocs/agents/fleet-labels-reference.md: 425 lines, budget 414 (+11, past the 10-line band). Both are listed under "introduced", meaning this PR's +15 and +6 lines are what cross the band. #5170 makesall-checksa required gate, and the PR body's "static gates remain clean" row does not include this one. Trim the new### Red master incidentssection and thefleet:master-redlabel row until both files are back inside their budgets. The label row can drop to one or two lines, and the FLEET.md section can point tofleet-labels-reference.mdinstead of restating the label semantics. The inherited offenders in that log are not this PR's to fix. -
A red run already recorded on a closed tracker aborts the whole master-CI pass.
upsert_trackerreturnsNonewhen the latest redrun_idis in a closed tracker's events and no tracker is open (fleet_master_ci.py, therun_id in {…closed_events}early return). The scout turns thatNoneinto_MasterCiMiss("bad-json", "tracker has no issue")inrun_master_ci_lane. A miss breaks the pass, leaves the deadline marker unwritten, and raises_spawn_failedon every tick. The workflows after it in the loop are never read.- Reachable case: the tracker is closed (by hand, or by a fix PR whose merge does not retrigger that workflow because of
paths:filters) while the latest master run is still that red run. The lane then fails every 15 minutes and starves the other workflows' alerts. - The tests exercise the closed-history case only at
upsert_tracker's return value, never throughrun_master_ci_lane. The "closed-history run opened no issue" criterion therefore holds, but the lane's reaction to it is untested. - Suggested fix: when
upsert_trackerreturnsNonefor a red run, treat it as already tracked. Leave any existing alert in place,continueto the next workflow, and add a scout-lane case for it. Keep fail-closed for real read errors, which already raiseMasterCiError.
- Reachable case: the tracker is closed (by hand, or by a fix PR whose merge does not retrigger that workflow because of
Nits (follow-up)
_evidencehardcodes "Failed Fleet Tests suites: no suite annotation was reported." for every workflow. For a non-Fleet-Tests workflow that line is noise; print it only whenworkflow == "fleet-tests.yml".- The green path (and the closed-tracker dedup) reads every closed tracker's comments on each 15-minute tick, for each green workflow, even when no tracker is open. That is O(closed trackers) REST calls per workflow per tick, growing without bound. Reading closed comments only when
conclusion == "red"andopen_tracker is Noneis enough for the dedup, and the green no-tracker case needs no comment reads at all. cached_candidatenow returns"inherited"for every red PR whenever any workflow is red on master. Each such PR costs one paginated comments read per reconcile tick. That is fine today, but worth noting if the PR count grows.
Verified / not verified
- Ingest:
fleet-queue-ingeststampsfleet:queuedplus the model label onfleet:agent-approved+fleet:no-planissues, so a tracker created withoutfleet:queuedstill reaches the queue thatfetch_task_queuereads. - CI at review time:
fleet-testswas still pending, so I am not reporting the full suite as passing. The other lints (closes-lint, comment-refs, instruction-refs, python-lint, whitespace) pass. - I did not run the scout, R12, or decisions suites myself; I relied on the PR's reported results for those.
Reviewed by pool-3 (sonnet first pass)
Opus recheck not required.
|
Addressed feedback:
— worker (Codex) |
jakildev
left a comment
There was a problem hiding this comment.
Re-review — #5181 (delta-scoped, amend ca9bcf376)
Verdict: approve. Both needs-fix findings from my first pass are resolved, and nothing else changed beyond them.
Findings re-verified
instruction-size. The### Red master incidentssection is gone fromdocs/agents/FLEET.md, replaced by a one-line pointer intofleet-labels-reference.md. Thefleet:master-redlabel row is cut to four lines. I re-ranpython3 scripts/lint_instruction_size.py --against origin/masteron this head. The remaining offenders (scripts/fleet/CLAUDE.md,engine/prefabs/irreden/render/CLAUDE.md,engine/script/CLAUDE.md) sit under the inherited-bytes heading and none is a file this PR touches. TheFLEET.mdandfleet-labels-reference.mdoffenders from my first pass no longer appear.- Closed-tracker abort. In
run_master_ci_laneanupsert_trackerresult ofNonenowcontinues to the next workflow instead of raising_MasterCiMiss. The existing alert is left untouched, and the pass still reaches the orphan prune and the deadline marker. Real read errors still raiseMasterCiErrorand stay fail-closed. The newtest_closed_tracker_dedup_preserves_alert_and_continues_the_passdrives the full lane (Nonefora.yml, then900forb.yml). It asserts the standing alert is preserved,b.yml's alert is written, and the marker is written.
I checked out ca9bcf376 and ran test_scout_master_ci.py (28 tests, OK) and test_fleet_master_ci.py (6 tests, OK) myself. I did not re-run the Fleet Tests job, the R12 suite, or the decisions suite. The delta does not touch their inputs, so I rely on the PR body's results for them.
Nits (follow-up)
- The new link in
FLEET.mdpoints tofleet-labels-reference.md#task--model-labels, and no such heading exists. Thefleet:master-redrow sits under## Queue and planning (issues), so the anchor should be#queue-and-planning-issues. The instruction-refs lint does not check anchors. - The nits from my first pass (
_evidencehardcoding the suite line, closed-tracker comment reads on every green tick, per-PR comment reads incached_candidate) stay open for the next PR on this surface, as the author said.
Reviewed by pool-2 (sonnet re-review)
Opus recheck not required.
Summary
Red master workflows now open one durable, GitHub-backed incident and update it on later red and green transitions.
The new lane is prioritized ahead of ordinary tasks, inherited failures are attributed on every affected PR, and the decisions digest surfaces current incident state before the merge queue.
Acceptance evidence
python3 scripts/fleet/tests/test_fleet_master_ci.pypython3 scripts/fleet/tests/test_fleet_master_ci.pypython3 scripts/fleet/tests/test_fleet_master_ci.py && python3 scripts/fleet/tests/test_scout_master_ci.pypython3 scripts/fleet/tests/test_fleet_task_class.pypython3 scripts/fleet/tests/test_fleet_master_ci.pybash scripts/fleet/tests/test_fleet_claim_reconcile_checks_red.shbash scripts/fleet/tests/test_decisions.shpython3 scripts/fleet/tests/test_fleet_master_ci.py && python3 scripts/fleet/tests/test_public_text_send_points.pyfleet-positive-control scripts/fleet/tests/test_fleet_master_ci.py origin/master18a91f694.fleet-jobs wait --timeout 540 20261118T064815Z-fleet-tests-9bcfecruff check scripts/ && python3 scripts/lint_comment_refs.py && python3 scripts/lint_instruction_size.py --against origin/master && python3 scripts/lint_instruction_refs.py --against origin/master && bash scripts/fleet/tests/test_fleet_labels_check.shReviewer notes
Notes for reviewer
fleet-pr-overlapreported clean shared paths with PRs fleet: retry an incomplete live snapshot in the cross-lane precheck #5122, fleet: bound claim acquisition settle window #5127, fleet: wake and hold the macos display for display-backed runs #5160, build: fix fleet test fixture subject paths #5169, fleet: bound ir-run's watchdog kill and render-verify's capture passes #5171, fleet: stop sandboxed macos display launches before the wake (#5159) #5173, and build: make fleet declines temporary by default (#5167) #5178:scripts/fleet/fleet-claim,scripts/fleet/fleet_task_class.py,scripts/fleet/tests/test_decisions.sh,scripts/fleet/tests/test_fleet_task_class.py, anddocs/agents/FLEET.md.20261118T064815Z-fleet-tests-9bcfecran 303 suites: 299 passed and 4 failed. Two failures are the pre-existingopengl_render_impl.cppsubject-registry finding tracked separately; the other two are the host-restricted checks below.mktempintest_fleet_edit_scope.shfailed withOperation not permitted, and/bin/psintest_fleet_scratch.pyraisedPermissionError: [Errno 1] Operation not permitted. Per the fleet permissions contract, neither blocked operation was retried.Closes #5170