Repository navigation
fix(evolvespec): name the spec field an unpriced dollar cap needs - #1185
Merged
Merged
Conversation
) A spec whose `evolve` block set `max_usd` without `usd_per_call` was refused with "pass --usd-per-call on the command line", which cannot help: `compose` refuses the spec before `cmd_evolve` reads its own flag, so the flag produced the same sentence at the same exit code. The refusal now names `evolve.usd_per_call`, the field the author can actually add. The three knobs are validated into locals before the pair is judged, so a non-numeric `max_usd` still reports "not a number" rather than the pair message. `build_call_limit` and the CLI/run-store wording are unchanged.
HugoXK
marked this pull request as ready for review
November 20, 2026 11:29
Collaborator
Author
|
Advisory read at T2 by path ( Tip SHA: d7200ef
Findings — none on the code. The probes I ran myself at the tip:
Two record items, yours to decide:
No UI surface: a spec-validation sentence; nothing rendered changes. |
Collaborator
|
Review (Birfy) Tip SHA: d7200ef
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1183.
What changed
agentdescent/evolvespec.py(_limit_from_knobs): the three knobs are validated into locals through_cap_valuefirst, then an unpricedmax_usdis refused withevolve.max_usd needs evolve.usd_per_call beside it: a dollar cap cannot be charged without a per-call price.build_call_limitis untouched, so the CLI and run-store wording stays exactly as shipped in feat(run): stop a worker run on max_calls / max_usd at the call (#1166) #1167.tests/test_max_usd_refusal_hint.py: the unpriced spec is refused atcomposeand throughcli evolve(exit 2, same field named, no run store created), and a priced spec still composes with both numbers. The ordering is pinned by the existingtest_a_non_numeric_max_usd_is_refused_with_the_field_named, which still gets "not a number".changelog.d/1183-unpriced-spec-usd.md.Red first at
f5017f93with only the new test file in the tree:1 failed, 1 passed--tests/test_max_usd_refusal_hint.py::test_an_unpriced_spec_dollar_cap_names_the_spec_field,assert 'evolve.usd_per_call' in 'max_usd needs usd_per_call: a dollar cap cannot be charged without a per-call price (pass --usd-per-call on the command line)'.Tip SHA:
d7200efa3bf478dd55b08f9613588dca82cefd18Ran:
ls tests/test_*.py(513 files),PYTHONPATH=. pytest -o addopts="" -p no:cacheprovider -q: 7917 passed, 20 failed, 10 errors, 51 skipped.test_sandbox_container.pyerrors, plustest_apply_noop,test_dir_evolution,test_era_srbench,test_genesis_example,test_integrations,test_skill_dir_example,test_skill_library_*). The base comparison was run on the same nine files at pristinef5017f93, in a separategit worktreeof the same clone, as one directpytestover those nine paths (not the shardedchunk$iloop):PYTHONPATH=. python -m pytest tests/test_apply_noop.py tests/test_dir_evolution.py tests/test_era_srbench.py tests/test_genesis_example.py tests/test_integrations.py tests/test_sandbox_container.py tests/test_skill_dir_example.py tests/test_skill_library_apply_install.py tests/test_skill_library_example.py -o addopts="" -p no:cacheprovider -q-> 20 failed, 437 passed, 15 skipped, 10 errors, anddiffof the two sorted id lists is empty: the same 30 ids, line for line, at the base and at this tip.tests/test_max_usd_refusal_hint.py tests/test_budget_guard.py tests/test_budget_round_warning.py tests/test_evolvespec.py tests/test_budget.py tests/test_call_budget.py tests/test_run_verbs_json_spec_error.py: 125 passed.python -m tools.gen_api_docs --check: up to date.python -m tools.changelog_fragments check: OK.Not run:
mkdocs build --strict-- nodocs/ormkdocs.ymlchange, so the docs build is not in scope for this diff.