Skip to content

fix: pin quota reset targets and distinguish inspection failures - #477

Draft
bytemain wants to merge 2 commits into
SaladDay:mainfrom
bytemain:fix/reset-quota-target
Draft

bytemain wants to merge 2 commits into
SaladDay:mainfrom
bytemain:fix/reset-quota-target

Conversation

@bytemain

@bytemain bytemain commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Reset-credit previews could print confirmation commands that selected a different account or card, while credit-inspection failures looked like an empty balance. Resolve the managed account once, pin the account and selected card in the suggested command, and retain the app/provider/card for native-provider commands. Confirmation arguments are shell-quoted.

Distinguish unavailable or incomplete credit inspection from a verified empty balance. After a successful redemption, report a failed quota refresh explicitly so the user does not redeem another credit by mistake. JSON previews include the resolved account, and credit summaries carry an optional inspection error.

Validation: 41 quota tests and 3 auth regression tests in an isolated configuration directory; independent review with no findings. No live reset credits consumed. Whole-crate cargo fmt --check and diff whitespace checks pass. A follow-up formatting-only commit fixes the pre-existing formatting errors in src/cli/provider_quota.rs and src/services/coding_plan.rs; independent review confirmed no behavioral changes.

Follow-up to #475. No database schema changes.

Ferris added 2 commits September 30, 2026 17:42
Signed-off-by: Ferris <ferris@mail.build>
Signed-off-by: Ferris <ferris@mail.build>
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