feat(billing): project current authoritative subscription observations - #527
Draft
seonghobae wants to merge 12 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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
Current parent/base: #526
feat/stripe-subscription-observation-ledger-488@b3510f99c79f6994b58902cb5dcb1e7501ee5844.Current contributor head:
f047cd4229aa3d0bdb94eec0155ddda4b21e784a.Fresh parent→child comparison is ahead-only, 12 commits ahead, zero behind, and has the exact current parent as merge base. The effective delta is exactly six projection/evidence files:
CHANGELOG.md, projection doctoring,package.json,server/stripe_subscription_current_projection.mjs, the coverage contract, and the focused projection regression.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;TDD and reconciliation evidence
The behavior contract preceded the production module. Tenant authority normalization was tightened test-first after current-source review. The branch has since been reconciled non-destructively through multiple parent movements; current exact ancestry is the live parent/head pair above, not the historical SHAs previously recorded in this PR body.
Current exact-head CI/security/review evidence must be freshly classified. Predecessor-head cancellations, successes, model judgments, and reviews are historical and non-authorizing.
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. Final integration also requires protected-shipped #523 exact-contributor-head execution attestation (or equivalent), 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.
Pending, queued, skipped-required, cancelled, absent, neutral-required, failed, stale, predecessor, synthetic, status-only, or model-only evidence is non-passing.