commerce: mark roadmap complete + record Phase 5 extension backlog
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m11s

Base roadmap (Phases 1-4) done at 185/185. Records thesis-aligned extension
candidates (line-level discount attribution, time-windowed promos, discount-aware
tax, refund flow, stock-constrained reservation) for subsequent loop iterations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 09:55:12 +00:00
parent a4275c4944
commit 498b61e9b3

View File

@@ -75,6 +75,21 @@ lib/commerce/api.sx ── (commerce/add) (commerce/total) (commerce/checkout)
- [x] cross-instance catalog (federated marketplace) — out-of-scope stub
- [x] tests: webhook replay, partial refund, double-charge guard
## Phase 5 — Extensions (backlog; base roadmap complete)
Thesis-aligned deepenings of the relational/composition showcase. Pick the one
that unlocks the most tests per effort each iteration.
- [ ] line-level discount attribution — "which line item triggered this discount?"
as a backward miniKanren query (briefing gotcha; promos currently apply at
class level). Refactor promo amounts to also yield per-line attribution.
- [ ] time-windowed promotions — promos gated by a validity window; quote takes a
datetime, determinism preserved. (quote.sx already documents datetime intent.)
- [ ] discount-aware tax policy — alternative `cart-quote` computing tax on the
net (post-discount) base via proportional class allocation; explicit + tested.
- [ ] refund as a flow — refund lifecycle (request → approve → settle) as a second
flow-on-sx flow, recorded in the ledger; idempotent.
- [ ] stock-constrained reservation — order-begin! fails (railway `fail`) when
requested qty exceeds stocko availability; reservation decrements a stock view.
## Progress log
- 2026-06-07 — `recon.sx` + `federation.sx` (**Phase 4 complete — roadmap done**).
`recon.sx`: reconciliation as relational queries over the ledger. Per-order