Repository navigation
Spend ceiling that sees everything: a global automation.maxCostUsdPerDay applies across repositories alongside per-repo - #867
Merged
Conversation
… 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.
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.
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.tsPlan: .claude/auto-plan.md (local to the run).