Repository navigation
fix(aggregator): alias OpenCode Zen door rows onto the Go pools (#10443) - #10444
Conversation
The Zen door (opencode.drewrypope/.popesdrew/.developing-today-0, the opencode-zen-plans door set) reads the same plan meters as the Go door: on the 2026-11-15T08:15Z and 08:30Z quota-current ticks its per-workspace rows carried windows and reset instants identical to the matching opencode-go.* rows (e.g. developing-today-0 monthly 54%, resets 2026-12-08T22:09:41Z in both). serviceIdFor now files Zen rows under the existing opencode-go.* pool ids instead of letting them pass through as unregistered service ids that overlayQuotaCurrent synthesized into duplicate pools. No new pools, no duplicate meters. Adds a measured-provider census test: every providerId in the verified 2026-11-15 tick must resolve via serviceIdFor to a registered pool (POOL_SPECS + SHELL_POOLS) or a documented non-pool id, so an unregistered measured provider fails the suite.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou'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 34 minutes. View limit details
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. |
The steward's step-6 page-truth check (#10591) must compare rendered pool coverage against distinct pool service IDs, not raw provider rows. These tests ensure the overlay: - Never turns one meter into two pools when Zen and Go readings are identical - Keeps the provider-level census (both Zen and Go rows present in gatherer) - Surfaces a genuinely divergent Zen reading as a credential row instead of hiding it This guards the deliberate #10444 aliasing (Zen door rows file under opencode-go.* pools) so future steward runs don't file false regressions.
Closes #10443.
Decision: alias, not register
The OpenCode Zen door rows (
opencode.drewrypope,opencode.popesdrew,opencode.developing-today-0— theopencode-zen-plansdoor set in.opencode/route-fallbacks.md) read the same plan meters as the Go door. Evidence, verified live on the laptop aggregator'squota-current.jsonduring this shift (tickgeneratedAt 2026-11-15T08:30:15.319Z, matching the packet's 08:15Z tick):5h/weekly windows and resets are likewise identical. There is no contrary evidence of independent Zen meters, so registering three Zen pools would double-count the same meters.
Change
pm-stack/aggregator/src/quota-gather-map.ts:serviceIdFormaps the three Zen provider ids onto the existingopencode-go.<workspace>pool ids (with the evidence recorded in the doc comment). The provider id itself stays the Zen config id —canonicalProviderIdis a separate contract and the router matches by exact provider id. Before this change the Zen rows passed through under their own ids andoverlayQuotaCurrentsynthesized them into duplicate pools.pm-stack/aggregator/test/quota-gather-map.test.ts: Zen alias tests (mapping +entryFromResultfiling), plus a measured-provider census test whose oracle is the verified 2026-11-15 tick's providerId set: every measured provider must resolve viaserviceIdForto a registered pool (POOL_SPECS+SHELL_POOLS, viaextractQuotaPools) or a documented non-pool id (NON_POOL_SERVICE_IDSin quota-current.ts). An unregistered measured provider now fails the suite instead of silently synthesizing a pool.Verification (laptop, worktree)
bun test test/quota-gather-map.test.ts src/quota-gather-map.test.ts— 79 pass / 0 fail (3 new tests included).bun test test/quota.test.ts test/quota-current.test.ts— pass (within the combined 90-pass run below).bun test test/quota-exhaustion.test.ts test/credential-lifecycle.test.ts test/provider-auth-alerts.test.ts— pass.bunx tsc --noEmit— clean.test/gather-quota.test.tsfails 6 in any fresh worktree (installed-lib-checkout environment; green on the primary clone, and still failing with this change stashed);test/quota-contract.test.tsfails 1 on cleanmainas well.Queue: task 17350, lane any-a.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.