@openlup/platform 0.22.0 → 0.23.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 (156) hide show
  1. package/CHANGELOG.md +222 -99
  2. package/README.md +59 -589
  3. package/dist/fulfillment/adapterConformance.js +1 -1
  4. package/dist/fulfillment/bindings.js +1 -1
  5. package/dist/fulfillment/contracts/conformance.d.ts +3 -1
  6. package/dist/fulfillment/contracts/dispatch.d.ts +41 -3
  7. package/dist/fulfillment/contracts/index.d.ts +3 -3
  8. package/dist/fulfillment/contracts/observation.d.ts +21 -1
  9. package/dist/fulfillment/contracts/readback.d.ts +21 -0
  10. package/dist/fulfillment/contracts/store.d.ts +3 -0
  11. package/dist/fulfillment/contracts/sync.d.ts +58 -2
  12. package/dist/fulfillment/dispatchProjection.d.ts +20 -1
  13. package/dist/fulfillment/dispatchProjection.js +95 -6
  14. package/dist/fulfillment/index.d.ts +3 -2
  15. package/dist/fulfillment/index.js +2 -2
  16. package/dist/fulfillment/migrations.d.ts +5 -0
  17. package/dist/fulfillment/migrations.js +1 -0
  18. package/dist/fulfillment/observationProjection.d.ts +24 -3
  19. package/dist/fulfillment/observationProjection.js +65 -12
  20. package/dist/fulfillment/omnipack/client.d.ts +3 -1
  21. package/dist/fulfillment/omnipack/client.js +17 -7
  22. package/dist/fulfillment/omnipack/index.d.ts +4 -1
  23. package/dist/fulfillment/omnipack/index.js +104 -45
  24. package/dist/fulfillment/omnipack/mappers.d.ts +7 -1
  25. package/dist/fulfillment/omnipack/mappers.js +24 -2
  26. package/dist/fulfillment/omnipack/observation.d.ts +11 -4
  27. package/dist/fulfillment/omnipack/observation.js +44 -29
  28. package/dist/fulfillment/omnipack/reconciliation.d.ts +15 -0
  29. package/dist/fulfillment/omnipack/reconciliation.js +55 -0
  30. package/dist/fulfillment/postgresDispatchStore.js +1 -1
  31. package/dist/fulfillment/postgresShipmentSpine.d.ts +8 -1
  32. package/dist/fulfillment/postgresShipmentSpine.js +17 -3
  33. package/dist/fulfillment/postgresStockSyncPort.js +6 -3
  34. package/dist/fulfillment/providerDispatchAcceptance.d.ts +1 -0
  35. package/dist/fulfillment/providerDispatchAcceptance.js +8 -2
  36. package/dist/fulfillment/providerDispatchWorker.d.ts +13 -0
  37. package/dist/fulfillment/providerDispatchWorker.js +47 -20
  38. package/dist/fulfillment/providerReconciliationWorker.d.ts +27 -19
  39. package/dist/fulfillment/providerReconciliationWorker.js +75 -19
  40. package/dist/fulfillment/providerStockSyncWorker.d.ts +5 -1
  41. package/dist/fulfillment/providerStockSyncWorker.js +229 -120
  42. package/dist/fulfillment/providerTrackingReferences.d.ts +3 -2
  43. package/dist/fulfillment/verifiedIngress.d.ts +38 -11
  44. package/dist/fulfillment/verifiedIngress.js +36 -8
  45. package/dist/invoicing/capabilities.d.ts +11 -0
  46. package/dist/invoicing/capabilities.js +10 -0
  47. package/dist/invoicing/contracts/capabilities.d.ts +40 -0
  48. package/dist/invoicing/contracts/capabilities.js +1 -0
  49. package/dist/invoicing/contracts/companyLookup.d.ts +49 -0
  50. package/dist/invoicing/contracts/companyLookup.js +1 -0
  51. package/dist/invoicing/contracts/delivery.d.ts +74 -0
  52. package/dist/invoicing/contracts/delivery.js +1 -0
  53. package/dist/invoicing/contracts/facts.d.ts +100 -0
  54. package/dist/invoicing/contracts/facts.js +1 -0
  55. package/dist/invoicing/contracts/host.d.ts +246 -0
  56. package/dist/invoicing/contracts/host.js +1 -0
  57. package/dist/invoicing/contracts/index.d.ts +16 -0
  58. package/dist/invoicing/contracts/index.js +1 -0
  59. package/dist/invoicing/contracts/provider.d.ts +126 -0
  60. package/dist/invoicing/contracts/provider.js +1 -0
  61. package/dist/invoicing/contracts/settlement.d.ts +66 -0
  62. package/dist/invoicing/contracts/settlement.js +1 -0
  63. package/dist/invoicing/contracts/store.d.ts +267 -0
  64. package/dist/invoicing/contracts/store.js +1 -0
  65. package/dist/invoicing/index.d.ts +1 -0
  66. package/dist/invoicing/index.js +1 -0
  67. package/dist/subscriptions/automaticRenewal.d.ts +44 -0
  68. package/dist/subscriptions/automaticRenewal.js +81 -0
  69. package/dist/subscriptions/automaticRenewalExecution.d.ts +21 -0
  70. package/dist/subscriptions/automaticRenewalExecution.js +44 -0
  71. package/dist/subscriptions/contracts/commands.d.ts +115 -0
  72. package/dist/subscriptions/contracts/commands.js +1 -0
  73. package/dist/subscriptions/contracts/dunning.d.ts +133 -0
  74. package/dist/subscriptions/contracts/dunning.js +1 -0
  75. package/dist/subscriptions/contracts/index.d.ts +6 -0
  76. package/dist/subscriptions/contracts/index.js +1 -0
  77. package/dist/subscriptions/contracts/messages.d.ts +43 -0
  78. package/dist/subscriptions/contracts/messages.js +1 -0
  79. package/dist/subscriptions/contracts/renewal.d.ts +533 -0
  80. package/dist/subscriptions/contracts/renewal.js +1 -0
  81. package/dist/subscriptions/contracts/stockWait.d.ts +73 -0
  82. package/dist/subscriptions/contracts/stockWait.js +1 -0
  83. package/dist/subscriptions/index.d.ts +39 -0
  84. package/dist/subscriptions/index.js +17 -0
  85. package/dist/subscriptions/paymentOutcomes.d.ts +8 -0
  86. package/dist/subscriptions/paymentOutcomes.js +27 -0
  87. package/dist/subscriptions/postgresRenewalStore.d.ts +20 -0
  88. package/dist/subscriptions/postgresRenewalStore.js +61 -0
  89. package/dist/subscriptions/postgresRetryStore.d.ts +78 -0
  90. package/dist/subscriptions/postgresRetryStore.js +142 -0
  91. package/dist/subscriptions/renewalCycleFailureMechanism.d.ts +34 -0
  92. package/dist/subscriptions/renewalCycleFailureMechanism.js +79 -0
  93. package/dist/subscriptions/renewalCycleMechanism.d.ts +46 -0
  94. package/dist/subscriptions/renewalCycleMechanism.js +157 -0
  95. package/dist/subscriptions/renewalCycleRefusalMechanism.d.ts +41 -0
  96. package/dist/subscriptions/renewalCycleRefusalMechanism.js +160 -0
  97. package/dist/subscriptions/renewalIdentity.d.ts +3 -0
  98. package/dist/subscriptions/renewalIdentity.js +4 -0
  99. package/package.json +22 -2
  100. package/release-gates.json +56 -3
  101. package/sql/20261022160000_subscription_retry_lifecycle.sql +328 -0
  102. package/sql/20261022165000_fulfillment_stock_evidence_replay_reopen.sql +30 -0
  103. package/src/fulfillment/adapterConformance.ts +1 -1
  104. package/src/fulfillment/bindings.ts +1 -1
  105. package/src/fulfillment/contracts/conformance.ts +3 -1
  106. package/src/fulfillment/contracts/dispatch.ts +20 -5
  107. package/src/fulfillment/contracts/index.ts +3 -3
  108. package/src/fulfillment/contracts/observation.ts +11 -3
  109. package/src/fulfillment/contracts/readback.ts +13 -0
  110. package/src/fulfillment/contracts/store.ts +1 -0
  111. package/src/fulfillment/contracts/sync.ts +13 -2
  112. package/src/fulfillment/dispatchProjection.ts +92 -7
  113. package/src/fulfillment/index.ts +3 -2
  114. package/src/fulfillment/migrations.ts +1 -0
  115. package/src/fulfillment/observationProjection.ts +64 -13
  116. package/src/fulfillment/omnipack/client.ts +19 -7
  117. package/src/fulfillment/omnipack/index.ts +96 -39
  118. package/src/fulfillment/omnipack/mappers.ts +23 -2
  119. package/src/fulfillment/omnipack/observation.ts +45 -27
  120. package/src/fulfillment/omnipack/reconciliation.ts +56 -0
  121. package/src/fulfillment/postgresDispatchStore.ts +1 -1
  122. package/src/fulfillment/postgresShipmentSpine.ts +21 -4
  123. package/src/fulfillment/postgresStockSyncPort.ts +6 -3
  124. package/src/fulfillment/providerDispatchAcceptance.ts +9 -3
  125. package/src/fulfillment/providerDispatchWorker.ts +48 -20
  126. package/src/fulfillment/providerReconciliationWorker.ts +81 -25
  127. package/src/fulfillment/providerStockSyncWorker.ts +222 -126
  128. package/src/fulfillment/providerTrackingReferences.ts +3 -2
  129. package/src/fulfillment/verifiedIngress.ts +44 -11
  130. package/src/invoicing/capabilities.ts +9 -0
  131. package/src/invoicing/contracts/capabilities.ts +15 -0
  132. package/src/invoicing/contracts/companyLookup.ts +13 -0
  133. package/src/invoicing/contracts/delivery.ts +24 -0
  134. package/src/invoicing/contracts/facts.ts +60 -0
  135. package/src/invoicing/contracts/host.ts +85 -0
  136. package/src/invoicing/contracts/index.ts +16 -0
  137. package/src/invoicing/contracts/provider.ts +78 -0
  138. package/src/invoicing/contracts/settlement.ts +39 -0
  139. package/src/invoicing/contracts/store.ts +98 -0
  140. package/src/invoicing/index.ts +1 -0
  141. package/src/subscriptions/automaticRenewal.ts +87 -0
  142. package/src/subscriptions/automaticRenewalExecution.ts +39 -0
  143. package/src/subscriptions/contracts/commands.ts +46 -0
  144. package/src/subscriptions/contracts/dunning.ts +48 -0
  145. package/src/subscriptions/contracts/index.ts +6 -0
  146. package/src/subscriptions/contracts/messages.ts +18 -0
  147. package/src/subscriptions/contracts/renewal.ts +325 -0
  148. package/src/subscriptions/contracts/stockWait.ts +34 -0
  149. package/src/subscriptions/index.ts +24 -0
  150. package/src/subscriptions/paymentOutcomes.ts +23 -0
  151. package/src/subscriptions/postgresRenewalStore.ts +76 -0
  152. package/src/subscriptions/postgresRetryStore.ts +174 -0
  153. package/src/subscriptions/renewalCycleFailureMechanism.ts +119 -0
  154. package/src/subscriptions/renewalCycleMechanism.ts +225 -0
  155. package/src/subscriptions/renewalCycleRefusalMechanism.ts +215 -0
  156. package/src/subscriptions/renewalIdentity.ts +5 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,228 @@ in the source repository.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.23.0]
14
+
15
+ - Publishable on the npm `latest` dist-tag as `0.23.0`, from tag
16
+ `openlup-platform-v0.23.0`.
17
+
18
+ - Add `approveTrackingUrl` inputs to `verifyAndNormalizeFulfillmentObservation`,
19
+ `PostgresFulfillmentShipmentSpineOptions`, `FulfillmentAdapterConformanceSubject`
20
+ and reconciliation `trackingCodecs`. Under the strict default, provider tracking
21
+ URLs persist only with host approval and must be query-free and credential-free
22
+ HTTPS; host-built tracking URLs pass unchanged, including query strings.
23
+ - Existing `reconcileFulfillmentObservations` callers now receive row-local unknown
24
+ readback failures (`ok: false` with `failures`) while recognized rows still
25
+ process.
26
+ - Observation ingest (`verifyAndNormalizeFulfillmentObservation`, the native
27
+ `recordObservation`, `reconcileFulfillmentObservations` and
28
+ `runFulfillmentReconciliationPage`) now applies the durable-sink sanitizer: provider-derived
29
+ references outside the opaque reference rule (for example `#1001` or
30
+ `ORD/2026/1`) are stored as null or redacted and counted instead of verbatim,
31
+ and `firstReceivedAt` must be an RFC 3339 timestamp with an offset; other
32
+ values fail ingest or the reconciliation row. A correlation refused to null can
33
+ be quarantined as `missing_correlation` in reconciliation.
34
+ - Fulfillment reconciliation inputs replace `readLocalFulfillmentState` with
35
+ `readLocalFulfillmentStatus`, `latestStatusOccurredAt` and `readHandedOverAt`;
36
+ migrate host persistence implementations to these three reads.
37
+ - Add exported page observation contracts and `runFulfillmentReconciliationPage`
38
+ for host-owned scheduling, checkpoint resume and HTTP/ledger result projection;
39
+ exact lookup remains separate. `providerCalls` counts logical page-port reads,
40
+ including failures and exhaustion, separately from transport retries.
41
+ - Add redacted dispatch transcript/mapping fields, typed operation errors,
42
+ acceptance recovery evidence and provider-status occurrence evidence. Existing
43
+ unchanged stage/live dispatch identities retain their stored evidence for native replay.
44
+ - Migration: shadow drafts/attempts recorded by `0.22.0`'s native dispatch store
45
+ do not replay after this change: shadow now hashes the local candidate rather
46
+ than the provider-prepared command. Claim may consume a remap or raise
47
+ `fulfillment_dispatch_remap_exhausted`; an existing attempt may raise
48
+ `fulfillment_attempt_key_conflict`. Complete or abandon such drafts before
49
+ upgrading. The `0.22.0` native dispatch store has no adopter; no compatibility
50
+ transition is supplied.
51
+ - D2 KEEP-GAP: native `fulfillment_dispatch_finish` drops rejected/unknown error
52
+ detail; durable retention is a scheduled SQL follow-up.
53
+
54
+ - Compatibility: `getStock()` and `getStockMovements()` now return a row union;
55
+ consumers must discriminate rejections with
56
+ `"kind" in row && row.kind === "rejected"` before reading observation fields.
57
+ Provider read failures now return failed worker results (`ok: false`) with
58
+ persisted `providerError` diagnostics when the provider supplies a typed failure,
59
+ instead of throwing. Hosts can map those
60
+ failures to HTTP 502; terminal cursor-write failures still reject.
61
+ Cursor reads, running-cursor writes, local stock/class/reservation reads and
62
+ stock/evidence writes or SKU evidence resolution now also resolve `ok: false`
63
+ instead of rejecting when a terminal failed cursor can be persisted.
64
+ - `SyncCursor` adds optional `syncRunId`, `counts`, `items`, `alerts`, `staleSync`
65
+ and `error`, worker results add `rejected`, `items`, `providerError` and `refusal`,
66
+ and `fulfillment_stock_sync_cursors.error_code` now stores safe operation reasons
67
+ (including `operation:SQLSTATE`) or typed provider/admission reasons instead of
68
+ the generic `io_failure`.
69
+ - Mixed valid/rejected batches with valid stock rows succeed, retain rejection
70
+ counts and diagnostics, evaluate/resolve alerts for valid SKUs and advance
71
+ `lastStockSyncedAt`; an empty stock response is also valid, but a nonempty stock
72
+ response with no valid stock rows is malformed and non-retryable even with valid
73
+ movements, preserves prior coverage gaps and cannot resolve stale alerts.
74
+ Typed disabled, not-ready and bad-identity refusals retain their original reason
75
+ and retryability in the worker result and cursor.
76
+ Blank stock SKU references are skipped before persistence; stale-sync recovery
77
+ resolves after the terminal cursor, with cleanup failure preserving success.
78
+ Stock and movement rejection diagnostics carry a `kind` discriminator.
79
+ Stock-sync redirects are non-retryable, report `redirect_refused` and make only
80
+ one GET attempt; exhausted stock network reads remain retryable through the stock
81
+ failure projection. Product-sync retains the base client diagnostics and retry
82
+ behavior, including `retryable: false` after exhausted network reads.
83
+ - Stock-sync alert fingerprints now contain only `requestKey`, `skuRef` and
84
+ `thresholdKind`: changing quantities, severity or run evidence under the same
85
+ key returns `replayed: true`. Different SKUs or thresholds use different keys;
86
+ a changed identity under a reused key still conflicts.
87
+ - Closed the scheduled KEEP-GAP for stock alert refresh/reopen with native forward
88
+ `20261022165000_fulfillment_stock_evidence_replay_reopen.sql`. Matching-identity
89
+ replay reopens the alert, refreshes severity/quantities and clears `resolved_at`;
90
+ identity mismatches retain SQLSTATE `23505`.
91
+
92
+ Migration: install the complete native catalogue through `20261022165000` before
93
+ stock adoption. The package descriptor and SQL asset project that same forward;
94
+ replay preserves the row identity, first-seen time and historical resolver run.
95
+ There is no managed forward or legacy fingerprint rewrite.
96
+
97
+ Migration: alert rows written by 0.22.0's native port carry the earlier whole-input fingerprint; subsequent writes under those keys conflict with SQLSTATE `23505`, and resolve only marks the row resolved while retaining its key and fingerprint, so it does not clear the conflict. Legacy fingerprints are documented only; this change does not rewrite them.
98
+
99
+ - Fulfillment ingress exposes receipt IDs, a host-neutral HTTP result mapping,
100
+ counted correlation/timestamp/tracking refusals and persisted safe superseded
101
+ causes. The opt-in adapter preserves donor webhook key bytes and defaults to
102
+ strict opaque references. Adopters can explicitly allow wider reference shapes
103
+ through `observationCodecs.approveReference`; tracking URLs retain their strict
104
+ default policy. `carrierRef` now stores the service-derived lowercase carrier
105
+ prefix by default, or the safe kind returned by `normalizeCarrier`, and effects
106
+ receive that same value as `carrierKind`. Both are null when no kind is available
107
+ or service evidence is refused; raw provider carrier codes have no fallback,
108
+ matching donor deduplication. Strict timestamp validation applies only at
109
+ webhook ingress, accepting compact offsets and local timestamps as before;
110
+ reconciliation and stock-movement timestamp parsing retain PR2 behavior.
111
+ Hosts retain referenced raw evidence.
112
+
113
+ Migration (observation ingress): donor-format colon identities remain the
114
+ compatibility target. Observation receipts/effects recorded by 0.22.0's native
115
+ stores under package digest keys are not recognized under the incumbent colon
116
+ keys, so retrying such an event can apply tracking again. Replaying a superseded
117
+ receipt processed by 0.22.0 fails with `fulfillment_observation_outcome_conflict`.
118
+ Drain in-flight observation retries before upgrading. No bridges or aliases are
119
+ provided for these native rows. Wider incumbent correlation/tracking references
120
+ require an explicit adopter allowlist; the default refuses and reports them.
121
+
122
+ Close the scheduled native stock-evidence refresh/reopen gap with forward
123
+ `20261022165000_fulfillment_stock_evidence_replay_reopen.sql` and its byte-identical
124
+ fulfillment package projection. Matching fingerprints refresh severity and nullable
125
+ quantities, reopen status, and clear `resolved_at`; identity, first-seen time and
126
+ historical resolver metadata survive. Existing-row replays and resolution serialize
127
+ on the row lock. Fingerprint mismatches still raise `23505`.
128
+
129
+ Migration: install the complete canonical native catalogue through `20261022165000`
130
+ before stock adoption, preserving its immutable ledger prefix. Sparse package SQL
131
+ is not a standalone install chain. The managed baseline already has this behavior.
132
+ Legacy 0.22.0 whole-input fingerprints are not rewritten and still conflict with
133
+ PR1 identity fingerprints, including after resolution.
134
+
135
+ - Add experimental invoicing declarations and explicit default-off capability selection, preserving exact absence, uncertain effects, correction identity and owed-duty visibility.
136
+ - Freeze host fiscal/facts/seller/money, registry, artifact, delivery, payout-item and safe account-history seams without installing a worker, store, provider or route.
137
+
138
+ Approve only the exact frozen M10/F17 native and managed SQL packet through a separate forward-control class, with inert fixtures, refusal plants and a required real PostgreSQL/pgTAP catalog gate. This control adds no migration, runtime activation or new permission to an installation.
139
+
140
+ - Add experimental subscription contracts and exact server/browser subpaths, preserving schedule identity, graph transaction boundaries, deferred admission and explicit native capability refusals.
141
+ - Contribute the unchanged hosted cycle, refusal and durable failure mechanisms with injected policy and their characterization; preserve native captured-case protection through rollback until actual arrival.
142
+
143
+ - Add injected native renewal and retry stores and a native executor using the subscription ports; bind hosted charge/failure facades to the contributed mechanism and existing M07 policies.
144
+ - Type-level change visible to dev-preview consumers: `capabilities.retryRecovery` changes from `"unavailable"` to `"selected"` (asserted in packages/platform/test/subscriptions/portFit.test.ts).
145
+
146
+ Migration: Install native N1 through the full ordered manifest before composing the retry driver. Native declines can retry or recover the original obligation instead of stalling indefinitely (F16); exhaustion leaves an active subscription and open case with no next retry. Preserve ledgers on rollback. The initial binding preserves case-before-outcome order and atomic terminal/bookkeeping writes. An existing immutable receipt short-circuits initial terminal replay before settlement, rebinding or case propagation, preserving all later retry effects; no runner is activated and M07 native prepared-store parity remains unavailable.
147
+
148
+ Host obligations: establish explicit logical-cycle correlation before invoking the runner (including prepare/execute). Ordinary retries must use the frozen mandate/authorization; N1 does not bind an ordinary retry method, so the P8 retry driver or host must enforce this, with a composition witness added in P8. Prepared retries retain the existing non-terminal `retry_scheduled` disposition with no next dispatch date. Bare `failed` execution status without explicit failure evidence requires verified readback (or remains awaiting an ACK).
149
+
150
+ A host or driver must never call `openCase` after a replayed `applyFailure` receipt, and the P8 retry driver must add a zero-delta replay witness.
151
+
152
+ ### Warehouse product-sync parity
153
+
154
+ A3 #311 restores product-sync parity and safe diagnostics in the opt-in warehouse
155
+ adapter, including product/pack projection and injected transport behavior.
156
+ It remains default-off with offline evidence only and no provider-account proof.
157
+
158
+ Migration: upgrade the complete core/outbox/platform set from `0.22.0` to
159
+ `0.23.0` for exact peers. Install the complete canonical native chain through
160
+ position 76 (`20261022165000_fulfillment_stock_evidence_replay_reopen.sql`),
161
+ including native N1, before selecting native stores. Sparse package SQL is not
162
+ an installation chain. Follow the shadow-draft, observation-retry and legacy
163
+ alert-fingerprint migration notes above; rollback preserves the forward ledger.
164
+
165
+ ### Experimental stages: no adopter activation
166
+
167
+ M10 subscription renewal/retry is **EXPERIMENTAL, INCOMPLETE and DEFAULT-OFF**,
168
+ not for adopter activation. This set includes P1 exports, the forward controls,
169
+ and P2 native renewal/retry stores and executor with native N1 SQL landed.
170
+ No runner is activated. G23 composition and N1 correlation, frozen authorization
171
+ and replay obligations remain pending: compose admission before any new cycle,
172
+ bind a logical cycle before prepare/execute, enforce frozen authorization on
173
+ ordinary retries, and never open a case after a replayed failure receipt.
174
+ The later retry driver still owes its zero-delta replay witness.
175
+
176
+ M09 invoicing capability selection and type-only contracts are
177
+ **EXPERIMENTAL, INCOMPLETE and DEFAULT-OFF**, not for adopter activation.
178
+ There is no invoicing SQL, store, worker, provider or route in this stage.
179
+ Installing the set does not register subscription or invoicing routes, workers
180
+ or a renewal runner; host composition remains explicit.
181
+
182
+ ### Known limitations
183
+
184
+ - Managed dunning exhaustion still pauses active subscriptions; retaining active status needs a managed forward. Native N1 lands the bounded retry/failure repair, with the host obligations below still pending.
185
+ - D8-1: native advisory v2 promo-code candidates/rejection details unavailable.
186
+ - D8-2: native mounted v2 issue/honor/fallback unavailable.
187
+ - D8-3: native acquisition-only mounted issuance/honor unavailable.
188
+ - D8-4: full native/managed eligibility equivalence unavailable.
189
+ - Bundle-1: independent DB human-only actor-kind enforcement absent natively; first in the native-backend parity round.
190
+ - Bundle-2: managed-equivalent actor-kind/email history absent natively.
191
+ - 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.
192
+ - Bundle-4: incumbent real-PostgreSQL contention only; no exactly-once guarantee.
193
+ - Managed schema/pgTAP retain `44.404`; removal needs owner decision/forward; reference composition supplies it to app code.
194
+ - A1 offline only; account/hosted-time/owner TEST evidence unclaimed; `communications/klaviyo` verification-pending.
195
+ - M05 omitted opt-ins preserve defaults/outputs/read order/schedules/refusals/acceptance-token bytes/SQL.
196
+ - Native inventory adjustment unavailable; address writes refuse readiness. Flat-rate save needs selected port/Core readiness/applied-seed observation.
197
+ - Native shipping audit unavailable; handler swallows best-effort audit failure.
198
+ - Native flat-rate integer bounds (0 through host maximum; reference 100,000 minor units) use request schema, not DB CHECK.
199
+ - Managed ATP/forecast/dated-supply/pagination readback unproved/pending M06.
200
+ - Managed two-session locks/concurrency/uncovered compensation unproved/pending M06.
201
+ - Managed exact-prefix upgrade/ledger unproved/pending M06.
202
+ - Managed address idempotency/conflict/readback unproved/pending M06.
203
+ - Managed successful flat-rate read/save unproved/pending host authority.
204
+ - M06 stock-wait lifecycle/durable timing/staging controls retain C5/C6; busy/try-gate, continuity/flag/TTL transfers are dispositions, not PASS.
205
+ - Shipping national-registry fields/locale-specific `canonicalAddressKey` fold await M16 host market pack/key migration; reference shipping copy stays locale-specific until M16.
206
+ - Native durable prepared storage, method setup, absence reopen and cumulative refunds unavailable; no production installation parity claimed.
207
+ - Typed refusal-envelope forwarding unavailable (`failureReason` only); reusable registration needs host ownership resolution.
208
+ - Incomplete chargebacks stay refunds/unapplied: reclassification bypasses evidence validation into dispute apply; limited operator recovery.
209
+ - Audit compatibility still detects `chargeId`; refund operation identity/original money supply no typed charge identity.
210
+ - M07 follow-up: repair poll can clear host redirect; post-timeout verify never restarts polling; unlocalized poller; fixture builds/never calls handler.
211
+ - M07 follow-up: reference status route wrong-rail witness.
212
+ - M07 follow-up: explicit reference-route refusal for unsupported method setup.
213
+ - M07 follow-up: deployment-neutral disabled-verify reason.
214
+ - M07 follow-up: reference card normalizer missing-amount path; package settling evidence already requires positive money.
215
+
216
+ - Native delivery alignment stays off or shadow until a host composes the native automatic-renewal runner with the G23 renewal admission decorator. The decorator alone neither composes nor activates the runner.
217
+ - The core fulfillment status map carries localized adopter labels; replace them with host-injected labels or internationalization keys at the host presentation boundary.
218
+ - The warehouse adapter example is opt-in and has offline conformance only; no provider-account proof or activation is established. Exact absence, label create/void and cancellation remain unsupported.
219
+ - After an alignment extension, a deferred renewal operation at the old schedule remains claimed with no reader or reservation effect. Changed terms snapshots conflict under the existing snapshot-conflict rules.
220
+
221
+ Native parity remains host-owned at these seams. Missing native bindings use the shared `FULFILLMENT_NATIVE_UNSUPPORTED` refusal; no partial write or parity claim is implied.
222
+
223
+ | Amendment | Host-owned seam and native boundary |
224
+ | --- | --- |
225
+ | G18 | Replacement creation and atomic eligibility/replay receipts; native replacement callback refuses. |
226
+ | G19 | Operator mutations, actor attribution and replay receipts; native mutation callbacks refuse. |
227
+ | G20 | Customer alignment rows; native reader refuses, while the pure delay projection remains callable. |
228
+ | G21 | Commerce list/detail and shipments overview; native read callbacks refuse. |
229
+ | G22 | Authoritative preparation edits, authorization and replay receipts; missing preparation binding refuses before dispatch, after disabled/selection/readiness checks. |
230
+
231
+ - M08 parity D2 KEEP-GAP: native dispatch finish still loses rejected/unknown error detail.
232
+ - M08 parity KEEP-GAP: immutable stock snapshot/alert evidence storage is absent; cursor JSON is overwritten. Hosts retain referenced evidence.
233
+ - Stock-evidence replay/reopen is CLOSED by native position 76; legacy `0.22.0` alert fingerprints still conflict with `23505`, including after resolution.
234
+
13
235
  ## [0.22.0]
14
236
 
15
237
  - Publishable on the npm `latest` dist-tag as `0.22.0`, from tag
@@ -278,102 +500,3 @@ Migration: D11 changes every caller of the reference payment control port (the s
278
500
  - M07 follow-up: explicit reference-route refusal for unsupported method setup.
279
501
  - M07 follow-up: deployment-neutral disabled-verify reason.
280
502
  - M07 follow-up: reference card normalizer missing-amount path; package settling evidence already requires positive money.
281
-
282
- ## [0.20.0]
283
-
284
- - Publishable on the npm `latest` dist-tag as `0.20.0`, from tag
285
- `openlup-platform-v0.20.0`.
286
-
287
- - Refresh release size-gate baselines from the published `0.19.0` tarballs; all caps remain unchanged.
288
-
289
- - Keep active subscriptions active on portable dunning exhaustion (invariant repair).
290
-
291
- Migration: apply the complete portable catalogue through
292
- `20261021120000_dunning_lifecycle_active_repair.sql` at position 71. Previously,
293
- NULL next retry expired the case and paused an active subscription; it now leaves
294
- the case open and repairable, retains the final notice and exhaustion event, and
295
- changes no subscription or cycle dates. Existing rows are not rewritten. Pass
296
- NULL only when `isDunningLadderExhausted` holds; a class-terminated rung-one refusal
297
- still must not be passed as NULL. There is no managed twin yet; the managed
298
- baseline still needs a separate forward.
299
-
300
- - Add the readiness-gated native flat-rate binding; the host supplies the named
301
- role-free lane and fixed-key rate port, as in the reference composition.
302
- - Require the native port and Core readiness for the shipping seed migration.
303
- - Refuse missing-row saves; native audit remains explicitly unsupported and best effort.
304
-
305
- Migration:
306
- Apply the complete portable chain through 20261021200000_shipping_flat_rate_seed.
307
- The seed preserves an existing rate and inserts zero only when absent; no ACL or
308
- role changes are made. New code on an unmigrated schema keeps refusing. Older code
309
- reads the seeded zero as it read an absent row. An application rollback does not reverse either forward
310
- (positions 71 and 72), and older runners refuse the extended ledger.
311
- Managed host-save authority remains pending.
312
-
313
- - Add the shipping `SHIPPING_MIGRATIONS` export and the optional
314
- `nativeRateReadiness` / `nativeRateSchema` binding dependencies.
315
-
316
- Migration: upgrade the complete `@openlup/*` set from `0.19.0` to `0.20.0`
317
- for exact internal pins. Native rate bindings require the selected port plus
318
- Core readiness and a same-database schema observation of the applied seed.
319
- Install the complete canonical migration catalogue, never sparse package
320
- projections as an installation chain.
321
-
322
- ### Cumulative M06 status
323
-
324
- - M06 remains incomplete: inventory and shipping are development-preview
325
- surfaces, with managed-host proof classes pending.
326
- - Inventory and shipping contracts, stock/ATP reads, reserve/release/expire
327
- operations, subscription forecasts, delivery selection, address and flat-rate
328
- handlers first shipped in `0.18.0`. Opt-in inventory/shipping/composition
329
- bindings (P5a/P5b) first shipped in `0.19.0`. M06's only new behaviour in
330
- `0.20.0` is native flat-rate save behind readiness; the portable dunning
331
- invariant repair is separate from M06. Host-owned policy and unsupported
332
- operations retain their explicit boundaries.
333
-
334
- ### Known limitations
335
-
336
- - The portable dunning invariant repair has no managed twin in this set. The
337
- managed baseline pauses active subscriptions on exhaustion; keeping them active
338
- requires a separate managed forward. Portable proof does not establish managed parity.
339
-
340
- - D8-1: native advisory v2 promo-code candidates and rejection details are not supported on the native backend.
341
- - D8-2: native mounted v2 code issue/honor/fallback is not supported on the native backend.
342
- - D8-3: acquisition-only mounted issuance/honor is not supported on the native backend.
343
- - D8-4: full native/managed eligibility equivalence is not supported on the native backend.
344
- - 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.
345
- - Bundle-2: managed-equivalent actor-kind/email history is not supported on the native backend.
346
- - 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.
347
- - Bundle-4 establishes only incumbent real-PostgreSQL contention characterization and provides no exactly-once guarantee.
348
- - 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.
349
- - 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.
350
- - M05 parity seams are opt-in and omitted bindings preserve incumbent defaults, outputs, read order, scheduling, refusals, acceptance-token bytes and exported SQL.
351
- - Native inventory adjustment remains unsupported; native address writes refuse
352
- required-capability readiness. Native flat-rate save is supported only behind
353
- the selected port, Core readiness and applied-seed schema observation.
354
- - Native new-purchase stock read is deferred to the native-backend parity round
355
- (owner 2026-10-21), second after M05 bundle-1; required readiness still refuses
356
- honestly.
357
- - Native shipping-rate save has no durable audit: audit is explicitly unsupported,
358
- and the incumbent handler swallows the best-effort audit failure.
359
- - Native flat-rate value bounds (integer, 0 <= value <= the host request schema's
360
- maximum) are enforced by that schema, not a database CHECK; the reference
361
- maximum is 100,000 minor units.
362
- - Managed host ATP/forecast/dated-supply/pagination readback is not proved and
363
- remains pending in the M06 ledger; no managed-host parity is claimed.
364
- - Managed two-session lock order/concurrency and uncovered compensation paths
365
- are not proved on a managed host and remain pending; no equivalence is claimed.
366
- - Managed exact-prefix upgrade/ledger is not proved on a managed host and remains
367
- pending; no managed installation equivalence is claimed.
368
- - Managed address adapter idempotency/conflict/readback is not proved on a managed
369
- host and remains pending; no fixture-to-host equivalence is claimed.
370
- - Managed successful flat-rate read/save remains pending host authority and is
371
- not proved on a managed host; no successful managed host-save claim is made.
372
- - M06 adopter stock-wait lifecycle, durable subscription timing and staging
373
- control observations retain their separate C5/C6 evidence gates. Busy/try-gate
374
- protocol, durable stock-wait continuity and staging flag/TTL rows transferred
375
- to C5 adopter evidence are dispositions, not PASS.
376
- - Shipping contracts retain national-registry address fields and
377
- `canonicalAddressKey` retains a locale-specific character fold. M16 owns their
378
- move behind a host-supplied market pack with a canonical-key migration plan.
379
- - Reference shipping UI copy remains locale-specific until M16.