@openlup/platform 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/CHANGELOG.md +161 -231
  2. package/README.md +182 -8
  3. package/dist/composition/composeBundle.d.ts +6 -0
  4. package/dist/composition/composeBundle.js +2 -0
  5. package/dist/composition/index.js +1 -0
  6. package/dist/payments/adapterConformance.d.ts +8 -0
  7. package/dist/payments/adapterConformance.js +109 -0
  8. package/dist/payments/bindings.d.ts +3 -0
  9. package/dist/payments/bindings.js +17 -0
  10. package/dist/payments/checkoutActivePaymentActionResolver.d.ts +7 -0
  11. package/dist/payments/checkoutActivePaymentActionResolver.js +77 -0
  12. package/dist/payments/checkoutRecoveryPaymentResolver.d.ts +8 -0
  13. package/dist/payments/checkoutRecoveryPaymentResolver.js +87 -0
  14. package/dist/payments/contracts/adapter.d.ts +113 -0
  15. package/dist/payments/contracts/adapter.js +1 -0
  16. package/dist/payments/contracts/conformance.d.ts +155 -0
  17. package/dist/payments/contracts/conformance.js +1 -0
  18. package/dist/payments/contracts/evidence.d.ts +157 -0
  19. package/dist/payments/contracts/evidence.js +1 -0
  20. package/dist/payments/contracts/index.d.ts +10 -0
  21. package/dist/payments/contracts/index.js +1 -0
  22. package/dist/payments/contracts/preparedAttempt.d.ts +69 -0
  23. package/dist/payments/contracts/preparedAttempt.js +1 -0
  24. package/dist/payments/contracts/reconciliation.d.ts +303 -0
  25. package/dist/payments/contracts/reconciliation.js +1 -0
  26. package/dist/payments/contracts/repair.d.ts +92 -0
  27. package/dist/payments/contracts/repair.js +1 -0
  28. package/dist/payments/contracts/truth.d.ts +92 -0
  29. package/dist/payments/contracts/truth.js +1 -0
  30. package/dist/payments/eventConformanceRunner.d.ts +12 -0
  31. package/dist/payments/eventConformanceRunner.js +125 -0
  32. package/dist/payments/index.d.ts +16 -0
  33. package/dist/payments/index.js +16 -0
  34. package/dist/payments/paymentAttemptSilenceWindow.d.ts +10 -0
  35. package/dist/payments/paymentAttemptSilenceWindow.js +19 -0
  36. package/dist/payments/paymentMethodLifecycle.d.ts +11 -0
  37. package/dist/payments/paymentMethodLifecycle.js +37 -0
  38. package/dist/payments/paymentProviderReconciliationAbsenceReopen.d.ts +7 -0
  39. package/dist/payments/paymentProviderReconciliationAbsenceReopen.js +100 -0
  40. package/dist/payments/paymentProviderReconciliationEvidence.d.ts +36 -0
  41. package/dist/payments/paymentProviderReconciliationEvidence.js +91 -0
  42. package/dist/payments/paymentProviderReconciliationWorker.d.ts +4 -0
  43. package/dist/payments/paymentProviderReconciliationWorker.js +245 -0
  44. package/dist/payments/paymentTruth.d.ts +8 -0
  45. package/dist/payments/paymentTruth.js +125 -0
  46. package/dist/payments/paymentVerifyNowHandler.d.ts +27 -0
  47. package/dist/payments/paymentVerifyNowHandler.js +70 -0
  48. package/dist/payments/paymentVerifyNowService.d.ts +23 -0
  49. package/dist/payments/paymentVerifyNowService.js +93 -0
  50. package/dist/payments/paymentWebhookPostProcessing.d.ts +22 -0
  51. package/dist/payments/paymentWebhookPostProcessing.js +15 -0
  52. package/dist/payments/postgresPaymentTruth.d.ts +10 -0
  53. package/dist/payments/postgresPaymentTruth.js +126 -0
  54. package/dist/payments/preparedAttempt.d.ts +6 -0
  55. package/dist/payments/preparedAttempt.js +70 -0
  56. package/dist/payments/preparedAttemptFinalization.d.ts +5 -0
  57. package/dist/payments/preparedAttemptFinalization.js +12 -0
  58. package/dist/payments/schemaCapabilities.d.ts +10 -0
  59. package/dist/payments/schemaCapabilities.js +10 -0
  60. package/dist/payments/sql.d.ts +20 -0
  61. package/dist/payments/sql.js +6 -0
  62. package/dist/payments/stripe/classifyDecline.d.ts +46 -0
  63. package/dist/payments/stripe/classifyDecline.js +58 -0
  64. package/dist/payments/stripe/declineFailureHints.d.ts +46 -0
  65. package/dist/payments/stripe/declineFailureHints.js +87 -0
  66. package/dist/payments/stripe/donorContracts.d.ts +120 -0
  67. package/dist/payments/stripe/donorContracts.js +1 -0
  68. package/dist/payments/stripe/executionDecline.d.ts +53 -0
  69. package/dist/payments/stripe/executionDecline.js +107 -0
  70. package/dist/payments/stripe/index.d.ts +16 -0
  71. package/dist/payments/stripe/index.js +239 -0
  72. package/dist/payments/stripe/intentMapper.d.ts +26 -0
  73. package/dist/payments/stripe/intentMapper.js +51 -0
  74. package/dist/payments/stripe/methodFacts.d.ts +10 -0
  75. package/dist/payments/stripe/methodFacts.js +12 -0
  76. package/dist/payments/stripe/paymentFailureEvidence.d.ts +26 -0
  77. package/dist/payments/stripe/paymentFailureEvidence.js +33 -0
  78. package/dist/payments/stripe/stripeFailureEvidence.d.ts +41 -0
  79. package/dist/payments/stripe/stripeFailureEvidence.js +82 -0
  80. package/dist/payments/stripe/stripeIntentConfirmationEvidence.d.ts +28 -0
  81. package/dist/payments/stripe/stripeIntentConfirmationEvidence.js +32 -0
  82. package/dist/payments/stripe/stripePaymentReconciliationProvider.d.ts +35 -0
  83. package/dist/payments/stripe/stripePaymentReconciliationProvider.js +222 -0
  84. package/dist/payments/stripe/stripeRefundEvidence.d.ts +8 -0
  85. package/dist/payments/stripe/stripeRefundEvidence.js +17 -0
  86. package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.d.ts +45 -0
  87. package/dist/payments/stripe/stripeSandboxPaymentExecutionAdapter.js +220 -0
  88. package/dist/payments/stripe/stripeWebhookNormalizer.d.ts +14 -0
  89. package/dist/payments/stripe/stripeWebhookNormalizer.js +243 -0
  90. package/dist/payments/stripe/webhookSignature.d.ts +14 -0
  91. package/dist/payments/stripe/webhookSignature.js +43 -0
  92. package/dist/payments/tpay/blikRecurringMapper.d.ts +37 -0
  93. package/dist/payments/tpay/blikRecurringMapper.js +24 -0
  94. package/dist/payments/tpay/capabilities.d.ts +3 -0
  95. package/dist/payments/tpay/capabilities.js +18 -0
  96. package/dist/payments/tpay/classifyDecline.d.ts +46 -0
  97. package/dist/payments/tpay/classifyDecline.js +58 -0
  98. package/dist/payments/tpay/declineFailureHints.d.ts +72 -0
  99. package/dist/payments/tpay/declineFailureHints.js +37 -0
  100. package/dist/payments/tpay/donorContracts.d.ts +140 -0
  101. package/dist/payments/tpay/donorContracts.js +1 -0
  102. package/dist/payments/tpay/index.d.ts +43 -0
  103. package/dist/payments/tpay/index.js +264 -0
  104. package/dist/payments/tpay/paymentFailureEvidence.d.ts +26 -0
  105. package/dist/payments/tpay/paymentFailureEvidence.js +33 -0
  106. package/dist/payments/tpay/preparedProviderAttempt.d.ts +22 -0
  107. package/dist/payments/tpay/preparedProviderAttempt.js +24 -0
  108. package/dist/payments/tpay/providerAttemptFailureDiagnostic.d.ts +3 -0
  109. package/dist/payments/tpay/providerAttemptFailureDiagnostic.js +95 -0
  110. package/dist/payments/tpay/tpayCreateTransactionInput.d.ts +25 -0
  111. package/dist/payments/tpay/tpayCreateTransactionInput.js +128 -0
  112. package/dist/payments/tpay/tpayDeclineEvidence.d.ts +126 -0
  113. package/dist/payments/tpay/tpayDeclineEvidence.js +177 -0
  114. package/dist/payments/tpay/tpayDispatchFailure.d.ts +60 -0
  115. package/dist/payments/tpay/tpayDispatchFailure.js +121 -0
  116. package/dist/payments/tpay/tpayFailureEvidence.d.ts +20 -0
  117. package/dist/payments/tpay/tpayFailureEvidence.js +61 -0
  118. package/dist/payments/tpay/tpayHttpClient.d.ts +52 -0
  119. package/dist/payments/tpay/tpayHttpClient.js +185 -0
  120. package/dist/payments/tpay/tpayHttpFailure.d.ts +57 -0
  121. package/dist/payments/tpay/tpayHttpFailure.js +143 -0
  122. package/dist/payments/tpay/tpayPaymentExecutionAdapter.d.ts +20 -0
  123. package/dist/payments/tpay/tpayPaymentExecutionAdapter.js +249 -0
  124. package/dist/payments/tpay/tpayPaymentReconciliationProvider.d.ts +5 -0
  125. package/dist/payments/tpay/tpayPaymentReconciliationProvider.js +244 -0
  126. package/dist/payments/tpay/tpayTransactionPayload.d.ts +120 -0
  127. package/dist/payments/tpay/tpayTransactionPayload.js +96 -0
  128. package/dist/payments/tpay/wallClockTime.d.ts +31 -0
  129. package/dist/payments/tpay/wallClockTime.js +57 -0
  130. package/dist/payments/tpay/webhookJwsVerifier.d.ts +17 -0
  131. package/dist/payments/tpay/webhookJwsVerifier.js +51 -0
  132. package/dist/payments/tpay/webhookNormalizer.d.ts +54 -0
  133. package/dist/payments/tpay/webhookNormalizer.js +200 -0
  134. package/dist/payments/verifiedEvidenceProjection.d.ts +12 -0
  135. package/dist/payments/verifiedEvidenceProjection.js +166 -0
  136. package/dist/payments/verifiedIngress.d.ts +119 -0
  137. package/dist/payments/verifiedIngress.js +220 -0
  138. package/dist/shipping/bindings.d.ts +5 -0
  139. package/dist/shipping/bindings.js +12 -2
  140. package/dist/shipping/index.d.ts +14 -0
  141. package/dist/shipping/index.js +5 -0
  142. package/package.json +22 -2
  143. package/release-gates.json +64 -3
  144. package/sql/20260810180000_payment_settlement_rail.sql +574 -0
  145. package/sql/20260815150000_payment_truth_reconciliation.sql +479 -0
  146. package/sql/20260826100000_late_payment_shifts_the_subscription_cycle.sql +215 -0
  147. package/sql/20261021200000_shipping_flat_rate_seed.sql +1 -0
  148. package/src/composition/composeBundle.ts +9 -0
  149. package/src/composition/index.ts +1 -0
  150. package/src/payments/adapterConformance.ts +118 -0
  151. package/src/payments/bindings.ts +17 -0
  152. package/src/payments/checkoutActivePaymentActionResolver.ts +97 -0
  153. package/src/payments/checkoutRecoveryPaymentResolver.ts +108 -0
  154. package/src/payments/contracts/adapter.ts +96 -0
  155. package/src/payments/contracts/conformance.ts +171 -0
  156. package/src/payments/contracts/evidence.ts +142 -0
  157. package/src/payments/contracts/index.ts +54 -0
  158. package/src/payments/contracts/preparedAttempt.ts +86 -0
  159. package/src/payments/contracts/reconciliation.ts +296 -0
  160. package/src/payments/contracts/repair.ts +95 -0
  161. package/src/payments/contracts/truth.ts +108 -0
  162. package/src/payments/eventConformanceRunner.ts +149 -0
  163. package/src/payments/index.ts +21 -0
  164. package/src/payments/paymentAttemptSilenceWindow.ts +26 -0
  165. package/src/payments/paymentMethodLifecycle.ts +50 -0
  166. package/src/payments/paymentProviderReconciliationAbsenceReopen.ts +130 -0
  167. package/src/payments/paymentProviderReconciliationEvidence.ts +117 -0
  168. package/src/payments/paymentProviderReconciliationWorker.ts +291 -0
  169. package/src/payments/paymentTruth.ts +131 -0
  170. package/src/payments/paymentVerifyNowHandler.ts +94 -0
  171. package/src/payments/paymentVerifyNowService.ts +125 -0
  172. package/src/payments/paymentWebhookPostProcessing.ts +36 -0
  173. package/src/payments/postgresPaymentTruth.ts +149 -0
  174. package/src/payments/preparedAttempt.ts +90 -0
  175. package/src/payments/preparedAttemptFinalization.ts +13 -0
  176. package/src/payments/schemaCapabilities.ts +10 -0
  177. package/src/payments/sql.ts +6 -0
  178. package/src/payments/stripe/classifyDecline.ts +62 -0
  179. package/src/payments/stripe/declineFailureHints.ts +89 -0
  180. package/src/payments/stripe/donorContracts.ts +87 -0
  181. package/src/payments/stripe/executionDecline.ts +126 -0
  182. package/src/payments/stripe/index.ts +235 -0
  183. package/src/payments/stripe/intentMapper.ts +58 -0
  184. package/src/payments/stripe/methodFacts.ts +21 -0
  185. package/src/payments/stripe/paymentFailureEvidence.ts +58 -0
  186. package/src/payments/stripe/stripeFailureEvidence.ts +115 -0
  187. package/src/payments/stripe/stripeIntentConfirmationEvidence.ts +34 -0
  188. package/src/payments/stripe/stripePaymentReconciliationProvider.ts +263 -0
  189. package/src/payments/stripe/stripeRefundEvidence.ts +19 -0
  190. package/src/payments/stripe/stripeSandboxPaymentExecutionAdapter.ts +283 -0
  191. package/src/payments/stripe/stripeWebhookNormalizer.ts +277 -0
  192. package/src/payments/stripe/webhookSignature.ts +55 -0
  193. package/src/payments/tpay/blikRecurringMapper.ts +42 -0
  194. package/src/payments/tpay/capabilities.ts +21 -0
  195. package/src/payments/tpay/classifyDecline.ts +62 -0
  196. package/src/payments/tpay/declineFailureHints.ts +90 -0
  197. package/src/payments/tpay/donorContracts.ts +104 -0
  198. package/src/payments/tpay/index.ts +257 -0
  199. package/src/payments/tpay/paymentFailureEvidence.ts +58 -0
  200. package/src/payments/tpay/preparedProviderAttempt.ts +38 -0
  201. package/src/payments/tpay/providerAttemptFailureDiagnostic.ts +99 -0
  202. package/src/payments/tpay/tpayCreateTransactionInput.ts +158 -0
  203. package/src/payments/tpay/tpayDeclineEvidence.ts +233 -0
  204. package/src/payments/tpay/tpayDispatchFailure.ts +186 -0
  205. package/src/payments/tpay/tpayFailureEvidence.ts +75 -0
  206. package/src/payments/tpay/tpayHttpClient.ts +290 -0
  207. package/src/payments/tpay/tpayHttpFailure.ts +186 -0
  208. package/src/payments/tpay/tpayPaymentExecutionAdapter.ts +297 -0
  209. package/src/payments/tpay/tpayPaymentReconciliationProvider.ts +285 -0
  210. package/src/payments/tpay/tpayTransactionPayload.ts +207 -0
  211. package/src/payments/tpay/wallClockTime.ts +57 -0
  212. package/src/payments/tpay/webhookJwsVerifier.ts +82 -0
  213. package/src/payments/tpay/webhookNormalizer.ts +279 -0
  214. package/src/payments/verifiedEvidenceProjection.ts +179 -0
  215. package/src/payments/verifiedIngress.ts +317 -0
  216. package/src/shipping/bindings.ts +18 -2
  217. package/src/shipping/index.ts +6 -0
package/CHANGELOG.md CHANGED
@@ -4,10 +4,170 @@ Notable changes to this public-source workspace package are recorded here.
4
4
  “Unreleased” means no npm version carries the change yet; immutable OpenLup
5
5
  source previews may already ship some changes, and their release notes say
6
6
  which. Declaration snapshots track candidate drift, not a stable API or
7
- SemVer promise.
7
+ SemVer promise. This file keeps the current release and the two previous ones;
8
+ earlier releases are recorded verbatim in `packages/platform/CHANGELOG-HISTORY.md`
9
+ in the source repository.
8
10
 
9
11
  ## [Unreleased]
10
12
 
13
+ ## [0.21.0]
14
+
15
+ - Publishable on the npm `latest` dist-tag as `0.21.0`, from tag
16
+ `openlup-platform-v0.21.0`.
17
+ - Preview set: core/outbox unchanged, UI private `0.0.0`; published `0.20.0` size baselines, unchanged caps.
18
+
19
+ ### Cumulative M07 status: payment truth and repair surfaces complete for this wave
20
+
21
+ - Experimental payments/contracts/runtime: unchanged prepared ordering; neutral execution/evidence/readback/conformance, verified truth, first-receipt ingress, method lifecycle/reconciliation; host-owned persistence, translation/failure policy.
22
+ - Native PostgreSQL truth/settlement/later-only alignment; three unchanged sparse SQL projections, not an install chain. Refunds never cancel subscriptions.
23
+ - Repair/recovery/buyer verify inject rail capabilities; unknown rails refuse. Reference BFF retains mapping/schemas/ownership/auth order/transient callbacks. Browser/verify outcomes never prove payment success.
24
+ - Reference-application source (no new export), opt-in repair view: `commerce/paymentStatusClient`, `commerce/paymentVerifyClient`, `payment/components/PaymentStatusPoller`; stored paid alone confirms, redirects require HTTPS, collection/confirmation stay injected, unsupported setup is visible. Exact file/specifier guards refuse broad commerce/operator clients; source-import proof keeps default view unmounted.
25
+ - Truth services/one optional named binder use the host executor, no new schedule/executor. Selectors default-off: nothing activates by default. First-insert adapter fingerprint excludes receipt time/audit.
26
+ - Two experimental example adapter subpaths under `./payments/`, named in the README. Card-processor example: three frozen exports, injected host client/neutral ports; refund creation, split authorization/capture and exact absence unavailable; cancellation needs host support.
27
+ - Regional-processor example: host I/O, Model O aliases, verified observations, purpose-sensitive readback; check certificate validity/notification freshness. Both examples have no import I/O/default binding and await account TEST evidence.
28
+ - Example adapter advisory: mismatched nonzero refusal money stays unknown/manual; trusted document refusals mean customer data correction; configuration mismatches throw before I/O. Unpaid/transient no-dispatch classifications unchanged.
29
+ - Settling money missing/invalid/non-positive or blank currency refuses as amount mismatch; conformance requires positive money. Empty optional transients stop false leak refusals; JSON-escaped transients in diagnostics/readbacks/stored payloads and payer contact in execution results now refuse.
30
+ - Private types reuse canonical money/attempts; unused imports removed, runtime/API unchanged.
31
+
32
+ Migration: upgrade all `@openlup/*` `0.20.0` → `0.21.0` for exact pins. No schema migration; install the canonical catalogue, not sparse projections. Attempts add optional method selection/transient payer contact; contact is dispatch-only, never persisted/audited/logged/diagnosed. Missing adapter-required input requires exact before-dispatch `notDispatched`. Registration refs/kind/status require host `resolveMethodOwner` client/subscription ownership or are omitted. Lifecycle/normalized nested audit copies typed fields only; conformance scans all for secrets/contact. Adapter-filtered redacted audit never stores raw bodies; typed evidence overrides reader facts, audit bag fills untyped facts; identity/fingerprint exclude bag/receipt time. Other changes need no migration, and nothing rewires a host automatically.
33
+
34
+ Migration: F2 replaces assumed full refund with `require-evidence`: missing/null kind/amount/operation identity is durably recorded/acknowledged, not applied. Supply original money, stable operation identity and cumulative snapshot, event delta or explicit full reversal (`refund`/`chargeback`); full evidence stays valid. Former default needs `refundEvidencePolicy: "legacy-assume-full"`, also in the reference handler; no native parity implied.
35
+
36
+ Migration: D11 changes every caller of the reference payment control port (the selected verified ingress, the existing provider webhook handler and the captured reference checkout): apply/post-process redelivery using the first stored receipt instant, not redelivery time, so it cannot shift the cycle again. Replay reads winning receipt evidence and refuses (503) when that instant is unavailable. A legacy pre-fingerprint row takes the later clock once. Retain receipt evidence on upgrade; provider routes are not switched to opt-in ingress.
37
+
38
+ ### Known limitations
39
+
40
+ - Portable dunning repair has no managed twin: exhaustion still pauses active subscriptions there; retaining active status needs a managed forward.
41
+ - D8-1: native advisory v2 promo-code candidates/rejection details unavailable.
42
+ - D8-2: native mounted v2 issue/honor/fallback unavailable.
43
+ - D8-3: native acquisition-only mounted issuance/honor unavailable.
44
+ - D8-4: full native/managed eligibility equivalence unavailable.
45
+ - Bundle-1: independent DB human-only actor-kind enforcement absent natively; first in the native-backend parity round.
46
+ - Bundle-2: managed-equivalent actor-kind/email history absent natively.
47
+ - Bundle-3 closes injected-reader M05 mounted admin/feed readback only. Native new-purchase stock read absent despite P5a installed-store proof; deferred second after bundle-1 (owner 2026-10-21); readiness refuses.
48
+ - Bundle-4: incumbent real-PostgreSQL contention only; no exactly-once guarantee.
49
+ - Managed schema/pgTAP retain `44.404`; removal needs owner decision/forward; reference composition supplies it to app code.
50
+ - A1 offline only; account/hosted-time/owner TEST evidence unclaimed; `communications/klaviyo` verification-pending.
51
+ - M05 omitted opt-ins preserve defaults/outputs/read order/schedules/refusals/acceptance-token bytes/SQL.
52
+ - Native inventory adjustment unavailable; address writes refuse readiness. Flat-rate save needs selected port/Core readiness/applied-seed observation.
53
+ - Native shipping audit unavailable; handler swallows best-effort audit failure.
54
+ - Native flat-rate integer bounds (0 through host maximum; reference 100,000 minor units) use request schema, not DB CHECK.
55
+ - Managed ATP/forecast/dated-supply/pagination readback unproved/pending M06.
56
+ - Managed two-session locks/concurrency/uncovered compensation unproved/pending M06.
57
+ - Managed exact-prefix upgrade/ledger unproved/pending M06.
58
+ - Managed address idempotency/conflict/readback unproved/pending M06.
59
+ - Managed successful flat-rate read/save unproved/pending host authority.
60
+ - M06 stock-wait lifecycle/durable timing/staging controls retain C5/C6; busy/try-gate, continuity/flag/TTL transfers are dispositions, not PASS.
61
+ - Shipping national-registry fields/locale-specific `canonicalAddressKey` fold await M16 host market pack/key migration; reference shipping copy stays locale-specific until M16.
62
+ - Native durable prepared storage, method setup, absence reopen and cumulative refunds unavailable; no production installation parity claimed.
63
+ - Typed refusal-envelope forwarding unavailable (`failureReason` only); reusable registration needs host ownership resolution.
64
+ - Incomplete chargebacks stay refunds/unapplied: reclassification bypasses evidence validation into dispute apply; limited operator recovery.
65
+ - Audit compatibility still detects `chargeId`; refund operation identity/original money supply no typed charge identity.
66
+ - M07 follow-up: repair poll can clear host redirect; post-timeout verify never restarts polling; unlocalized poller; fixture builds/never calls handler.
67
+ - M07 follow-up: reference status route wrong-rail witness.
68
+ - M07 follow-up: explicit reference-route refusal for unsupported method setup.
69
+ - M07 follow-up: deployment-neutral disabled-verify reason.
70
+ - M07 follow-up: reference card normalizer missing-amount path; package settling evidence already requires positive money.
71
+
72
+ ## [0.20.0]
73
+
74
+ - Publishable on the npm `latest` dist-tag as `0.20.0`, from tag
75
+ `openlup-platform-v0.20.0`.
76
+
77
+ - Refresh release size-gate baselines from the published `0.19.0` tarballs; all caps remain unchanged.
78
+
79
+ - Keep active subscriptions active on portable dunning exhaustion (invariant repair).
80
+
81
+ Migration: apply the complete portable catalogue through
82
+ `20261021120000_dunning_lifecycle_active_repair.sql` at position 71. Previously,
83
+ NULL next retry expired the case and paused an active subscription; it now leaves
84
+ the case open and repairable, retains the final notice and exhaustion event, and
85
+ changes no subscription or cycle dates. Existing rows are not rewritten. Pass
86
+ NULL only when `isDunningLadderExhausted` holds; a class-terminated rung-one refusal
87
+ still must not be passed as NULL. There is no managed twin yet; the managed
88
+ baseline still needs a separate forward.
89
+
90
+ - Add the readiness-gated native flat-rate binding; the host supplies the named
91
+ role-free lane and fixed-key rate port, as in the reference composition.
92
+ - Require the native port and Core readiness for the shipping seed migration.
93
+ - Refuse missing-row saves; native audit remains explicitly unsupported and best effort.
94
+
95
+ Migration:
96
+ Apply the complete portable chain through 20261021200000_shipping_flat_rate_seed.
97
+ The seed preserves an existing rate and inserts zero only when absent; no ACL or
98
+ role changes are made. New code on an unmigrated schema keeps refusing. Older code
99
+ reads the seeded zero as it read an absent row. An application rollback does not reverse either forward
100
+ (positions 71 and 72), and older runners refuse the extended ledger.
101
+ Managed host-save authority remains pending.
102
+
103
+ - Add the shipping `SHIPPING_MIGRATIONS` export and the optional
104
+ `nativeRateReadiness` / `nativeRateSchema` binding dependencies.
105
+
106
+ Migration: upgrade the complete `@openlup/*` set from `0.19.0` to `0.20.0`
107
+ for exact internal pins. Native rate bindings require the selected port plus
108
+ Core readiness and a same-database schema observation of the applied seed.
109
+ Install the complete canonical migration catalogue, never sparse package
110
+ projections as an installation chain.
111
+
112
+ ### Cumulative M06 status
113
+
114
+ - M06 remains incomplete: inventory and shipping are development-preview
115
+ surfaces, with managed-host proof classes pending.
116
+ - Inventory and shipping contracts, stock/ATP reads, reserve/release/expire
117
+ operations, subscription forecasts, delivery selection, address and flat-rate
118
+ handlers first shipped in `0.18.0`. Opt-in inventory/shipping/composition
119
+ bindings (P5a/P5b) first shipped in `0.19.0`. M06's only new behaviour in
120
+ `0.20.0` is native flat-rate save behind readiness; the portable dunning
121
+ invariant repair is separate from M06. Host-owned policy and unsupported
122
+ operations retain their explicit boundaries.
123
+
124
+ ### Known limitations
125
+
126
+ - The portable dunning invariant repair has no managed twin in this set. The
127
+ managed baseline pauses active subscriptions on exhaustion; keeping them active
128
+ requires a separate managed forward. Portable proof does not establish managed parity.
129
+
130
+ - D8-1: native advisory v2 promo-code candidates and rejection details are not supported on the native backend.
131
+ - D8-2: native mounted v2 code issue/honor/fallback is not supported on the native backend.
132
+ - D8-3: acquisition-only mounted issuance/honor is not supported on the native backend.
133
+ - D8-4: full native/managed eligibility equivalence is not supported on the native backend.
134
+ - Bundle-1: independent database human-only actor-kind enforcement is not supported on the native backend and is the first item of a future native-backend parity round.
135
+ - Bundle-2: managed-equivalent actor-kind/email history is not supported on the native backend.
136
+ - Bundle-3 remains closed for M05 mounted admin/feed readback with an injected stock reader, while native new-purchase stock reads remain unsupported despite P5a's installed native inventory-store read proof.
137
+ - Bundle-4 establishes only incumbent real-PostgreSQL contention characterization and provides no exactly-once guarantee.
138
+ - The managed baseline schema and its pgTAP tests retain the incumbent legacy value `44.404`; removing it needs a forward migration and an owner decision, while reference composition supplies that value to application code.
139
+ - A1 evidence is offline only: account verification, hosted-time behaviour and owner TEST certification are not claimed, and the `communications/klaviyo` adapter's capabilities stay verification-pending.
140
+ - M05 parity seams are opt-in and omitted bindings preserve incumbent defaults, outputs, read order, scheduling, refusals, acceptance-token bytes and exported SQL.
141
+ - Native inventory adjustment remains unsupported; native address writes refuse
142
+ required-capability readiness. Native flat-rate save is supported only behind
143
+ the selected port, Core readiness and applied-seed schema observation.
144
+ - Native new-purchase stock read is deferred to the native-backend parity round
145
+ (owner 2026-10-21), second after M05 bundle-1; required readiness still refuses
146
+ honestly.
147
+ - Native shipping-rate save has no durable audit: audit is explicitly unsupported,
148
+ and the incumbent handler swallows the best-effort audit failure.
149
+ - Native flat-rate value bounds (integer, 0 <= value <= the host request schema's
150
+ maximum) are enforced by that schema, not a database CHECK; the reference
151
+ maximum is 100,000 minor units.
152
+ - Managed host ATP/forecast/dated-supply/pagination readback is not proved and
153
+ remains pending in the M06 ledger; no managed-host parity is claimed.
154
+ - Managed two-session lock order/concurrency and uncovered compensation paths
155
+ are not proved on a managed host and remain pending; no equivalence is claimed.
156
+ - Managed exact-prefix upgrade/ledger is not proved on a managed host and remains
157
+ pending; no managed installation equivalence is claimed.
158
+ - Managed address adapter idempotency/conflict/readback is not proved on a managed
159
+ host and remains pending; no fixture-to-host equivalence is claimed.
160
+ - Managed successful flat-rate read/save remains pending host authority and is
161
+ not proved on a managed host; no successful managed host-save claim is made.
162
+ - M06 adopter stock-wait lifecycle, durable subscription timing and staging
163
+ control observations retain their separate C5/C6 evidence gates. Busy/try-gate
164
+ protocol, durable stock-wait continuity and staging flag/TTL rows transferred
165
+ to C5 adopter evidence are dispositions, not PASS.
166
+ - Shipping contracts retain national-registry address fields and
167
+ `canonicalAddressKey` retains a locale-specific character fold. M16 owns their
168
+ move behind a host-supplied market pack with a canonical-key migration plan.
169
+ - Reference shipping UI copy remains locale-specific until M16.
170
+
11
171
  ## [0.19.0]
12
172
 
13
173
  - Publishable on the npm `latest` dist-tag as `0.19.0`, from tag
@@ -54,233 +214,3 @@ Question (2026-10-21): "The platform package's root docs (README + CHANGELOG) wi
54
214
  Owner's answer: "Raise to 49,152 B (Recommended)"
55
215
  Option description shown to the owner: "Same figure as core. Unblocks the next few releases; the CHANGELOG grows every release, so this cap would otherwise block each one."
56
216
  Recorded as an owner decision taken through the coordinator's question on 2026-10-21.
57
-
58
- ## [0.18.0]
59
-
60
- - Publishable on the npm `latest` dist-tag as `0.18.0`, from tag
61
- `openlup-platform-v0.18.0`.
62
-
63
- - M06 P4: retain named compatibility shims, restrict inventory smoke evidence to package-owned tests, neutralize synthetic transport fixtures and clarify inventory documentation; no runtime or API change.
64
-
65
- ### 0.17.0 → 0.18.0 set scope
66
-
67
- - Prepare the complete development-preview set at `0.18.0`: core and outbox are
68
- unchanged republications; platform includes every change on main in this set.
69
- - M05 adds catalog foundation/contracts, draft validation, product/lifecycle DTOs,
70
- authority/GTIN/quantity helpers, media and source-pack operations,
71
- fixed-bundle read/admin/feed logic, native envelope/draft stores and an inert
72
- catalog contribution; pricing adds the neutral quote foundation, authority,
73
- subscription policy and assignment token, quote/offer projection, opt-in
74
- acquisition terms and promise consent; promotions includes advisory, preview, acceptance,
75
- admin/native reads and sweep with explicit host bindings; lifecycle/publication
76
- contracts alone do not provide a publisher or native lifecycle writes.
77
- - M05 P6: pricing and bundle comments are corrected, VAT arithmetic delegates to the
78
- existing helper and moved test fixtures are neutral with assertions unchanged;
79
- no API change.
80
- - Reference-application source: opt-in catalog, product, basket, builder and admin UI consumes explicit
81
- data/locale/media/lifecycle inputs; basket edits invalidate promise consent and
82
- minor-money display uses the currency exponent.
83
- - Shipped catalog SQL projects unchanged canonical positions 1/8/16/19/58/59/61,
84
- promotions projects 47/48 and inventory projects 27/33; native catalog factories
85
- retain the existing store bodies and references preserve their named exports.
86
- - A1 adds 17 neutral marketing/consent declarations, the three-function `communications/resend`
87
- entry, the `communications/klaviyo` marketing adapter and lazy opt-in reference bindings with
88
- invocation-time admission; default routes, schedules and handlers stay empty.
89
- Existing providers remain assignable; existing neutral entries keep their runtime
90
- behaviour (the declarations above are additive), and the maintained reference
91
- adapter and default wiring are unchanged.
92
- Authenticated raw webhooks and GET-only delivery reconciliation retain host
93
- ownership of persistence and admission; no SDK or default sender is added.
94
- `communications/klaviyo` profile projection, negative consent readback,
95
- account-wide deletion acknowledgement and authoritative consent push stay
96
- verification-pending until the host supplies owner TEST verification.
97
- Audience-scoped deletion and deletion status are unsupported; newsletter sync
98
- refuses. No flow control, historical import, suppression edits or automatic
99
- mutation retry is added.
100
- - Consent push grants stay audience-scoped; only withdrawals may be account-wide.
101
- The capability declares `grantEffect`; accepted/acknowledged results require
102
- `reconcileRequired`. Conformance keeps grants unsettled until settlement and
103
- fresh readback. Withdrawals bypass grant-caused fences/quarantine but retain
104
- same-key withdrawal fences and account cooling. No push factory, activation,
105
- callback, retry or subpath is added.
106
- - M06 in progress: inventory and shipping entries are early surfaces; module not complete
107
- - The merged M06 surfaces include inventory contracts/admin/native reads, injected
108
- new-purchase availability, reservation policy/maintenance and dated forecast
109
- calculation with required provider injection, plus shipping selection, address
110
- and rate handlers with required host validation.
111
- - @openlup/platform size growth: added M05 catalog, pricing and promotions implementations, native stores and SQL projections, A1 communications adapters and consent contracts, and the merged early M06 inventory/shipping surfaces with their declarations and documentation.
112
-
113
- Migration: upgrade the entire `@openlup/*` set from `0.17.0` to `0.18.0` for exact
114
- core peer pins; new module adoption remains explicit and experimental.
115
- Catalog and promotions server entries are adapters: their declarations require
116
- selected optional `pg` peers, while runtime imports and injected executors work
117
- without them and their contracts entries remain non-adapters. Supply host schemas, authorization,
118
- responders and policies through the documented bindings. Acquisition requires
119
- an explicit `AcquisitionFinancialPolicy` with no default; absence refuses with
120
- `acquisition_terms_policy_unconfigured`, and reference activation remains off.
121
- Bind resolved terms from the final optional issue/honor callback argument for
122
- acquisition-aware acceptance; existing callbacks remain assignable. Stop
123
- assigning `NegativeFeedback.kind` or `.outcome`, now readonly. Reference-application
124
- source threshold classifiers require the host's explicit threshold. Generated enum declaration
125
- ordering changes preserve member values and runtime behavior. Catalog adds
126
- `createPostgresBundleCatalogStore`, `createPostgresCatalogDraftStore` and
127
- `createPostgresCatalogSkuEnvelopeReadPort`, plus `BUNDLE_MIGRATIONS` (16/19) and
128
- `CATALOG_MIGRATIONS` (1/8/58/59/61); composition adds
129
- `createCatalogContribution` and `CatalogContributionInput`, with no public export
130
- removed or renamed. Existing named reference imports remain compatibility paths.
131
- The native writer, pooled transaction binding and transport remain reference-owned;
132
- browser schemas stay local. Core remains the promotions evaluator; no claim writer
133
- is added, and claim writing and mounted acceptance retain their owners. Reference
134
- shipping selection, pickup and stock UI mechanics and browser validation stay local.
135
- Install the complete canonical migration manifest, never sparse package SQL
136
- projections as an installation chain; this preparation adds no new SQL migration.
137
- A1 hosts retain credentials, identity/authority, atomic storage, environment,
138
- egress and schedule ownership; acknowledged/accepted does not establish remote
139
- effect and local consent remains authoritative.
140
-
141
- ### Known limitations
142
-
143
- - D8-1: native advisory v2 promo-code candidates and rejection details are not supported on the native backend.
144
- - D8-2: native mounted v2 code issue/honor/fallback is not supported on the native backend.
145
- - D8-3: acquisition-only mounted issuance/honor is not supported on the native backend.
146
- - D8-4: full native/managed eligibility equivalence is not supported on the native backend.
147
- - Bundle-1: independent database human-only actor-kind enforcement is not supported on the native backend and is the first item of a future native-backend parity round.
148
- - Bundle-2: managed-equivalent actor-kind/email history is not supported on the native backend.
149
- - Bundle-3 is closed for M05 mounted admin/feed readback through the merged availability builder with an injected stock reader; the real native stock read remains M06 P5a work.
150
- - Bundle-4 establishes only incumbent real-PostgreSQL contention characterization and provides no exactly-once guarantee.
151
- - The managed baseline schema and its pgTAP tests retain the incumbent legacy value `44.404`; removing it needs a forward migration and an owner decision, while reference composition supplies that value to application code.
152
- - A1 evidence is offline only: account verification, hosted-time behaviour and owner TEST certification are not claimed, and the `communications/klaviyo` adapter's capabilities stay verification-pending.
153
-
154
- ## [0.17.0]
155
-
156
- - Publishable on the npm `latest` dist-tag as `0.17.0`, from tag
157
- `openlup-platform-v0.17.0`.
158
-
159
- - Add experimental `./communications` and browser-safe
160
- `./communications/contracts`, plus generic capped raw-body, hex-HMAC and
161
- constant-time comparison helpers in the existing `./http` entry. Compose neutral
162
- transport/results/capture, rendering/content, independent Auth verification,
163
- receipt/observation, polling/reconciliation, consent and membership sync engines.
164
- Provider clients, protocol/key mapping, copy and activation remain host-owned.
165
- - Require explicit egress admission for supported injected network senders.
166
- Guarded transports validate fresh host decisions, redirect sink sends and
167
- suppress drops before network entry; provider names grant no admission.
168
- Capture remains local acceptance. Preserve the maintained reference transport
169
- through its trusted composition bridge and keep Auth/provider verification separate.
170
- - Add Polish/English invoice, role, opt-out and inquiry default-content factories
171
- with whole-copy injection. Preserve implicit Polish invoice and existing role
172
- expectations; EN invoice is construction-time opt-in. Reference opt-out page
173
- copy, EN legacy/error text, document language and escaping change deliberately.
174
- Pure inquiry rendering activates no sender. See the
175
- [B1/B2 expectation inventory](../../docs/platform/plans/oss-m04-communications-triggers.md#b1-egress-boundary).
176
- - Add an opt-in immutable composition-time purpose registry with mandatory
177
- classification and finite legacy defaults. Registration grants no consent,
178
- provider activation or managed schema permission; custom-purpose persistence
179
- stays with the host. Add neutral newsletter processing and marketing ports
180
- without a runner or a new public purpose.
181
- - Add four bounded native store groups: delivery observation/readback, existing-rail
182
- membership sync, operator notification recipients and durable consent decisions.
183
- Append CREATE-only direct catalogue position 70,
184
- `20261019200000_communications_native_operations.sql`, and its exact sparse
185
- projection. Standard factory lanes refuse unsafe effective privileges.
186
- Sync uses `public.outbox_events`; the sidecar is not another executor.
187
- - Compose selected native readback and atomic signed-token preferences with Core
188
- readiness, explicit provider/binding identities and host-supplied clocks and
189
- schedules. Add distinct opt-in operator evidence and installed substitute-provider
190
- proof. Captured, network-accepted and membership-synced are not delivered.
191
- Native consent excludes managed 16-hour / 2-day / 4-week caps and legacy
192
- contact-touching, and is not a send-time fence. No default cadence, deployment
193
- activation, full native general sender or UI package capability is added.
194
- [T07 destinations](../../docs/platform/plans/oss-m04-communications-triggers.md#t07-destination-matrix)
195
- remain explicitly open with their owning modules.
196
- - @openlup/platform size growth: added the reviewed neutral communications runtime and browser content contracts, bounded native stores and SQL projection, and their API/adoption documentation.
197
-
198
- Migration: `0.16.0` did not export communications. Upgrade the complete package
199
- set to `0.17.0` for the exact core peers, then explicitly select and bind the new
200
- experimental capability. Existing non-communications entries retain their contracts.
201
- The host retains renderer/copy, environment, origin, egress, provider protocol,
202
- credentials and schedule ownership. The generic HTTP helpers do not replace the
203
- independent Auth Standard Webhooks or provider-specific verification protocols.
204
-
205
- Install the complete selected direct canonical catalogue through position 70
206
- before selecting native stores. `COMMUNICATIONS_MIGRATIONS` projects positions
207
- 2, 9, 20 and 70; never reapply these sparse files over an existing canonical
208
- history or treat them as a standalone chain. Preserve managed/private lineage
209
- and custom-purpose persistence: registering a purpose does not expand managed
210
- CHECKs. Thread the same registered purpose union and registry through selected
211
- policy, token, newsletter and store bindings; omitted arguments retain finite
212
- legacy defaults and existing signing bytes.
213
-
214
- `registerNativeSyncWorkInTransaction` is a trusted host transaction seam. Its
215
- caller-owned executor must already hold the lane's safe effective privileges;
216
- this function does not check those privileges. The caller owns the transaction
217
- and must commit or roll back permission, sidecar and existing-rail effects
218
- atomically. Use a safely admitted lane; the helper grants no provider or claim
219
- authority. Standard native sync factory transactions check
220
- `public.communication_native_sync_state`, `public.outbox_events` and
221
- `public.communication_recipient_consents`.
222
-
223
- Custom native stores must provide binding-scoped `findByMessageId`, bounded
224
- `listEvidence` (1–100) and atomic `registerPreference` as declared by the new
225
- surface. Supply explicit provider/binding identities and full catalogue admission.
226
- Hosts preserving older opt-out page bytes retain their own presentation binding;
227
- token purposes, verification and existing HTTP status/header semantics remain.
228
- See the [package composition guidance](README.md#communications-import).
229
-
230
- Growth reading: +61.4% against the retained initial `0.16.0` baseline (256,973
231
- packed bytes), measured before S1 notes at 414,808 bytes; final S1 measurements
232
- are recorded in the programme evidence. No cap is changed. Baseline evidence
233
- (2026-10-20): the published `0.16.0` tarball is 257,434 packed bytes, SHA256
234
- `030756175d61279aab0ae7b26b27783e08467ec93673f5623d19d0b7fc436463`.
235
- S1 option B retains the initial release-gates baseline rather than replacing it
236
- with this observed registry identity.
237
-
238
- ## [0.16.0]
239
-
240
- - Publishable on the npm `latest` dist-tag as `0.16.0`, from tag
241
- `openlup-platform-v0.16.0`.
242
-
243
- - Add the experimental identity capability at `./identity` and browser-safe
244
- `./identity/contracts`: role-based authorization, actor-scoped profiles,
245
- bounded normalized contact matching, unconfirmed soft accounts with explicit
246
- email-trust policies, and configured-origin magic-link redirect resolution.
247
- - Add operator invitations with transactional pending acceptance, expiry,
248
- cancellation and revoked re-invitation for direct stores, and immediate active
249
- membership with repeat/concurrent recovery for managed stores. Direct operator
250
- login uses single-use email challenges, operator-audience sessions, live
251
- membership authorization, explicit first-administrator bootstrap and bounded
252
- challenge pruning. An opt-in OIDC access-token verifier provides pinned issuer
253
- discovery, bounded rotating JWKS, strict claim validation and deterministic
254
- issuer/subject principals for direct composition.
255
- - Add versioned personal-data contributors, identity export and transactional
256
- direct erasure with contributor vetoes, challenge/invitation cleanup,
257
- pseudonymization, guarded operator revocation and idempotent receipts. Managed
258
- export reports incomplete coverage; managed erasure refuses with
259
- `MANAGED_PRIVACY_ERASURE_UNAVAILABLE` without mutation. Issued tokens may remain
260
- valid until expiry.
261
- - Add seven byte-identical identity SQL projections and host-selected module
262
- schema readiness. The projections retain canonical migration identities and
263
- positions; they are not a standalone installation chain.
264
-
265
- Migration: identity adoption is opt-in; upgrade the complete package set together
266
- for the exact `@openlup/core` `0.16.0` peer pin. Supply the selected bundle's schema
267
- inventory, clients and delivery bindings, an explicit email-trust policy, exact
268
- redirect origins, a distinct operator audience and a deployment policy for
269
- admin, operator and privacy routes. Managed soft-account provisioning requires
270
- an email-trust envelope with automatic confirmation disabled and all enabled
271
- non-email providers declared email-verifying. Install the complete direct
272
- catalogue through `20261018190000_identity_privacy_erasures` before enabling
273
- identity; never reapply projections to an existing canonical history. Managed
274
- adopters need their committed chain's
275
- `20261018160000_identity_service_role_capabilities.sql` forward for contact linking
276
- and operator membership capabilities, and must supply their own erasure path.
277
-
278
- ## [0.15.0]
279
-
280
- - Publishable on the npm `latest` dist-tag as `0.15.0`, from tag
281
- `openlup-platform-v0.15.0`.
282
-
283
- - First publication of `@openlup/platform`, the server substrate for an OpenLup application, with one module subpath each for `http`, `bff`, `scheduler`, `blob`, `data`, `migrations`, `job-ledger`, `kernel` and `composition`.
284
- - Transport-neutral scheduled jobs: a `run(context)` contract, an empty job registry, a lease-aware runner and an authenticated HTTP cron entry, with a constant-time cron secret comparison.
285
- - Per-capability bundle readiness that refuses an unknown bundle and reports every missing scheduler, lock and blob setting together.
286
- - Blob capability selection with filesystem, Vercel Blob, Supabase Storage and S3 bindings; `pg`, `@types/pg` and `@aws-sdk/client-s3` are optional peers, and an adapter refuses a missing peer with `OPENLUP_E_PEER_MISSING`.