Skip to content

fix(auth-files): prevent stale Codex quota status - #239

Merged
seakee merged 1 commit into
mainfrom
fix/codex-quota-status-freshness
Jun 25, 2026
Merged

seakee merged 1 commit into
mainfrom
fix/codex-quota-status-freshness

Conversation

@seakee

@seakee seakee commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Fix stale Codex quota status handling in the auth files view.
This prevents older inspection or usage-header signals from continuing to show an account as quota-limited after fresher quota data says it is available.

Scope

  • Frontend panel
  • Manager Server
  • CPA panel mode
  • Full Docker mode
  • Native packages / release
  • Docs / Wiki
  • CI / build / tooling

Changes

  • Scope Codex quota state by auth file identity and auth index to avoid same-file account state reuse.
  • Suppress older Codex inspection and usage-header quota sources when fresher quota or header data exists.
  • Use reached-window usage percentages to avoid showing 5h, weekly, or monthly quota-limited states when the reported window is below 100%.
  • Add regression tests for stale source suppression, same-file auth index isolation, inline quota rendering, and header reached-window percentages.

User Impact

Users should no longer see fresh, available Codex quota incorrectly displayed as 5h, weekly, monthly, or observed quota-limited because of stale inspection or header data.

Compatibility / Runtime Notes

  • CPA panel mode: Frontend-only behavior change; no API or config changes.
  • Manager Server mode: Existing inspection data is still used, but stale results are suppressed when fresher account-specific quota/header data exists.
  • Full Docker / native packages: No packaging or runtime config changes.

Data / Security Notes

N/A. No SQLite, key storage, auth secret, log, raw usage, or plugin data changes.

Risk / Rollback

Risk level: Low

Rollback notes:

  • Revert this commit to restore the previous quota status source precedence and store-key behavior.

Verification

  • Type check
  • Lint
  • Tests
  • Build
  • Manual UI check
  • Docs/link check
  • Not applicable, docs-only

Commands / evidence:

npm run type-check
npm run lint
npm run test
npm run build

Screenshots / Recordings

N/A. Verified with automated frontend checks; no manual UI capture was taken.

Docs

  • README updated
  • Wiki updated
  • Release notes needed
  • Not needed

Related

N/A

Scope Codex quota state by auth file identity and auth index so shared filenames cannot reuse stale or mismatched quota results.

Suppress older Codex inspection and usage-header quota signals when fresher quota or header data exists, including conflicting window usage below 100%.

Add regression coverage for stale status suppression, same-file auth index isolation, inline quota rendering, and reached-window percentage handling.
@seakee
seakee merged commit 4cf89cd into main Jun 25, 2026
4 checks passed
@seakee
seakee deleted the fix/codex-quota-status-freshness branch June 26, 2026 00:59
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