Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,8 @@ def spent(since=None):
|
||||
|
||||
|
||||
def check_budget():
|
||||
limit = float(os.environ.get("BUDGET_LIMIT_USD", "45"))
|
||||
# BUDGET_RESERVE_USD: ledger USD kept back (second teacher test later); the guard stops at limit - reserve
|
||||
limit = float(os.environ.get("BUDGET_LIMIT_USD", "45")) - float(os.environ.get("BUDGET_RESERVE_USD", "0"))
|
||||
s = spent()
|
||||
if s >= limit:
|
||||
raise BudgetExceeded(f"cycle spend {s} USD >= limit {limit} USD")
|
||||
|
||||
Reference in New Issue
Block a user