Dw Checkout Guard
repo: ~/Projects/dw-checkout-guard · 7 commits · 0 in last 24h, 0 in last 7d ·
Authors
- Steve3
- auto-commit-fleet2
- steve-office2
Skills used
- /dw-checkout-guard5
- /discontinued2
- /claude1
- /code1
- /quote-only1
- /index1
- /locales1
- /package1
- /schema1
- /shopify1
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
fb043ce · 2026-09-12 · chore: v1.0.1 (session close)
Version bump alongside 667cf8e, which replaced the stale Shopify scaffold
fixtures with five real behaviour tests run against the compiled
function.wasm. Lint + review pass this session found nothing further to fix
in the fixtures (all parse, all internally consistent with their filenames).
The function is now installed and Active on the live store
(designer-laboratory-sandbox, checkout rule 82837555, fail-open).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
667cf8e · 2026-09-11 · checkout-guard: replace stale scaffold fixtures with real DW behaviour tests
The repo shipped Shopify's default cart-validation scaffold fixtures
(quantity-is-one / quantity-exceeds-one). They carry only a quantity
field, so they do not satisfy this function's input query (which reads
cost.amountPerQuantity and merchandise.product.isDiscontinued) and
validateTestAssets failed 2/2 — i.e. the guard shipped with a test suite
that had never once exercised the guard.
Replaced with five fixtures run against the real compiled function.wasm:
dw-zero-price-BLOCKS $0.00 Per Yard -> blocked
dw-sample-only-ALLOWS $4.25 Sample -> ALLOWED
dw-mixed-zero-plus-sample-BLOCKS $0 + $4.25 -> blocked
dw-discontinued-BLOCKS discontinued tag -> blocked
dw-zero-plus-discontinued-MIXED both -> mixed message
The allow case is the load-bearing one: this cohort must keep its $4.25
sample flow working, so a guard that blocked everything would be worse
than no guard. 5/5 pass.
TK-11301. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XA7ZPurwcdipst1gsgwwXq
e149166 · 2026-08-25 · checkout-guard: complete JS->wasm build + deploy (blocks $0/quote-only/discontinued at checkout)
Rebuilt the function extension from the current CLI's cart_checkout_validation scaffold
(the original was old-style: missing src/index.js entry -> JS undetected, camelCase TOML
export, no codegen package.json). Overlaid the hardened $0/discontinued logic + input query,
regenerated types, built with javy, VERIFIED locally ($0 line -> validationAdd error; $50 line
-> operations:[]), and released version dw-checkout-guard-2 to the linked DW Partner app.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
File tree
23 files tracked. Click any to browse the source at HEAD.
rendered in 0ms