commerce: end-to-end composition integration suite (19 tests) — hardening
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 36s

tests/integration.sx — one narrative across every module: catalog -> stock
check -> quote (promo+stack+tax) -> attribution -> order flow -> payment
envelope -> settle -> recon -> refund flow -> ledger mismatch, asserting the
seams tie together with consistent numbers. Proves the three-substrate
composition (minikanren pricing + flow lifecycle + persist ledger) end to end.
Total 297/297 across 18 suites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 13:40:02 +00:00
parent e66fbfc540
commit 744bbb445c
5 changed files with 119 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ reconciliation — all auditable via the event log.
## Status (rolling)
`bash lib/commerce/conformance.sh`**278/278** (17 suites; + refund) — **roadmap + full Phase 5 backlog complete**
`bash lib/commerce/conformance.sh`**297/297** (18 suites; + integration) — **roadmap + Phase 5 backlog + e2e composition proof complete**
## Ground rules
@@ -101,6 +101,13 @@ that unlocks the most tests per effort each iteration.
agnostic; `order-settle!(ref, amount)` is the resume seam.
## Progress log
- 2026-06-07 — `tests/integration.sx` (hardening): end-to-end composition proof —
one narrative across every module (catalog → stock check → quote[promo+stack+tax]
→ attribution → order flow → payment envelope → settle → recon → refund flow →
ledger mismatch) asserting the seams tie together with consistent numbers
(subtotal 2400, discount 210, tax 320, total 2510; settle→:ok; refund 510→
:underpaid; mismatch flagged). Proves the three-substrate composition. One env
with both order+refund flows. integration suite 19/19; total 297/297 (18 suites).
- 2026-06-07 — `refund.sx` (**Phase 5 backlog complete**): refund lifecycle as a
second flow-on-sx flow `(lambda (oid) (begin (request 'approve oid) (request
'settle oid)))` — two suspension points (approval = human/policy decision,