feat(billing): project current authoritative subscription observations - #527
Draft
seonghobae wants to merge 18 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Review failedAn error occurred during the review process. Please try again later. 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. Comment |
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.
Buyer/data-integrity objective
Refs #488. This Draft is stacked on #526 and implements a tenant-scoped, read-only projection over accepted authoritative Stripe Subscription observations. It selects current state by explicit local append order, retains ordered Price and source-event provenance, enforces organization isolation, returns immutable values, and never mutates
orgs.planor otherwise infers entitlement.Stripe webhook arrival order remains non-authoritative. The preceding stack owns provider verification and append-only persistence; this PR only projects already accepted observations.
Exact current stack
develop:df0fa17bd5035af6455c889022c540b4f439e3d6;feat/stripe-subscription-observation-ledger-488@cf01a755f1f64a5838033a94b4ba17a1622e0021;a8a66035ceaa1abbee2f20873adbc0353c8217d7;The current head is a non-destructive two-parent reconciliation of predecessor child
2d3f280cc90d7af068c98a38e70b16387d5c5c37with exact current #526. The effective delta is limited toCHANGELOG.md, projection doctoring,package.json,server/stripe_subscription_current_projection.mjs, the coverage contract, and the focused projection regression.CHANGELOG.mdadds exactly five projection lines with zero parent deletions.The semantic package/coverage merge preserves the parent’s composed app/toast route, OpenCode/changelog tests, contextual-orchestrator attribution/routing regressions, Checkout attempt/reconciliation/provider tests, webhook trust/event-ledger coverage, provider-read and observation-ledger coverage, and accessibility suites while adding only current-projection production/test registrations.
Any parent or contributor-head movement invalidates this ancestry statement until freshly reconciled.
Projection contract
+42, hexadecimal, exponent notation, and leading zeroes;orgs.planor grants entitlement;Causal failure repair
Predecessor Server Tests run
32086261953,unit-and-apijob95559322862, passed the complete unit suite including the current projection but failed API smoke because stale application composition returned404for protected/toast-state.css. The current repair starts from exact current #526’s composed application tree and overlays only the six projection paths, so the shipped static accessibility asset is preserved without weakening the smoke contract. The predecessorcloud-e2ejob succeeded, but all predecessor/synthetic-merge evidence remains historical and non-authorizing after this head movement.tests/unit/coverage-script-contract.test.mjsnow proves the inheritedserver/application_routes.mjs, provider reader, observation ledger, and new current projection all remain instrumented, while their focused suites remain in normal unit CI and c8 execution.Current exact-head evidence
Fresh repository-native workflows for exact contributor head
a8a66035ceaa1abbee2f20873adbc0353c8217d7are queued and therefore non-passing:32275070213;32275070320; and32275070706.The current review inventory contains no submitted review and no review thread, so there is no qualifying independent current-head approval. Queued, pending, skipped-required, cancelled, absent, neutral-required, failed, stale, predecessor, synthetic, status-only, author-only, or model-only evidence is non-passing.
Documentation and integration boundary
docs/doctoring/stripe-subscription-current-projection.mdrecords the active-PR/shipped-truth boundary, security and entitlement separation, rollback, test evidence, and primary Stripe/SQLite references.CHANGELOG.mdrecords active Unreleased behavior without claiming protected integration.Do not merge independently of #526/#525 or the preceding #488 stack. #528 owns the entitlement-policy child and must be reconciled to this exact parent. Final integration requires fresh exact-head deterministic/browser/coverage/security/dependency/supply-chain/package/provenance evidence, resolved valid findings, and qualifying independent non-author approval under the live rules.