Skip to content

fix(aggregator): alias OpenCode Zen door rows onto the Go pools (#10443) - #10444

Merged
dezren39 merged 1 commit into
mainfrom
queue/17350-10443-zen-alias
Nov 15, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/17350-10443-zen-alias

Conversation

@dezren39

@dezren39 dezren39 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Closes #10443.

Decision: alias, not register

The OpenCode Zen door rows (opencode.drewrypope, opencode.popesdrew, opencode.developing-today-0 — the opencode-zen-plans door set in .opencode/route-fallbacks.md) read the same plan meters as the Go door. Evidence, verified live on the laptop aggregator's quota-current.json during this shift (tick generatedAt 2026-11-15T08:30:15.319Z, matching the packet's 08:15Z tick):

workspace Zen row monthly Go row monthly reset (both)
drewrypope 100% 100% 2026-12-03T03:02:35Z
popesdrew 100% 100% 2026-12-03T17:35:51Z
developing-today-0 54% 54% 2026-12-08T22:09:41Z

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: serviceIdFor maps the three Zen provider ids onto the existing opencode-go.<workspace> pool ids (with the evidence recorded in the doc comment). The provider id itself stays the Zen config id — canonicalProviderId is a separate contract and the router matches by exact provider id. Before this change the Zen rows passed through under their own ids and overlayQuotaCurrent synthesized them into duplicate pools.
  • pm-stack/aggregator/test/quota-gather-map.test.ts: Zen alias tests (mapping + entryFromResult filing), plus a measured-provider census test whose oracle is the verified 2026-11-15 tick's providerId set: every measured provider must resolve via serviceIdFor to a registered pool (POOL_SPECS + SHELL_POOLS, via extractQuotaPools) or a documented non-pool id (NON_POOL_SERVICE_IDS in 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.
  • Pre-existing failures, verified unrelated: test/gather-quota.test.ts fails 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.ts fails 1 on clean main as well.

Queue: task 17350, lane any-a.


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

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.
@dezren39
dezren39 requested a review from a team as a code owner November 15, 2026 08:35
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T08:35:32.467462Z
We couldn’t complete this review. Comment @codex review to try again.
d512016 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 15, 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 34 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: 5d99450e-e3de-4735-a20f-c39b2c053abd
Commits

Reviewing files that changed from the base of the PR and between 5b419f0 and d512016.

Files selected for processing: 2

  • pm-stack/aggregator/src/quota-gather-map.ts
  • pm-stack/aggregator/test/quota-gather-map.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 73ae4d5 into main Nov 15, 2026
1 check passed
@dezren39
dezren39 deleted the queue/17350-10443-zen-alias branch November 15, 2026 08:35
dezren39 pushed a commit that referenced this pull request Nov 16, 2026
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.
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.

quota(attribution): OpenCode Zen door rows (opencode.drewrypope/.popesdrew/.developing-today-0) are measured but unregistered

1 participant