Client mode + demo golden lock (engagement-ready) - #1
Open
MsShawnP wants to merge 8 commits into
Open
Conversation
Pin the deployed demo's committed JSON exports (frontend/src/data/hero.json, all_skus.json) with a byte-level SHA-256 lock plus explicit golden figures for the hero SKU and the 50-SKU portfolio roll-up. The full pipeline that produces these needs Postgres and the four system extracts, so the exports cannot be regenerated in a plain checkout; this freezes them so the client-mode conversion cannot drift the live site or the portfolio numbers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ce report) Wire the shared lailara_engagement scaffold onto a single-file client path: tolerant CSV/XLSX intake with SKU read as text, engagement.yml column mapping + preflight (branded Data Readiness Report when a required case dimension/weight column is missing), the physical-attribute engine run on validated rows, and a branded, provenance-footed, DRAFT-watermarked readiness summary + per-SKU CSV written to client-output/ only. - dimension_physics.py: canonical Python cube/density/NMFC-class/DIM/billable math, guarded against the dbt macro by a drift test so a third copy of the freight-class table cannot silently diverge. - client_mode.py: preflight gate, engine, branded report; optional columns allow per-row blanks (present-but-partial is normal), required case dims/weight are validated. Rate tables and annual volumes are NOT applied on this path — dollar-cost lanes need the four-system divergence the pipeline builds, so client mode reports physical readiness, not a cost estimate. - INPUT-SPEC.md written from the code (required vs optional fields, types). - engagement.demo.yml (demo: true, safe to deploy). - tests/test_client_mode.py: adversarial fixtures (missing required column -> blocked, BOM+semicolon with leading-zero SKU as text, uncomputable-row disclosure, clean file) + physics/dbt drift guard. importorskip-guarded. - README: 'Client engagement use' one-command section. The dbt + Dagster + Postgres pipeline is unchanged. Demo output is bit-for-bit unchanged (test_demo_golden still green). Full suite: 91 passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prompt 6 step 0.e. core.hooksPath (the local pre-push guard) is inert on a fresh clone, so a force-added active engagement.yml could otherwise reach a deploy. Add an 'Engagement guard' step (python3 scripts/engagement_guard.py — python3 is preinstalled on ubuntu-latest) right after checkout in the deploy path, so the guard runs server-side regardless of local git config. No-op for demo/clean checkouts (engagement.yml is gitignored). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prompt 6 step 0.a. This repo's demo golden test ran only locally — no CI job collected it. Add demo-golden.yml: setup-python + pip install -r requirements.txt pytest, run the golden, with the server-side engagement guard first. Verified green in a clean venv from requirements.txt alone (CI simulation), so this check is trustworthy, not aspirational. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A concurrent session added a comprehensive golden.yml 0.a sweep across all repos (verified green). My demo-golden.yml here duplicated it (both run the same tests/test_demo_golden.py). Remove my redundant copy so each repo has one consistently-named golden gate; the concurrent session's golden.yml is retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds .github/workflows/client-mode.yml: installs the repo's deps + lailara_engagement from the private repo pinned to v0.2.1 (LAILARA_ENGAGEMENT_TOKEN secret), then runs the client-mode suite that previously importorskip-skipped the lib. The demo golden gate is untouched and credential-free, so a PAT expiry degrades client-mode coverage only, never the demo invariant. Install verified green in a clean venv locally (lib from the local path, identical code to the tagged git URL). 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 (3):
🤖 Generated with Claude Code