Client mode + demo golden lock (engagement-ready) - #2
Merged
Conversation
Add tests_golden.py: locks the 50-SKU Cinderhaven demo bounce counts (walmart 29, costco/unfi/kehe 26) via the real audit pipeline, plus P1 regression tests for the 07-31 INFO-counting bug. Verified by reproduction that the fix is already on disk: an INFO-only row (valid UPC-A carrying the UPC_NOT_GTIN13 advisory) stays PASS in the per-row engine and clean in both orchestrator aggregates (do_validate and do_validate_rows) — errorTypeCounts and topFailingFields exclude INFO. A negative-control test confirms real CRITICAL failures still register. Regenerate scripts/results/*.json with the current single-count engine (they footed and no longer double-count GTIN) and update their README. Add pytest config so bare `pytest` collects the root tests_*.py surface alongside tests/test_*.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e report) client_mode.py wraps the four-tier engine with the shared lailara_engagement scaffold: tolerant CSV/XLSX intake (UPC/GTIN read as text), engagement.yml column mapping + a preflight that names the identifier column (branded Data Readiness Report if absent), the engine run per SKU, and a branded, provenance-footed, draft-watermarked readiness summary + per-SKU CSV written to client-output/ only. Column mapping is config-driven, never fuzzy-guessed. Add engagement.demo.yml (demo: true, Walmart) and INPUT-SPEC.md documenting the per-partner required fields and GTIN levels the engine consumes. tests_client_mode.py covers the §6 adversarial fixtures — clean file renders clean (the 07-31 INFO P1), missing identifier blocks, empty/headers-only, duplicate headers, BOM+semicolon with identifier kept as text, and the --final watermark drop. Skipped if lailara_engagement is absent. Demo runtime (engine, browser) untouched; demo golden unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The client-mode files were mirrored from gtin-validator (ruff line-length 120); item-setup pins 88. Wrap the readiness-summary CSS f-string across source lines (CSS is newline-tolerant; output unchanged in effect), split one long banner string, and let ruff sort the tests_client_mode imports. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
engagement.demo.yml carried "Cinderhaven Foods (demo)" — a retired brand-name error (canonical is Cinderhaven Provisions). The canonical-drift gate correctly blocked it. Deployed demo golden is unaffected — client mode reads this config, the deployed app does not; golden suite unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engagement-ready client-mode conversion. Verified; source-only and demo-locked.
Every listed P1 was already fixed on disk, verified by the audit's reproduction, then regression-locked. Demo golden byte-identical; client mode + adversarial fixtures added.
Deploys trigger on push to
mainonly — merging this PR is what goes live. Nothing has deployed from pushing the branch. CI (canonical-drift / ci / render) runs on this PR.Commits (4):
🤖 Generated with Claude Code