Skip to content

Fail closed on unavailable Codex quota permission - #4

Merged
marzouca merged 2 commits into
mainfrom
codex/quota-permission-null-20261031
Oct 31, 2026
Merged

marzouca merged 2 commits into
mainfrom
codex/quota-permission-null-20261031

Conversation

@marzouca

@marzouca marzouca commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Fail closed when a present ordinaryUsageAllowed value is null or malformed; only JSON true confirms availability.
  • Reject duplicate JSON object keys so conflicting quota permissions cannot be accepted through last-value parsing.
  • Preserve compatibility with older exports and sparse notifications that omit the permission field.
  • Shut down and join the GUI test server before closing its socket; close the socket even when the bounded join assertion fails.
  • Refresh compatibility and research notes against the current Codex account protocol.

The Codex app-server account schema defines this permission as nullable; null means unavailable, and clients must not infer recovery from percentages or reset times.

Verification

  • python -m unittest discover -s tests -v: 87 tests run, zero failures, 3 environment-gated skips (real install opt-in, usable WSL Bash unavailable, native symlink unavailable).
  • python -m unittest discover -s tests -p test_reliability.py -k app_server -v: 8 passed.
  • git diff --check: passed.
  • Exact-head GitHub CI at e81e80e411670a90c6cd9f44c9038e4e8a3857c0: 12/12 matrix jobs passed across Ubuntu, macOS, and Windows on Python 3.10 and 3.14.
  • Independent read-only review of the changed parser and teardown code: no blocking defects; the failure-path socket cleanup was updated from the review.

@marzouca
marzouca marked this pull request as ready for review October 31, 2026 09:09
@marzouca
marzouca merged commit 2987732 into main Oct 31, 2026
12 checks passed
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