Repository navigation
fix(subscription): report true plans and enforced BYOK transcription budgets - #21315
Merged
Merged
Conversation
This was referenced Oct 12, 2026
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codex Review SummaryThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Capable clients receive catalog plan IDs through the existing
X-Omi-Plan-Identity: 1declaration or platform release floor.Subscription/UserSubscriptionResponsenow accept the catalog'sPlanType, including Plus and Unlimited v2, so the response model no longer rejects an admitted true-plan response. Payment subscription responses already use strings and accept these IDs; no payment behavior changed. Legacy callers still receive the server's existingunlimitedremap.The app-client OpenAPI default response preserves the catalog-derived legacy plan projection. The separate
PlanIdentitySubscription/PlanIdentityUserSubscriptionResponseschemas describe the capability-qualified response throughx-omi-plan-identity-response; the optional header is published as a request parameter. The unchanged compatibility checker still validates the complete default response. A regression deliberately widens that default enum and proves the checker rejects it. This is a negotiated schema, not an unconditional widening of the released decoder contract.Earlier review nits remain fixed: closed/transient allowance projection retains a known finite catalog or snapshot budget rather than emitting the unlimited zero sentinel; mode/remaining remain closed. Windows uses its own independent floor/override and never inherits the macOS override. No plan allocation, feature grant, entitlement, lock, price, production setting or deployment changes.
Product invariants affected
none
Generated-client impact
Regenerated app-client OpenAPI and every Dart/TypeScript/Swift artifact through the repository generators. Dart schemas are byte-for-byte unchanged. Four TypeScript outputs add two interfaces and optional capability-header forwarding; response parsing and existing interfaces are unchanged. Swift adds an optional nil-defaulted header argument/forwarding only; its
OmiAnyCodableresponse decoder and all DTOs are unchanged. No generated runtime decoder changed; installed binaries are untouched. This PR has existing handwritten transport changes, so it is not a generated-only Swift lane.How it was verified
BACKEND_UNIT_TEST_FILE_LIST=/private/tmp/w0-21315-contract-tests.txt bash backend/test.sh— 245 passed (93 users-router, 12 subscription-wire, 62 plan, 64 allowance, 14 OpenAPI tests). Log/private/tmp/w0-21315-contract-tests-merged.log; rerun after mergingorigin/mainat7cc32e00f1b.unlimited; recognized header-1 callers and macOS 0.12.197/web floors serialize raw IDs. Finite Plus totals/remaining and genuine unlimited enforcement stay unchanged.TZ=UTC flutter test test/models/subscription_plan_type_test.dart test/unit/backend/http/shared_test.dart— 18 passed, covering lossless plan decoding and capability transport. These are source-fixture tests, not installed-release replay.subscription_inactive,usage_invalid,allowance_unavailable; fresh-module environment tests cover independent Windows defaults/override.origin/main. All Dart/TypeScript/Swift generator freshness checks pass. Preflight, normal push gate and exact-head CI are reported in the handoff.Required deployment order
#21315 backend must be deployed and verified before any mobile release containing #21314. Merge order alone is insufficient. Finite Plus-BYOK retains the old 300-minute snapshot until the backend projection is deployed. #21313's plan-name changes are already on main.
UI evidence
UI-Evidence: none -- Response contract and projection validated with hermetic HTTP tests; no installed UI acceptance.
Failure class
Failure-Class: none
Risks for reviewers