Repository navigation
Closed
Labels
ready-for-agentFully specified; an agent can take it once its blockers have merged
Description
Parent
Ticket C1 of spec #780 (Infra; no milestone, ADR 0010).
What to build
Every CI and Privacy job fails when it runs past about 1.5x its measured p95, so an overrun is a red bug, not an hour of lost minutes.
- A script reads the last completed runs (default 150, as the audit did; latest attempt) from the CI bench's collected jobs, takes each job's p95 and writes its budget: 1.5x p95, rounded up to a whole minute, at least 5 minutes. Traced and planted runs get their own budget from their own runs. Each row keeps the p95, sample count and window it came from.
- Each job's
timeout-minutesin the CI and Privacy workflows is set from that table, replacing today's 60 and 90 minute limits. - A check fails when a job in either workflow has no row, or a timeout that differs from its row, so a new job can't arrive without a budget. It runs in the bench workflow, which already runs on CI workflow changes.
- No retries and no wider limits: a job too slow for its budget is a bug to fix or a budget to re-read from newer runs, in its own PR.
Owned paths
tools/ci-bench/budgets.py(new: reads p95, writes the table, checks the workflows)tools/ci-bench/budgets.tsv(new: one row per job)tools/ci-bench/test_budgets.py(new).github/workflows/ci.yml(shared: each job'stimeout-minutesline only).github/workflows/privacy.yml(shared: each job'stimeout-minutesline only).github/workflows/ci-bench.yml(shared: one step that runs the budget check and its tests)tools/ci-bench/README.md(shared: a new Budgets section only)
Relies on: nothing
Links
- CI: split the launch-fleet and release lanes into parallel shards (critical path ~22 min to ~11) #743 real: the sharded launch-fleet and release lanes, whose measured p95 sets their budgets
- Privacy scan rechecks unchanged files on every commit #761 real: the privacy scan with its blob cache, whose measured p95 sets Privacy's budget
Acceptance criteria
- The table is read from real runs after CI: split the launch-fleet and release lanes into parallel shards (critical path ~22 min to ~11) #743 and Privacy scan rechecks unchanged files on every commit #761 merged, and the PR shows each job's p95, sample count and new timeout.
- Every job in the CI and Privacy workflows has a row and a matching timeout.
- The check fails on a job with no row and on a mismatched timeout.
- One CI run after the change shows the new timeouts in use.
Proof
CI3-B: red first, the check on a workflow fixture with a job that has no budget and one with a wrong timeout; then the table from real runs and a run using it.
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified; an agent can take it once its blockers have merged
Activity
jparker2006 commentedon Nov 15, 2026
launch-fleet: start checked, branch room/782-ci3-c1-time-budgets
jparker2006 commentedon Nov 15, 2026
Builder question (C1, data window). I'm building
budgets.py, its check and its tests now. The first criterion has a gap: the table must come from real runs after #743 and #761 merged. #779 merged at 2026-11-15T23:33:42Z. Since then there has been 1 completedci.ymlrun (amain-lightpush) and 1privacy.ymlrun. Before the merge,ci.ymlran about 16 times an hour.Some jobs run rarely, so even 150 post-merge runs leave them with few or no samples:
toolkit-nightlyruns once a night, and traced/planted runs are the nightly run plus PRs that touch the tracer orplanted.py.Options:
Recommendation: A. None of the rare jobs (
toolkit-nightly, traced/planted lanes, which use one shard) changed shape in #743 or #761. Until this is answered I'll push the script, check and tests, red first. I won't hand back until the table is read.jparker2006 commentedon Nov 15, 2026
launch-fleet: asked the orchestrator
The builder's data-window question (options A, B and C, recommending A): #782 (comment)
jparker2006 commentedon Nov 15, 2026
Orchestrator ruling: option A. Read the table from the default 150 completed runs per workflow after #743 and #761 merged (after 2026-11-15T23:33:42Z). A job or mode with fewer than 5 samples in that window is read from its own last 150 runs with no start bound, and its row states that window and its sample count. This keeps criterion 1 for every job whose shape the two merges changed and is honest about the rare ones; it changes no interface or scope. Push the script, check and tests now, red first, and hand back once the table is read. If any rare job turns out to have changed shape in #743 or #761, say so and ask again before reading it from the older window.
jparker2006 commentedon Nov 15, 2026
Builder question 2 (C1, exact path).
.github/workflows/ci-bench.ymlruns on pull requests that change.github/workflows/ci.yml, but not on ones that change.github/workflows/privacy.yml. So a Privacy job could get a new or wider timeout without the budget check running. I own one step in that file. The smallest fix is one more line underon.pull_request.paths:- '.github/workflows/ci.yml' + - '.github/workflows/privacy.yml' - '.github/workflows/ci-bench.yml'Options: A. widen my
ci-bench.ymlownership to this one line. B. leave it out and record it as a gap in the PR. Recommendation: A. Without it, the third criterion holds for Privacy only when some other bench path changes in the same PR.jparker2006 commentedon Nov 15, 2026
launch-fleet: asked the orchestrator
The builder's question 2, widening its
.github/workflows/ci-bench.ymlownership by one paths line (a workflow file, so not a delegated grant): #782 (comment)jparker2006 commentedon Nov 15, 2026
Orchestrator ruling: question 2, option A granted. Add the one line
.github/workflows/privacy.ymltoon.pull_request.pathsin.github/workflows/ci-bench.yml, nothing else in that workflow. A workflow change is pushed as Jake's account, not the App. Record the grant in the PR's Facts.jparker2006 commentedon Nov 15, 2026
Builder question 3 (C1, rare jobs whose shape changed). As the ruling asked, I'm raising this before reading the table. #743 (merge
126dca1) changed the shape of threeci.ymljobs that run only when a PR touches their paths, so they may have fewer than 5 samples among the first 150 post-merge runs:release: now a 3-shard matrix (release (1..3)). Before, it was one job.launch-fleet: a new 4-shard job. Before, it was theskills (launch-fleet)leg.skills: lost its slowest leg (launch-fleet) and itsmatrix.skill == 'launch-fleet' && 60 || 30timeout.#761 (merge
23f3080) changed no workflow line. Privacy runs on every PR, so it won't need the fallback.Falling back to runs from before the merge would give these three jobs budgets based on the old shape: wider for
releaseandskills, and no samples at all forlaunch-fleet, whose job name didn't exist before.Options:
Recommendation: A. Only post-merge runs are this shape. The script, check and tests are pushed on
room/782-ci3-c1-time-budgets. No PR yet: I hand back once the table is read.jparker2006 commentedon Nov 15, 2026
launch-fleet: asked the orchestrator
The builder's question 3, the fallback window for
release,launch-fleetandskills, whose shape #743 changed: #782 (comment)#782: run the bench workflow on privacy.yml changes (granted on #782)
11 remaining items
#782: derived and unmeasured row proofs, red first
#782: derived and unmeasured rows; old-shape runs proof, red first
jparker2006 commentedon Nov 16, 2026
Builder question 5 (C1, exact paths: three tests pin the old timeouts). The table is read and applied, as ruled on question 4. There are 23 rows, and every changed line in
ci.ymlis atimeout-minutesline;privacy.ymlwas already 5.Three existing tests outside my owned paths assert the old 60/90/30 values, so CI and the pre-push hook fail. The applied commit is local. The branch is pushed up to the commit before the change.
.github/actions/docs-only/test_toolkit.py:51rustandrust-exportkeepplanted == 'true' && 90 || 60.github/actions/docs-only/test_workflow.py:66-70(test_launch_fleet_retains_the_legacy_rust_suite_budget)launch-fleet60,skills30,release60.github/workflows/ci.test.mjs:44-61(Rust and web lanes allow 90 minutes only when the plan plants)rust: planted="true", 56 !== 90Each pins a value that
budgets.tsvand its check now own. Updating each to the new numbers would copy the table's inventory into three more places, which the test rule (#687) forbids.Smallest change I propose: delete only the timeout assertions and keep the rest of each test.
test_toolkit.py: delete line 51, the oneassertIn(" timeout-minutes: ...")line in the loop.test_workflow.py: deletetest_launch_fleet_retains_the_legacy_rust_suite_budget(5 lines). Its only claim is the timeouts.ci.test.mjs: in that test, delete thetimeoutlookup and the planted loop (lines 52-59). Keep the job-exists,needsandplantedoutput assertions, and rename the testRust and web lanes read the plan's planted output.The budget check already fails on a lane whose traced or normal timeout differs from its row (
test_traced_and_normal_budgets_are_each_checked), so nothing loses coverage.Options: A. grant those three exact edits. B. update the expected values in place instead (three copies of the table). Recommendation: A.
One more fact for the record, already handled inside my owned paths. Two runs created after 23:33:42Z, both
pull_request, still ran the old workflow: nolaunch-fleetjob, an unshardedreleaseand askills (launch-fleet)leg. Counted, they would have setskillsat 44 minutes andreleaseat 37. For the three shape-changed jobs, a run now counts only if it lists every job of today's workflow (148 runs). That givesskills5,release21 andlaunch-fleet14. It was proved red first.jparker2006 commentedon Nov 16, 2026
launch-fleet: asked the orchestrator
The builder's question 5, deleting three old-timeout assertions outside #782's paths (one under
.github/workflows/), which J110's allowance does not cover: #782 (comment)jparker2006 commentedon Nov 16, 2026
Orchestrator ruling: question 5, option A granted. Make exactly the three edits described: delete the one timeout assertion line in
.github/actions/docs-only/test_toolkit.py; deletetest_launch_fleet_retains_the_legacy_rust_suite_budgetintest_workflow.py; and in.github/workflows/ci.test.mjsdelete only the timeout lookup and the planted loop, keeping the job-exists,needsandplantedoutput assertions and renaming the test as proposed. Each deleted assertion pins a valuebudgets.tsvand its check now own, so the pull request names its keeper for each (test_traced_and_normal_budgets_are_each_checked), as the test rule requires.ci.test.mjsis a test file, not a workflow, so it is pushed as usual. Record the grant in Facts.#782: count only current-shape runs for shape-changed jobs; the table…
#782: drop the three pinned-timeout assertions (granted, Q5); README …
#782: green: merge main; CI and Privacy budgets read from real runs, …
#782: R1 and R2 proofs, red first
#782: green: mode from every trace step, unclear runs left out (R1); …
jparker2006 commentedon Nov 16, 2026
launch-fleet: archived