feat(codex): report account usage #3

Merged
eleith merged 2 commits from feat/codex-usage into main 2026-10-31 14:18:47 +00:00

Status

Ready for owner review. The readability revision is included in the amended second commit; the PR still has two commits. No further commits are currently planned. Merge after owner review and green CI on the amended tip.

Changes

  • f2908c9: bounded account-usage client using Pi's existing legacy Codex OAuth; no new login or token storage.
  • 1eefafa: /eleith:codex usage, conservative quota/credit/reset reporting, lifecycle cancellation and the readability revision.
  • Fixed official endpoint, 10-second operation deadline, 1 MiB decoded response limit, safe credential routing, abandoned-body cleanup and sanitized errors.
  • Reports supplied quota windows, resets, review/additional buckets, optional credits and explicit restrictions. Unknown or expired data never fabricates fresh allowance.
  • Honors Retry-After and suppresses superseded/late reports. No model-context insertion, model turns or background polling.

Readability revision

  • Client entry point coordinates auth and HTTP under one deadline; HTTP responses and bounded stream readers each have a clear owner.
  • Shallow response recognition is separate from report layout; additional-bucket rendering has one cohesive boundary.
  • SDK scenario comes first, with response/endpoint expectations visible; offline runtime and extension-session setup are separate named stages.
  • Delivery guard naming makes the stale-context rule explicit; an exact report assertion preserves layout.

Reviews and checks

  • Fresh independent code and readability reviews covered the entire resulting PR, not only the latest edits. No material findings.
  • Readability review explicitly mapped responsibilities and abstraction boundaries across the client, formatter, controller and SDK scenario.
  • Repository: 1,019 tests pass across 63 files. Codex: 215 tests pass.
  • Build, lint, typecheck, repository formatting and staged diff checks pass.
  • Offline SDK regression verifies existing OAuth request headers, no credential writes/model turns, and no account-data transcript entry.

No docs, global reviewer instructions, duplicate-plugin safeguards, fast mode, dependencies, package version, publication or personal installation changes. Local verification is offline; remote CI is a separate merge gate. No npm release is needed to merge this PR.

## Status Ready for owner review. The readability revision is included in the amended second commit; the PR still has two commits. No further commits are currently planned. Merge after owner review and green CI on the amended tip. ## Changes - `f2908c9`: bounded account-usage client using Pi's existing legacy Codex OAuth; no new login or token storage. - `1eefafa`: `/eleith:codex usage`, conservative quota/credit/reset reporting, lifecycle cancellation and the readability revision. - Fixed official endpoint, 10-second operation deadline, 1 MiB decoded response limit, safe credential routing, abandoned-body cleanup and sanitized errors. - Reports supplied quota windows, resets, review/additional buckets, optional credits and explicit restrictions. Unknown or expired data never fabricates fresh allowance. - Honors Retry-After and suppresses superseded/late reports. No model-context insertion, model turns or background polling. ## Readability revision - Client entry point coordinates auth and HTTP under one deadline; HTTP responses and bounded stream readers each have a clear owner. - Shallow response recognition is separate from report layout; additional-bucket rendering has one cohesive boundary. - SDK scenario comes first, with response/endpoint expectations visible; offline runtime and extension-session setup are separate named stages. - Delivery guard naming makes the stale-context rule explicit; an exact report assertion preserves layout. ## Reviews and checks - Fresh independent code and readability reviews covered the entire resulting PR, not only the latest edits. No material findings. - Readability review explicitly mapped responsibilities and abstraction boundaries across the client, formatter, controller and SDK scenario. - Repository: 1,019 tests pass across 63 files. Codex: 215 tests pass. - Build, lint, typecheck, repository formatting and staged diff checks pass. - Offline SDK regression verifies existing OAuth request headers, no credential writes/model turns, and no account-data transcript entry. No docs, global reviewer instructions, duplicate-plugin safeguards, fast mode, dependencies, package version, publication or personal installation changes. Local verification is offline; remote CI is a separate merge gate. No npm release is needed to merge this PR.
eleith-gitea-agent Bot added 1 commit 2026-10-31 04:05:55 +00:00
feat(codex): add bounded account usage client
ci/woodpecker/pr/codex Pipeline was successful
f2908c9cdf
eleith-gitea-agent Bot marked the pull request as ready for review 2026-10-31 13:41:36 +00:00
eleith-gitea-agent Bot marked the pull request as work in progress 2026-10-31 14:02:53 +00:00
eleith added 1 commit 2026-10-31 14:13:49 +00:00
feat(codex): report account usage
ci/woodpecker/pr/codex Pipeline was successful
ci/woodpecker/push/codex Pipeline was successful
1eefafa375
eleith force-pushed feat/codex-usage from c7035fde09 to 1eefafa375 2026-10-31 14:13:49 +00:00 Compare
eleith-gitea-agent Bot marked the pull request as ready for review 2026-10-31 14:14:31 +00:00
eleith merged commit 1eefafa375 into main 2026-10-31 14:18:47 +00:00
eleith deleted branch feat/codex-usage 2026-10-31 14:18:47 +00:00
Sign in to join this conversation.