Skip to content

Spend ceiling that sees everything: a global automation.maxCostUsdPerDay applies across repositories alongside per-repo - #867

Merged
unohee merged 1 commit into
mainfrom
goal/10-spend-ceiling-that-sees-everyt
Nov 3, 2026
Merged

unohee merged 1 commit into
mainfrom
goal/10-spend-ceiling-that-sees-everyt

Conversation

@unohee

@unohee unohee commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Milestone of an auto-claude run.

Check: (test -d node_modules || npm ci --prefer-offline --no-audit --no-fund) && grep -q "records cost from an attempt whose lease expired" src/automation/runLedger.costCircuit.test.ts && grep -q "global maxCostUsdPerDay trips across repositories" src/automation/runLedger.costCircuit.test.ts && grep -q "does not treat unknown-cost attempts as free" src/automation/runLedger.costCircuit.test.ts && npm run lint && npm run typecheck && npx vitest run src/automation/runLedger.costCircuit.test.ts src/automation/runLedger.test.ts src/core/config.test.ts

Plan: .claude/auto-plan.md (local to the run).

… too

Round-1 redteam B-F2 (L3/ops): the cost ceiling was per-repository opt-in,
read a missing cost as free (75% of 8,291 live attempts had none) and lost
the cost of any attempt whose lease expired before its result landed.

- runLedgerCost.ts: per-repository and daemon-wide daily ceilings
  (autonomous.spend.maxCostUsdPerDay); cost-less attempts count at
  spend.unknownAttemptCostUsd, else the 7-day mean of known costs, else $0.10.
- recordAttemptResult records the cost of a fenced-out result (the result
  itself stays unrecorded).
- doctor: "spend ledger" line with the unknown-cost share (read-only open).
- runLedger.ts shrinks (cost query moved out); config.ts, autonomousRunner.ts
  and durableRunCoordinator.ts keep their line counts.

Assumption: in-flight attempts count at the estimate too, so a burst of
parallel claims cannot outrun the ceiling before any cost is recorded.
@unohee
unohee merged commit 155a0dd into main Nov 3, 2026
8 checks passed
@unohee
unohee deleted the goal/10-spend-ceiling-that-sees-everyt branch November 3, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant