commerce: cart line items + add/remove/set-qty + relational view (18 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 55s

cart.sx — cart as an ordered list of (sku variant qty) lines. Pure
operations: cart-add (merge-or-append), cart-set-qty (0 removes),
cart-remove, with cart-qty/count/skus/empty? accessors. cart-lineo
exposes lines relationally via membero. Total 34/34.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 23:42:49 +00:00
parent 25f3734eab
commit 35957d779f
6 changed files with 204 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ if [ ! -x "$SX_SERVER" ]; then
exit 1
fi
SUITES=(catalog)
SUITES=(catalog cart)
OUT_JSON="lib/commerce/scoreboard.json"
OUT_MD="lib/commerce/scoreboard.md"
@@ -44,6 +44,7 @@ run_suite() {
(load "lib/minikanren/matche.sx")
(load "lib/minikanren/defrel.sx")
(load "lib/commerce/catalog.sx")
(load "lib/commerce/cart.sx")
(epoch 2)
(eval "(define ct-pass 0)")
(eval "(define ct-fail 0)")