Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pm-stack/aggregator/src/quota-extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ export const POOL_SPECS: PoolSpec[] = [
id: "openai.main",
provider: "OpenAI",
plan: "ChatGPT (Main — drewrypope)",
heading: /^### ChatGPT/,
heading: /^### ChatGPT(?! \(Alternate\))/,
extract: extractCodex,
shellNote: "No current read. OpenAI is the fleet's final reserve pool.",
},
Expand Down
10 changes: 10 additions & 0 deletions pm-stack/aggregator/test/quota.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ describe("quota extractors", () => {
expect(p.windows).toEqual([]);
});

test("main and alternate ChatGPT sections never cross-read, in either order (#8005)", () => {
const mainSection = "### ChatGPT — main account plans\n- 7-day 11% used, resets Oct 30, 18:01 UTC.\n";
const altSection = "### ChatGPT (Alternate)\n- 7-day 42% used.\n";
for (const view of ["\n" + altSection + "\n" + mainSection, "\n" + mainSection + "\n" + altSection]) {
const m = new Map(extractQuotaPools(view, NOW).map((p) => [p.id, p]));
expect(m.get("openai.main")!.windows[0].percent).toBe(11);
expect(m.get("openai.alternate")!.windows[0].percent).toBe(42);
}
});

test("meta is walled until the weekly reset — and it is the only Meta pool", () => {
const p = byId.get("meta")!;
expect(p.state).toBe("walled");
Expand Down
Loading