Skip to content

devlog: quota-window and backlog roadmap (260826) - #2644

Merged
lidge-jun merged 1 commit into
devfrom
codex/260826-quota-window-roadmap
Aug 26, 2026
Merged

devlog: quota-window and backlog roadmap (260826)#2644
lidge-jun merged 1 commit into
devfrom
codex/260826-quota-window-roadmap

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Docs-only roadmap for a seven-phase loop. No runtime change.

The unit exists because Codex re-introduced the 5-hour rate-limit window for Plus and Team while Pro stays weekly-only, and OpenCodex has two quota parsers that disagree about what a short window means. Proven live rather than inferred — identical upstream data, both parsers:

headers {primary 97% / 300 min, secondary 12% / 10080 min}
  parseUpstreamQuotaHeaders -> {"weeklyPercent":97}                                    ← wrong
  parseUsageQuota (WHAM)    -> {"shortPercent":97,"shortWindowSeconds":18000,"weeklyPercent":12}

parseUpstreamQuotaHeaders (quota.ts:344) has only a monthly-vs-else branch, so anything not explicitly monthly becomes weekly. The comment above its call site records the now-stale premise: "primary was the 5h window; it now carries weekly data for GPT plans." True while the window was gone; false again now.

The audit is the part worth reading. Three rounds with an independent reviewer turned a one-file plan into a two-file one. Fixing the parser alone would have moved routing headroom for a 5h-exhausted account from 0.03 to 0.88, because src/routing/quota.ts omits shortPercent and currently reads the burst value only by accident — through the very bug the fix removes. The bug is cancelling itself out, and a naive fix removes one half of the cancellation.

Round 1 returned FAIL with five blockers, all verified and folded; round 2 NEAR-PASS with four consistency findings, all fixed; round 3 PASS. Recorded in 001_audit_response.md, including one partial rebuttal about phase ordering.

Phase map

WP Doc Slice
wp1 010 Header parser learns the duration rule + the routing/quota.ts fold
wp2 020 Codex Spark hidden by default, behind a Codex Auth switch
wp3 030 #2406 CommandCode image capabilities
wp4 040 #1215 OpenCodex-scoped noProxy
wp5 050 #1060 CommandCode billing-period end
wp6 060 Evidence-backed closures (#2442, #2423, #2060, PR #1769, PR #2215)
wp7 070 Backlog triage devlog

Verification

  • bun test tests/repo-hygiene.test.ts — 11 pass, 0 fail
  • No files outside devlog/_plan/260826_quota_window_and_backlog/ are touched, which is the docs-only cycle contract. Nothing in the build, typecheck, or test path reads from devlog/.

No GUI change, so no screenshot applies.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive roadmap for restoring accurate quota-window handling across subscription tiers.
    • Documented plans for optional Spark quota visibility, image-capability support, proxy exclusions, and provider credit details.
    • Recorded audit findings, implementation phases, verification criteria, issue closures, and backlog triage results.
  • Configuration
    • Planned support for configuring proxy exclusions through a new noProxy setting.

Docs-only roadmap cycle for a seven-phase loop. No runtime change.

The unit exists because Codex re-introduced the 5-hour rate-limit window for
Plus and Team while Pro stays weekly-only, and OpenCodex has two quota parsers
that disagree about what a short window means. Proven live rather than
inferred: identical upstream data yields {weeklyPercent:97} from the header
parser and {shortPercent:97, weeklyPercent:12} from the WHAM parser.

The audit is the reason this is worth reading. Three rounds with an
independent reviewer turned a one-file plan into a two-file one: fixing
parseUpstreamQuotaHeaders alone would have moved routing headroom for a
5h-exhausted account from 0.03 to 0.88, because src/routing/quota.ts omits
shortPercent and is currently reading the burst value only by accident through
the very bug the fix removes. That finding, and four others, are recorded in
001_audit_response.md along with one partial rebuttal about phase ordering.

Phases: 010 header parser + routing fold, 020 Spark hidden by default behind a
Codex Auth switch, 030 #2406 CommandCode image capabilities, 040 #1215
noProxy, 050 #1060 billing-period date, 060 evidence-backed closures, 070
backlog triage.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 26, 2026 02:50
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f2df58dc-cebb-49fe-88b4-9badeb4ab402

📥 Commits

Reviewing files that changed from the base of the PR and between 0a0a882 and 46ed165.

📒 Files selected for processing (9)
  • devlog/_plan/260826_quota_window_and_backlog/000_plan.md
  • devlog/_plan/260826_quota_window_and_backlog/001_audit_response.md
  • devlog/_plan/260826_quota_window_and_backlog/010_phase1.md
  • devlog/_plan/260826_quota_window_and_backlog/020_phase2.md
  • devlog/_plan/260826_quota_window_and_backlog/030_phase3.md
  • devlog/_plan/260826_quota_window_and_backlog/040_phase4.md
  • devlog/_plan/260826_quota_window_and_backlog/050_phase5.md
  • devlog/_plan/260826_quota_window_and_backlog/060_phase6.md
  • devlog/_plan/260826_quota_window_and_backlog/070_phase7.md

📝 Walkthrough

Walkthrough

The PR adds a seven-phase remediation roadmap. It covers Codex quota parsing, Spark quota visibility, CommandCode modalities, proxy configuration, provider credits, issue closure evidence, and backlog triage.

Changes

Quota and backlog remediation

Layer / File(s) Summary
Roadmap scope and audit corrections
devlog/_plan/260826_quota_window_and_backlog/000_plan.md, devlog/_plan/260826_quota_window_and_backlog/001_audit_response.md
The roadmap defines seven phases and acceptance criteria. The audit response records five folded blockers and one partial rebuttal.
Quota parser and routing alignment
devlog/_plan/260826_quota_window_and_backlog/010_phase1.md
The Phase 1 plan adds a short-window parser branch, routing headroom fields, 24-hour boundary tests, parser parity tests, falsification steps, and activation verification.
Spark quota filtering and preference
devlog/_plan/260826_quota_window_and_backlog/020_phase2.md
The Phase 2 plan adds a persisted Codex Spark quota switch and exact-label filtering in the shared quotaForPlan projection for both quota APIs.
CommandCode image modality mapping
devlog/_plan/260826_quota_window_and_backlog/030_phase3.md
The Phase 3 plan centralizes verified image-capable model IDs and modality maps for OAuth and API-key presets.
OpenCodex noProxy configuration
devlog/_plan/260826_quota_window_and_backlog/040_phase4.md
The Phase 4 plan adds `noProxy?: string
Provider credits and billing period
devlog/_plan/260826_quota_window_and_backlog/050_phase5.md
The Phase 5 plan projects the typed creditsUsd data into the Providers workspace and displays optional billing-period dates.
Issue closure and backlog triage
devlog/_plan/260826_quota_window_and_backlog/060_phase6.md, devlog/_plan/260826_quota_window_and_backlog/070_phase7.md
Phases 6 and 7 document closure evidence for tracked work and audits of stale pull requests and open issues.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: ingwannu

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260826-quota-window-roadmap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit 40ad1c7 into dev Aug 26, 2026
16 of 17 checks passed
@lidge-jun
lidge-jun deleted the codex/260826-quota-window-roadmap branch August 26, 2026 02:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46ed165c48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +112 to +114
bun test tests/codex-auth-api.test.ts
cd gui && bun test # 994+ pass, 0 fail
bun run typecheck # exit 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the root typecheck outside the GUI directory

When this verification block is run as written in Bash, cd gui persists for the next line, so bun run typecheck executes against gui/package.json rather than the repository root. I checked that exact command locally: Bun exits 1 with Script not found "typecheck", so the phase cannot complete and the required root typecheck never runs. Put the GUI test in a subshell, return to the root, or use an explicit working-directory flag before invoking the root scripts.

AGENTS.md reference: AGENTS.md:L178-L180

Useful? React with 👍 / 👎.

Comment on lines +84 to +87
**`gui/src/components/CodexAccountPool.tsx`** — header control + optimistic state, following
the existing `refreshQuotas` / `pauseExhausted` handler shape.

**i18n** — `codexAuth.showSparkQuota` + tooltip in all nine locale files. Note the parser

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the new Spark quota default and switch

This phase changes user-visible behavior by removing the Spark quota row by default and introduces a persistent showCodexSparkQuota setting, but its modification map stops at the GUI and locale catalogs. Existing users consulting the documentation—including the provider guide that already discusses Spark quota behavior—will have no explanation for the disappearing row or how to restore it. Add the switch and its default-off semantics to the relevant docs-site configuration/provider documentation, keeping translated pages consistent.

AGENTS.md reference: AGENTS.md:L279-L280

Useful? React with 👍 / 👎.

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