Repository navigation
fix(cli): advise the call cap the operator ceiling enforces - #1254
Conversation
`plan` builds `next: --max-calls N` from the structural bound and the spec's declared cap, but never consults `AGENTDESCENT_MAX_CALLS`, which `runstore.launch` (and the MCP `start`) clamps to: with a 2-call ceiling the advice names 11 and the first run it recommends stops at 2. The MCP face is the Ticket remainder: a spent Ticket made `plan` answer `ok: true` with `max_calls: 0` while `start` refused in one sentence. Red at 22ea752: 5 failed, 3 controls passed.
`plan` sized `--max-calls` from the structural bound and the spec's declared cap only, so with `AGENTDESCENT_MAX_CALLS=2` it advised 11 calls for a run `runstore.launch` clamps to two. Name the smallest of those two and the enforced ceiling, and say in `warnings` which number the ceiling enforces; a malformed ceiling is the config answer `evolve` would raise. The MCP face: a spent Ticket makes `plan` answer with `start`'s own refusal instead of `ok: true` with `max_calls: 0`. Enforcement, the estimate and every stop reason are untouched.
…ecessary `_advised_cap` returns before the dollar case, so the declared number it reads is always an int; spell that with the min() instead of a directive this repo does not run.
|
State change in this turn: Live head
One correction to the body, which follows in a separate append-only edit by its author: the plan/CLI family is 128 passed, not 136 — The body's |
|
Review request at head
No UI surface: |
|
Body edit, no push: the plan/CLI family bullet names seven files and reports |
|
Body edit, no push. The |
|
Review (Birfy) Tip SHA: 29b2a1e
|
Fixes #1252.
What changed
plan'snext:and--json.nextnow 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-callAGENTDESCENT_MAX_CALLSceiling no longer produces--max-calls 11withwarnings: []; when the ceiling lowers the advice,warningssays so (AGENTDESCENT_MAX_CALLS=2 caps this run at 2 calls; the plan estimates 11), and a malformed ceiling is the config answerevolvewould raise instead of a traceback. The MCP face: a spent Ticket makesTools.planrefuse instart's exact sentence and bytes, instead of answeringok: truewithmax_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 ownnext:(the issue names theplansurface) and any change to what is enforced.Draft:
#1238and#1250are the two ready PRs in the owner-click queue.Verification at the tip
Tip SHA: 7917e76
Ran:
22ea7528915a761c579dc4c7f47d8444c159cd8a: newtests/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 fix(cli): plan's next line must not raise a cap the spec already set #1219 rows)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)test_mcp_ticket_cap,test_mcp_call_limit,test_mcp_ticket_remainder_label,test_operator_run_cap,test_mcp) withtest_changelog_fragmentsandtest_api_reference→ pass (164 passed)python -m tools.changelog_fragments check→ 33 changelog fragment(s) OKpython -m tools.gen_api_docs --check→ docs/api.md is up to datepytest -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.py12,test_era_srbench.py6,test_genesis_example.py2,test_wheel_smoke.py1), the same set the base run produces, and none of them touchcli.py,mcp.pyor the new test fileNot run:
mkdocs build --strict→ not applicable (no docs change)Correction (appended; tip unchanged)
The plan/CLI family bullet above names seven files and reports
136 passed; those seven files alone are128. The136was the same run with the new file's8rows added, so the bullet countedtests/test_plan_advice_ceiling.pya 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 request7129820256named the live head29b2a1ec3e9fb9f07da0f68f02606ee624898ba9. The plan/CLI family bullet's136is those seven files'128plus the new file's8;--collect-onlygives 128 at both7917e762and29b2a1ec. Every other number and section stands as written.