feat(budget): make spend budget the sole run limiter #101

Merged
salmaelsoly merged 8 commits from development_unify_budget_limit into integration 2026-06-11 08:43:36 +00:00
Member

Summary

Removes agent step/iteration limiting entirely and makes the spend budget the single execution limiter.

Closes #98

Changes

  • resolve_iteration_budget always returns an unbounded ceiling, so the agent loop and subagents are never stopped by an iteration/step count. The iteration machinery remains for telemetry only.
  • max_iterations / hard_max_iterations, and the duplicate per-job budget fields (per_job_usd, per_job_max_calls, autonomy.job_budget_usd), are deprecated no-ops kept parseable for backward compatibility.
  • job.start refuses a run when no spend budget is configured (the only thing that bounds a run now), with the HERO_SHRIMP_BUDGET_OVERRIDE=1 escape hatch. default.yml ships budget.daily_usd: 5.0 so runs stay bounded out of the box.
  • The per-call spend cap and the job-start gate read the live global config, so a budget edited from the UI takes effect without a daemon restart.

Test Results

  • runtime + engine + server-lib: cargo check and cargo clippy -- -D warnings clean.
  • hero_shrimp_runtime: 559 tests passed; hero_shrimp_engine: 1665 tests passed (incl. 2 new).
  • Full-workspace build is blocked only by pre-existing upstream dependency drift (hero_rpc_openrpc, herolib_core::base) unrelated to this change.
## Summary Removes agent step/iteration limiting entirely and makes the spend budget the single execution limiter. ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_shrimp/issues/98 ## Changes - `resolve_iteration_budget` always returns an unbounded ceiling, so the agent loop and subagents are never stopped by an iteration/step count. The iteration machinery remains for telemetry only. - `max_iterations` / `hard_max_iterations`, and the duplicate per-job budget fields (`per_job_usd`, `per_job_max_calls`, `autonomy.job_budget_usd`), are deprecated no-ops kept parseable for backward compatibility. - `job.start` refuses a run when no spend budget is configured (the only thing that bounds a run now), with the `HERO_SHRIMP_BUDGET_OVERRIDE=1` escape hatch. `default.yml` ships `budget.daily_usd: 5.0` so runs stay bounded out of the box. - The per-call spend cap and the job-start gate read the live global config, so a budget edited from the UI takes effect without a daemon restart. ## Test Results - runtime + engine + server-lib: `cargo check` and `cargo clippy -- -D warnings` clean. - hero_shrimp_runtime: 559 tests passed; hero_shrimp_engine: 1665 tests passed (incl. 2 new). - Full-workspace build is blocked only by pre-existing upstream dependency drift (`hero_rpc_openrpc`, `herolib_core::base`) unrelated to this change.
feat(budget): make spend budget the sole run limiter
Some checks failed
Verify / verify (push) Failing after 17s
Verify / verify (pull_request) Failing after 14s
6aef46479d
Remove agent step/iteration limiting entirely and make the spend budget
the only execution limiter:

- resolve_iteration_budget always returns an unbounded ceiling, so the
  agent loop (and subagents) are never stopped by an iteration count
- max_iterations/hard_max_iterations and the duplicate per-job budget
  fields (per_job_usd, per_job_max_calls, autonomy.job_budget_usd) are
  deprecated no-ops, still parsed for backward compatibility
- job.start refuses a run when no budget is configured (with the
  HERO_SHRIMP_BUDGET_OVERRIDE escape hatch); default.yml ships
  budget.daily_usd so runs stay bounded out of the box
- the per-call cap and the job-start gate read the live global config so
  a budget edited from the UI takes effect without a restart

#98
salmaelsoly force-pushed development_unify_budget_limit from 7477df9f8e to d5f7277f3d 2026-06-10 10:26:20 +00:00 Compare
salmaelsoly changed target branch from development to integration 2026-06-10 10:26:43 +00:00
fix(web): save budget with the main settings Save button
Some checks failed
Verify / verify (pull_request) Failing after 18s
Verify / verify (push) Failing after 1m5s
8324387134
#98
style: cargo fmt
Some checks failed
Verify / verify (push) Has been cancelled
Verify / verify (pull_request) Has been cancelled
e719fabf28
chore: drop local dev profile from Cargo.toml
All checks were successful
Verify / verify (pull_request) Successful in 9m40s
Verify / verify (push) Successful in 9m46s
0a2acc0b05
fix(web): budget save dirty-guard, budget-stop shows raise-budget only
All checks were successful
Verify / verify (push) Successful in 8m45s
Verify / verify (pull_request) Successful in 32m55s
f6e717a658
#98
salmaelsoly force-pushed development_unify_budget_limit from f6e717a658
All checks were successful
Verify / verify (push) Successful in 8m45s
Verify / verify (pull_request) Successful in 32m55s
to 919b61724f
All checks were successful
Verify / verify (push) Successful in 35m29s
Verify / verify (pull_request) Successful in 35m49s
2026-06-11 08:06:34 +00:00
Compare
salmaelsoly merged commit efcb9613aa into integration 2026-06-11 08:43:36 +00:00
salmaelsoly deleted branch development_unify_budget_limit 2026-06-11 08:43:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_shrimp!101
No description provided.