[object Object]

← back to Estimate Instant

auto-data-snapshot: 2026-08-28T21:58:17 (2 data files) — README.md verification/e2e-proof.json

7dabb5603afb76992f92d077d1926bae2b5b116c · 2026-08-28 22:00:03 -0700 · auto-commit-fleet

Files touched

Diff

commit 7dabb5603afb76992f92d077d1926bae2b5b116c
Author: auto-commit-fleet <steve@designerwallcoverings.com>
Date:   Fri Aug 28 22:00:03 2026 -0700

    auto-data-snapshot: 2026-08-28T21:58:17 (2 data files) — README.md verification/e2e-proof.json
---
 README.md                   | 14 ++++++++++++++
 verification/e2e-proof.json | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/README.md b/README.md
index 9c6f5b4..5a5f5bf 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,20 @@ PORT=3900 node server.js                                # open http://localhost:
 BASIC_AUTH="admin:DW2024!" PORT=3900 node server.js     # gated
 ```
 
+## Room coverage API
+
+`POST /api/calculate-coverage` accepts:
+
+```json
+{"sku":"DW-GRAS-01","room_width_ft":10,"room_height_ft":8,"num_walls":4}
+```
+
+It returns `rolls_needed`, `waste_pct`, `total_cost`, and calculation notes. The
+endpoint is read-only and uses the checked-in `data/rolls.json` snapshot; its
+response labels that provenance and warns callers to confirm current product
+specifications and price before quoting. It does not query or mutate Shopify or
+`dw_unified`.
+
 ## Fill it in
 - `data/products.json` — array of `{ title, sku, price, hex, image }`.
 - `server.js` `sortProducts()` — add sort modes as needed.
diff --git a/verification/e2e-proof.json b/verification/e2e-proof.json
new file mode 100644
index 0000000..72a898e
--- /dev/null
+++ b/verification/e2e-proof.json
@@ -0,0 +1,39 @@
+{
+  "intent": "Provide a read-only room-dimensions-to-roll-count API contract using the existing local calculator.",
+  "risk_tier": "R1 isolated backend API; no production data or external integration",
+  "environment": "local Node HTTP server on an ephemeral loopback port",
+  "timestamp": "2026-08-29T04:52:00Z",
+  "ticket": "TK-10948-add-local-dw-room-coverage-api-contract",
+  "precondition": "estimate-instant exposed /api/estimate for inch dimensions but had no stable room-level snake_case API contract.",
+  "checks": [
+    {
+      "verdict": "PASS",
+      "boundary": "calculation module",
+      "command": "node --test test/calculate-coverage.test.js",
+      "assertions": "room dimensions and wall count map to strips, rolls, waste, and total cost; Shopify SKU alias works"
+    },
+    {
+      "verdict": "PASS",
+      "boundary": "HTTP API",
+      "command": "node --test test/calculate-coverage.test.js",
+      "assertions": "ephemeral local POST returns HTTP 200 with labeled local-snapshot provenance; empty input returns HTTP 400"
+    },
+    {
+      "verdict": "PASS",
+      "boundary": "syntax and diff",
+      "command": "node --check server.js && git diff --check",
+      "assertions": "server parses and diff has no whitespace errors"
+    }
+  ],
+  "negative_checks": [
+    "missing SKU",
+    "unknown SKU",
+    "zero width",
+    "non-finite height",
+    "fractional wall count",
+    "empty HTTP payload"
+  ],
+  "side_effects": "none; test server is ephemeral and closed by the test; no Shopify, dw_unified, lead, send, deploy, restart, or scheduled-job action",
+  "cleanup": "ephemeral HTTP server closed after assertions",
+  "verdict": "PASS for the local API journey"
+}

← f31e1b3 creds-safe fetch guard: resolve relative fetch vs credential  ·  back to Estimate Instant  ·  Add fail-closed room coverage API 8e0c9d3 →