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
fix(budget): release budget headroom when go's price guard refuses before buying #124
Since #123 (mcp#117), the EC2 RI tool passes the approved upfront, so go#611's guard runs. When that guard refuses an offering, the error comes back after the purchase call. Under the existing rule (any error after the purchase call counts as spent), the amount still counts against CUDLY_MCP_BUDGET_USD. With CUDLY_MCP_BUDGET_STATE set, that headroom never comes back, even after a restart. It never overspends, but each refusal permanently shrinks the operator's budget.
Fix: cloud-commitments-go exports a typed "refused before buying" error (wrapping the guard's refusal), and the MCP budget releases the reservation for it. Tests at the guard's refusal and at a real post-call failure.
Activity
feat(common): add ErrRefusedBeforePurchase (#673)