Skip to content

fix(quota): surface the alternate ChatGPT account as its own pool on /quota - #3837

Merged
dezren39 merged 2 commits into
mainfrom
fix/quota-alternate-pool
Nov 1, 2026
Merged

dezren39 merged 2 commits into
mainfrom
fix/quota-alternate-pool

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What was wrong

Drew asked where openai.alternate is on /quota. Answer: nowhere — and not for lack of data. The quota gatherer measures the alternate credential (popesdrew) every tick; quota-current.json carries a fresh state: ok entry with 5h + weekly windows. But overlayQuotaCurrent only overlays gatherer entries onto pools that already exist, and the pool table (POOL_SPECS + SHELL_POOLS in src/quota-extract.ts) had no pool for it — the entry was silently dropped. The rendered /quota page contained zero mentions of the alternate account.

The main account was present only as openai:codex (its Codex-door read); the alternate had no door into the page at all.

The fix

  • src/quota-extract.ts: new POOL_SPEC openai.alternate — OpenAI, "ChatGPT (Alternate — popesdrew)" — placed directly after openai:codex, with a fail-soft dated-read extractor for a future ### ChatGPT (Alternate) stewardship section; until one exists it renders as a shell and the gatherer overlay supplies the live windows (verified pattern: every other pool's shell behaves the same). The header pool-map comment now records the two-ChatGPT-pools rule beside the one-Meta-pool rule: separate accounts, separate allowances, never combined.
  • scripts/collect-fleet-feed.ts: poolFor attributes sessions burned through the openai.alternate door to the new pool (previously unattributed → null).
  • Tests (quota.test.ts, quota-current.test.ts): the alternate pool exists as its own pool, its door is openai.alternate, and gatherer windows (5h 100 / weekly 42 in the fixture) land on it — never on the main pool, whose read is untouched.
  • Drive-by (second commit): pm-stack/aggregator/.gitignore for the generated coverage-snapshot.json, which can otherwise stall pm-git-sync deploys by dirtying the tree (observed 2026-11-01).

Verification


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…lternate)

The quota gatherer has been measuring the openai.alternate credential
(popesdrew) all along — quota-current.json carries a fresh, healthy
entry with 5h + weekly windows — but overlayQuotaCurrent only overlays
entries onto pools that already exist, and no pool existed for it, so
/quota silently dropped the account: zero mentions of the alternate
account anywhere on the page Drew reads for pool state.

- POOL_SPECS gains openai.alternate (OpenAI — ChatGPT (Alternate —
  popesdrew)) with a fail-soft dated-read extractor for a future
  "### ChatGPT (Alternate)" stewardship section; until then it
  renders as a shell and the gatherer overlay supplies live windows.
- poolFor in collect-fleet-feed attributes sessions burned through
  the openai.alternate door to the new pool (previously unattributed).
- Tests: the pool exists as its own pool (never merged into
  openai:codex) and gatherer windows land on it, not on the main pool.

The two ChatGPT accounts are separate pools with separate allowances
and are never combined; the pool map comment now records that next to
the existing one-Meta-pool rule.
The aggregator writes coverage-snapshot.json into its working
directory by default; pm-git-sync refuses to pull into a dirty tree,
so this generated file can silently stall dashboard deploys (it did
on 2026-11-01 — the tree only stayed clean via a local info/exclude).
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 17:00
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 252d7b6c-cf46-41e2-b643-7823cb553e1b
Commits

Reviewing files that changed from the base of the PR and between 927f383 and f90ab84.

Files selected for processing: 5
  • pm-stack/aggregator/.gitignore
  • pm-stack/aggregator/scripts/collect-fleet-feed.ts
  • pm-stack/aggregator/src/quota-extract.ts
  • pm-stack/aggregator/test/quota-current.test.ts
  • pm-stack/aggregator/test/quota.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@dezren39
dezren39 merged commit ec305bf into main Nov 1, 2026
@dezren39
dezren39 deleted the fix/quota-alternate-pool branch November 1, 2026 17:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T17:01:08.259571Z f90ab84 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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