feat(billing): project current Stripe invoice evidence - #563
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 |
Buyer/data-integrity objective
Refs #488. This Draft child of #562 exposes a tenant-scoped read-only projection over accepted authoritative Stripe Invoice observations so the entitlement-policy layer can consume one explicit current payment fact without consulting webhook arrival order or mutable provider/wall-clock timestamps.
Exact current stack
develop:df0fa17bd5035af6455c889022c540b4f439e3d6;feat/stripe-invoice-observation-ledger-488@2d6b55a214e2b62a034adbe06282d135812ef610;50c1a4005d8fcd408ccdbd49672204d571df37e3;CHANGELOG.md+4/-0.TDD and focused evidence
Test-only commit
ca90045244d1ae5dba71b612ddfa8df20a725181introduced the projection regression before the production module existed. Production commitf56daa783f28e51f28e61d5899e2109b112d765bimplemented the read-only projection; follow-up commit843ac4ad295e5c13217cb5f12321508b8112cdd1locked its source/test registration through a focused package contract, and50c1a4005d8fcd408ccdbd49672204d571df37e3recorded active Unreleased behavior.Private focused execution passed all six projection subtests and produced 100% line / 100% branch / 100% function coverage for
server/stripe_invoice_current_projection.mjsand its focused suite.Projection contract
observation_id, not webhook receipt, provider creation/paid time, or local wall-clock timestamp;getCurrentInvoicereturns one immutable current payment fact ornullfor absent/foreign authority;listCurrentInvoicesreturns one immutable latest observation per tenant-owned Invoice, with optional Subscription narrowing;orgs.planmutation, entitlement claim write, or access grant/revoke.Scope boundary
This slice does not persist entitlement claims or apply authorization. Transactional claim/audit persistence, reversible grant/revoke application, operator recovery, and end-to-end out-of-order convergence remain subsequent #488 work.
Remain Draft. Do not integrate independently of #562 and its prerequisite stack. Hosted exact-head deterministic/browser/coverage/security/dependency/supply-chain/review evidence must be regenerated on the unchanged final head.