Repository navigation
ci(workflows): bound every job with timeout-minutes - #1238
Conversation
|
Ready-to-review evidence for this head, posted before the flip. Head read in this turn from
Diff against that base is exactly six paths, and nothing else: All nine inserted workflow lines are The branch carries Measured at this head:
No UI surface: the change is workflow YAML plus a test, and the PR body says so. |
|
@Birfy: review request for |
|
@Birfy: review request for Branch updated to the live main |
|
Review (Birfy) Tip SHA: f343c78
|
|
Body edit, no push: appending a correction — the branch stands on base |
|
Review (Birfy) Tip SHA: 90e71d8
|
|
@Birfy: review request for Main moved to |
Fixes #1252. ## What changed `plan`'s `next:` and `--json.next` now name the smallest of the structural bound, the spec's declared cap (#1219) and the call cap the run will actually enforce, so a 2-call `AGENTDESCENT_MAX_CALLS` ceiling no longer produces `--max-calls 11` with `warnings: []`; when the ceiling lowers the advice, `warnings` says so (`AGENTDESCENT_MAX_CALLS=2 caps this run at 2 calls; the plan estimates 11`), and a malformed ceiling is the config answer `evolve` would raise instead of a traceback. The MCP face: a spent Ticket makes `Tools.plan` refuse in `start`'s exact sentence and bytes, instead of answering `ok: true` with `max_calls: 0`. Reporting only — `estimate.agent_calls_upper_bound`, `call_limit`'s numbers, enforcement and every stop reason are untouched, and an uncapped plan's text and JSON do not change. Not a goal: `algorithms run`'s own `next:` (the issue names the `plan` surface) and any change to what is enforced. Draft: `#1238` and `#1250` are the two ready PRs in the owner-click queue. ## Verification at the tip Tip SHA: 7917e76 Ran: - red first at `22ea7528915a761c579dc4c7f47d8444c159cd8a`: new `tests/test_plan_advice_ceiling.py` → 5 failed, 3 controls passed (`assert 'agentdescent…--max-calls 11' == 'agentdescent…--max-calls 2'`) - `tests/test_plan_advice_ceiling.py` → pass (8 passed; 14 passed with the #1219 rows) - plan/CLI family (`test_plan_next_respects_spec_cap`, `test_plan_text_output`, `test_plan_probe`, `test_plan_headroom_shape`, `test_first_run_caps`, `test_cli_algorithms_run`, `test_demo`) → pass (136 passed) - Ticket/cap family (`test_mcp_ticket_cap`, `test_mcp_call_limit`, `test_mcp_ticket_remainder_label`, `test_operator_run_cap`, `test_mcp`) with `test_changelog_fragments` and `test_api_reference` → pass (164 passed) - `python -m tools.changelog_fragments check` → 33 changelog fragment(s) OK - `python -m tools.gen_api_docs --check` → docs/api.md is up to date - `pytest -q` (full suite at this tip) → `21 failed, 8085 passed, 51 skipped, 526 warnings in 2005.70s (0:33:25)`; the 21 are the four known environment files only (`test_sandbox_container.py` 12, `test_era_srbench.py` 6, `test_genesis_example.py` 2, `test_wheel_smoke.py` 1), the same set the base run produces, and none of them touch `cli.py`, `mcp.py` or the new test file Not run: - `mkdocs build --strict` → not applicable (no docs change) - wheel smoke / real-model check → not needed for a reporting-only change ## Correction (appended; tip unchanged) The plan/CLI family bullet above names seven files and reports `136 passed`; those seven files alone are `128`. The `136` was the same run with the new file's `8` rows added, so the bullet counted `tests/test_plan_advice_ceiling.py` a second time. Seven-file figure: `128 passed`. Every other number in the evidence block measures as written. Correction, closing the stale sha (append-only; nothing above changes): the `Tip SHA:` line above is not the reviewed head — review request `7129820256` named the live head `29b2a1ec3e9fb9f07da0f68f02606ee624898ba9`. The plan/CLI family bullet's `136` is those seven files' `128` plus the new file's `8`; `--collect-only` gives 128 at both `7917e762` and `29b2a1ec`. Every other number and section stands as written.
Fixes #1235
7 of the 12 jobs in
.github/workflows/*.ymldeclared notimeout-minutes, so they inherited GitHub's 360-minute default: a hung Pages deploy or OIDC exchange held a runner for six hours and read as a slow check rather than a stuck one (onpublish/publish-npm, while holdingid-token: write).Row per job, all twelve,
beforeread onmainatb4647375and re-confirmed unchanged ateb9acd5e(the branch is merged up to it):file:jobdocs.yml:builddocs.yml:deploygithub-pagesenvironmentpublish.yml:buildpublish.yml:publishid-token: writepublish-npm.yml:publishid-token: writetests.yml:testtests.yml:otel-wirecontroller.yml:plancontroller.yml:applylabels.yml:syncreview-gate.yml:reportrisk-tier.yml:reporttests.yml:testwas assigned 30 during review and raised to 45: a 30-minute bound cancels legitimate green runs, not hung ones. The three slowest greentest (3.9)legs:450029624764515955412145092006009Rule applied: bound ≥ ~1.4× the observed maximum, so ~42 min → 45.
tests/test_workflow_job_timeouts.pyfails on a job with no integertimeout-minutes, fails on any drift from the pinned table, and fails when a new job appears with no pinned row. The table covers all twelve jobs, including the five this PR does not change, so each failure names the file, the job, the pinned value and the value found, and marks rows outside this diff as(pre-existing value, not part of #1235's diff)— whoever edits another job sees why the table went red instead of a bare mismatch.The branch's first commit pinned 10/5/60/10 with a
tests/test_workflow_timeouts.pyof the same shape; those integers were replaced by the measured ones at40a4113f, which also removed that earlier test file, so the tip carries one test file, not two.Evidence at base
eb9acd5e:mainwith only the test file added:8 failed, 7 passed, and each of the seven names its own row, e.g..github/workflows/tests.yml job "test": expected 45 minutes, found None(same8 failed, 7 passedonb4647375before the branch was merged up)python -m pytest tests/test_workflow_job_timeouts.py -q -o addopts=""→15 passed;python -m pytest tests/test_changelog_fragments.py -q -o addopts=""→45 passed; the two files together →60 passed;python -m tools.changelog_fragments --root . check→32 changelog fragment(s) OK15is, frompython -m pytest tests/test_workflow_job_timeouts.py --collect-only -q→15 tests collected: 12test_timeout_value_is_pinned[...]row cases plus 3 helper tests (test_workflows_exist,test_every_job_declares_a_timeout,test_no_unpinned_jobs). That is a collection listing, not a sum of pass lines — the8 failed, 7 passedabove closes the same way: the presence test plus the 7 rows this PR changes fail, the 5 already-correct rows plus the 2 other helpers pass.No UI surface.
Every count above is a
pytestsummary line from the command printed beside it at this tip, not a sum.Tip SHA: f343c78
Ran:
python -m pytest tests/test_workflow_job_timeouts.py tests/test_changelog_fragments.py -q -o addopts="";python -m tools.changelog_fragments --root . check; fullpython -m pytest -q -o addopts=""at this tipNot run:
mkdocs build --strict(no docs change); the wheel smoke gate (CI runs it)Correction (appended; branch updated to main)
Live tip
90e71d8f653635a779850abd6813aaae6da1a8bf, base22ea7528915a761c579dc4c7f47d8444c159cd8a. The update was a merge commit that moved only the base onto live main; the diff is unchanged (6 files,+150/−0, as recorded above). This supersedesf343c78fe5c328d828518f47123517523fd19969for this head.