feat(billing): persist authoritative Stripe invoice observations - #562
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 |
|
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 |
1 similar 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 |
Buyer/data-integrity objective
Refs #488. This Draft child of #561 persists accepted authoritative Stripe Invoice reads as normalized append-only evidence before any later entitlement claim/application layer. It binds each Invoice permanently to one Subscription and requires the exact accepted Subscription observation that named the Invoice, preserving tenant, Customer, Subscription, and Invoice authority without copying raw provider payloads or entitlement state into the ledger.
Exact current stack
develop:df0fa17bd5035af6455c889022c540b4f439e3d6;feat/stripe-invoice-authoritative-read-488@e26164934ddbe7417635b6839e78adf29f6d6197;2d6b55a214e2b62a034adbe06282d135812ef610;CHANGELOG.md+5/-0 and coverage contract +15/-0;TDD and focused evidence
Test-only commit
fc98edc4fab146bddd918923236a3254d45df291addedtests/unit/stripe-invoice-observation-ledger.test.mjswhile the production module did not exist, establishing a realistic RED module-resolution failure. Implementation commit2d6b55a214e2b62a034adbe06282d135812ef610added the normalized repository, bootstrap registration, package/coverage integration, doctoring, and additive changelog evidence.Private focused execution passed all eight ledger subtests and produced 100% line / 100% branch / 100% function coverage for
server/stripe_invoice_observation_ledger.mjs. Hosted exact-head CI/security/dependency/review evidence remains authoritative for integration.Normalized persistence contract
billing_stripe_invoicesstores one Invoice identity permanently bound to one existing Stripe Subscription;billing_stripe_invoice_observationsappends accepted payment facts and references the exactsource_subscription_observation_idthat named the Invoice;latest_invoice_idequality is rechecked before any write;observed_at_msnever moves backwards under wall-clock rollback; andCurrent exact-head evidence
Fresh repository-native workflows for unchanged head
2d6b55a214e2b62a034adbe06282d135812ef610are queued and therefore non-passing:32278332109;32278330847; and32278331894.There are no submitted reviews or review threads on this exact head and 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.
Scope boundary
This slice does not project current Invoice state, persist entitlement claims, mutate
orgs.plan, or grant/revoke access. Current Invoice projection, transactional claim/audit persistence, reversible entitlement application, operator recovery, and end-to-end out-of-order convergence remain subsequent #488 work.Remain Draft. Do not integrate independently of #561 and its prerequisite stack. Exact-head hosted deterministic/browser/coverage/security/dependency/supply-chain/review evidence must be regenerated on the unchanged final head.