Client mode + demo golden lock (engagement-ready) - #3
Open
MsShawnP wants to merge 4 commits into
Open
Conversation
Pin the engine output on the two files the deployed demo serves (src.main._SAMPLE_FILES): walmart/856_bad_dtm.edi validation findings (4 findings, 3 may-cause + 1 will-cause, $1/case breakdown) and walmart/850_with_allowances.edi extraction (PO 4500012400, 3 lines, 6 allowances). Guards the live demo against drift during the client-mode conversion. Runs under CI's `pytest tests/`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 07-31 audit corrected 312 -> 322 and it stuck; the demo golden lock adds 5 tests, so `pytest tests/` now reports 327 across 21 modules. No logic change; documentation only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire the existing X12 engine to the shared lailara_engagement scaffold so a client's own 850/856 files can be pre-flighted locally: - client_mode.py: tolerant intake of a single EDI file or a directory (UTF-8/Latin-1, delimiters auto-detected), a preflight that names any unreadable/non-EDI input (Data Readiness Report when nothing is usable), a partner-ID map in engagement.yml that steers retailer selection without editing code, then runs extract_850 / validate_856 + retailer rules and emits a branded, provenance-footed (input SHA-256, segment/transaction counts, as_of_date, config hash, validation status), DRAFT-watermarked report to client-output/ only. Chargeback fees are shown per basis, never summed. - engagement.demo.yml: safe-to-run demo config (demo: true) with an example partner map. - INPUT-SPEC.md: input contract derived from the engine code (envelope, 850, 856, and the partner-ID config), written for a client's IT/EDI person. - tests/test_client_mode.py: adversarial suite (blocked non-EDI input, clean ASN, Latin-1 file, partner-map resolution, unresolved-retailer fallback, directory intake, 850 path, final-flag watermark) — importorskip so it skips where lailara_engagement isn't installed (e.g. CI). - README: documented "Client engagement use"; test count now 22 modules. Demo mode is untouched: no change to src/ or samples/, and the demo golden lock still passes. All 335 tests pass (327 core + 8 client-mode with the lib present). 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