v0.1.24: Change default overage policy and cap behavior#16
Merged
Conversation
…olicy ALLOW_IF_AVAILABLE commits now always succeed by capping the overage delta to available remaining budget instead of rejecting with BUDGET_EXCEEDED. When capped, scopes are marked is_over_limit=true to block future reservations. Changes default overage policy from REJECT to ALLOW_IF_AVAILABLE. Updates is_over_limit and CommitResponse.charged descriptions. Adds v0.1.24 changelog entry. https://claude.ai/code/session_01WeUFfwYKWvpCXPUYsZLqUa
The ALLOW_IF_AVAILABLE description for events still said "MUST return 409 BUDGET_EXCEEDED" — contradicting the v0.1.24 spec which says events always succeed with capped charge. Also removed stale "(default)" from REJECT label. https://claude.ai/code/session_01WeUFfwYKWvpCXPUYsZLqUa
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.
Summary
This release introduces breaking changes to the Cycles Budget Authority API's default overage policy and commit behavior. The default
CommitOveragePolicyis changed fromREJECTtoALLOW_IF_AVAILABLE, and theALLOW_IF_AVAILABLEpolicy now caps charges to available budget instead of rejecting commits.Key Changes
BREAKING: Default overage policy changed from REJECT to ALLOW_IF_AVAILABLE
overage_policy: REJECTALLOW_IF_AVAILABLE commit behavior redesigned
estimate + capped_deltais_over_limit=true, blocking future reservations until reconciledExtended is_over_limit semantics
ALLOW_IF_AVAILABLEwhen overage delta is capped, in addition to existingALLOW_WITH_OVERDRAFTdebt scenariosUpdated CommitResponse.charged documentation
chargedmay be less thanactualwhenALLOW_IF_AVAILABLEcaps the overage deltacharged = estimate + capped_deltain capping scenariosUpdated ApplyEventRequest documentation
ALLOW_IF_AVAILABLEImplementation Details
The changes maintain backward compatibility at the protocol level while introducing a more lenient default behavior. The atomic operation guarantee is preserved for the charge operation itself, but the delta amount may be reduced to fit available budget. The
is_over_limitflag now serves as a unified indicator for both overdraft scenarios and budget-capped scenarios, providing a consistent mechanism for blocking future reservations.https://claude.ai/code/session_01WeUFfwYKWvpCXPUYsZLqUa