You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A run-level cost limit, so hosts don't watch events to enforce one #266
A host that wants to cap what one program run spends has to watch Imp.Run's events from outside and cancel the run when the total crosses its limit. Dwell does exactly that for its per-turn spend cap. Any Imp program could want the same limit, so it belongs on the run itself: an option such as max_cost that ends the run with a clear outcome when the running total of cost (or estimated_cost where there's no charge) passes it. The run should also record which figure it counted.
Done when:
an Imp run with a cost limit stops at the limit and reports why;
the tests cover both a charged total and an estimated one;
a host such as Dwell can pass its limit in and delete its own watcher.
Triage, 2026-10-08: still open.Imp.Run has no run-level cost limit on main (b736d00). Dwell still enforces its per-turn spend cap and its daily cap (GroveResearch/delven#24, $5 per resident) by watching events from outside.
This matters for the residents' cost. GroveResearch/dwell#203 recorded one kimik3 turn that made 50 model calls for $1.04 after its reply was refused. GroveResearch/delven#29 found the daily cap refusing 43–71% of wakes for four residents. Spend caps are frozen until harness v2 is measured (GroveResearch/delven#31), so this belongs after that release.
Activity
deepfates commentedon Oct 8, 2026
Triage, 2026-10-08: still open.
Imp.Runhas no run-level cost limit on main (b736d00). Dwell still enforces its per-turn spend cap and its daily cap (GroveResearch/delven#24, $5 per resident) by watching events from outside.This matters for the residents' cost. GroveResearch/dwell#203 recorded one kimik3 turn that made 50 model calls for $1.04 after its reply was refused. GroveResearch/delven#29 found the daily cap refusing 43–71% of wakes for four residents. Spend caps are frozen until harness v2 is measured (GroveResearch/delven#31), so this belongs after that release.