Repository navigation
Conversation
…1196) The row that pinned the tool's sentence by comparing it with the helper's default proved uniformity, not either surface's text. Every surface now gets a literal: the CLI flag sentence through cli.main, the tool's argument sentence (whole), and the field alone for a Python caller.
…1196) build_call_limit's hint default is now surface-neutral, because runstore.launch and execute reach it from Python where neither a flag nor a tool argument is actionable. The CLI passes CLI_CAP_HINT and the MCP tools pass theirs; the two docstrings say that the reason is shared and the hint is per surface.
|
Advisory QA read — #1199 at Read live at that head ( Ran (fresh clone, fetched
Probes at the tip, one per surface (the point of the change):
Not run: docker sandboxes (no daemon on this box — the same 10 errors at both ends), wheel smoke (no packaging path), real-model / USD probe (offline box, the cap is arithmetic), Findings: none. No UI surface: refusal wording on the CLI, the MCP tools and the Python API; nothing is rendered. No merge action from QA: this report is advisory, the merge gate is the repo's review decision on the head sha, and the merge itself is executed by the repo's merge process. |
Fixes #1196.
What changed
An unpriced
max_usdwas refused withbuild_call_limit's CLI sentence onevery surface, so the MCP
plan/starttools and a Pythonrunstore.launch/executecaller were told to pass--usd-per-call— a flagneither of them can pass.
evolvespec.build_call_limitgrows a keywordusd_hintwhose default is anew surface-neutral
NEUTRAL_CAP_HINT(set usd_per_call beside it); thereason text and the point of refusal are unchanged.
CLI_CAP_HINT(pass --usd-per-call on the command line) stays a namedconstant and is now passed by
cli.pyat theevolverun-options call site,so the CLI sentence is byte-identical through
cli.main.mcp._call_limit_payloadpassesusd_per_call in the same tool call, so ahost reads the argument it can actually send in that call.
runstore.pyis not touched (zero diff): it inherits the neutral default,which is what a keyword caller needs, and it cannot drift back because it
passes no hint.
was typed" now say the reason is shared and the actionable hint is per
surface.
The refusal still happens before
create/launch: a refusedstartleavesruns == [].Diffstat:
6 files +126/−34—agentdescent/cli.py8,agentdescent/evolvespec.py23,agentdescent/mcp.py14,changelog.d/1196-unpriced-cap-hint.md6,tests/test_max_usd_refusal_hint.py86,
tests/test_mcp_call_limit.py23;agentdescent/runstore.pyzero.Verification at the tip
Base:
8d75685aecdecb9a93056d8abee661b827a83c28Tip SHA:
22c717dabc9abd8189b1c74336410e27ff98b85cRan:
8d75685a, clean worktree,only this branch's two changed test files:
PYTHONPATH=$PWD pytest -o addopts='' -p no:cacheprovider -q tests/test_max_usd_refusal_hint.py tests/test_mcp_call_limit.py→
3 failed, 12 passed in 9.03s:test_a_tool_refusal_names_the_argument_it_can_pass,test_a_python_caller_is_told_to_set_the_field_not_a_flag,test_the_default_hint_names_no_surface. The CLI row passes at base bydesign (it pins today's CLI text).
PYTHONPATH=$PWD pytest -o addopts='' -p no:cacheprovider -q tests/test_max_usd_refusal_hint.py tests/test_mcp_call_limit.py tests/test_budget_guard.py tests/test_operator_run_cap.py→
38 passed.PYTHONPATH=$PWD pytest -o addopts='' -p no:cacheprovider -q tests/test_mcp*.py tests/test_changelog_fragments.py tests/test_plan_text_output.py tests/test_plan_headroom_shape.py tests/test_runstore_cli.py tests/test_budget_guard.py tests/test_operator_run_cap.py→
292 passed.PYTHONPATH=$PWD pytest -q tests/test_changelog_fragments.py→45 passed.PYTHONPATH=$PWD python -m tools.gen_api_docs --check→docs/api.md is up to date.PYTHONPATH=$PWD python -m tools.changelog_fragments check→9 changelog fragment(s) OK.9db1a14e(that tip tree minusonly the fragment paragraph)
21 failed, 7929 passed, 51 skipped, 10 errors in 2008.20s; in a clean clone at050235a421 failed, 7924 passed, 53 skipped, 10 errors in 1861.11s.common the failed/error idsboth ways: 31 ids each,
0 tip-only / 0 main-only(docker sandbox,era_srbench and env-class
OSError/MemoryErroronly). The skip delta isthe checkout shape: the baseline ran in a linked worktree, where
.gitisa file, so the two
tests/test_repo_hygiene.pyrows skip there — the onlyreason for 51 vs 53, and
7924 + 4 + 2 − 1 = 7929.git diff --name-only 050235a4..8d75685aisAGENTS.md,.github/scripts/controller.py,.github/workflows/controller.yml,tests/test_process_controller.py,tests/test_process_controller_draft.py,changelog.d/1187-controller-pr-trigger.md,changelog.d/1192-draft-skip.md; this branch's six files areagentdescent/cli.py,agentdescent/evolvespec.py,agentdescent/mcp.py,changelog.d/1196-unpriced-cap-hint.md,tests/test_max_usd_refusal_hint.py,tests/test_mcp_call_limit.py— theintersection is empty, so the measured suite pair still stands.
Not run:
mkdocs build --strict— docstrings only; neither symbol is indocs/api.md, andgen_api_docs --checkreports it up to date; CI runsstrict.