Client mode + full-corpus default: otif-blind-spot (Wave 1B) - #1
Open
MsShawnP wants to merge 7 commits into
Open
Client mode + full-corpus default: otif-blind-spot (Wave 1B)#1MsShawnP wants to merge 7 commits into
MsShawnP wants to merge 7 commits into
Conversation
- tests/test_demo_golden.py: SHA-256 byte-lock on the 7 committed demo JSON + pins the canonical full-corpus headline: internal 99% (0.9923) vs Walmart 84% (0.8445), 14.8-pt gap (14.78, foots to the raw rates), $57,197 exposure (= $23,696.78 fines + $33,499.67 modeled velocity). The 99/84 hero is a round-number hook; the gap is the precise computed figure (the audit's P3 rounding note — documented + locked, hero rendering unchanged). - computeMetrics.ts: DEFAULT_PRESET_KEY '52w' -> 'all'. The deployed landing view now shows the canonical full-corpus figures instead of a 52-week subset that read an off-canonical ~$59K/14.9pt. Window label prints beside every number (headline exposure line + reconciliation footnote). Shawn approved (Full corpus as the default; label the window either way). Verified: vitest 63 pass (App still shows 99%/84% at the new default), tsc clean, pytest golden green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Analyze a client's own OTIF scorecard: internal-fill vs retailer-OTIF gap, the on-time/in-full failure split, and fines exposure (annualized on the config window). Demo React app untouched. - One scorecard file (per shipment). Required: shipment_id, ship_date, on_time_result, in_full_result, po_units, shipped_units. on/in-full results parse true/false, yes/no, pass/fail, on-time/late, in-full/short. - Missing required column -> branded Data Readiness Report. Velocity damage is a MODELED figure the demo computes; it can't come from a scorecard, so it is disclosed as a data limitation, never invented. Fines annualized x12/window from config (never wall clock). - Provenance-footed, DRAFT-until-final HTML deliverable + summary.json to client-output/ only. Gap computed from the raw rates. - INPUT-SPEC (code-derived), engagement.demo.yml (canonical identity), test_client_mode.py (8 §6 fixtures). Verified: on the demo Walmart scorecard, retailer OTIF = 0.8445 (matches canonical exactly). 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>
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>
Adds an input-tracking regression for the deliverable's window label and ×12/N fine annualization. Both come from basis.window_months / window_label; the clean-run test asserted only the demo's own '36 months' / 'x12/36' — a positive-only check a hardcoded '36' would also pass, the gap that let trade-spend quote 26 weeks as "trailing 52 weeks". Both halves: feed a distinctive window (41 months, distinct label) and assert the label, divisor, and numeric annualization track it, AND assert the demo default is absent. Test-only; demo goldens unchanged; canonical-drift clean. 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 conversion of otif-blind-spot (Wave 1B, Prompt 4). Demo byte-identical except the Shawn-approved default-window change.
Demo golden + blockers
new Date(...)in computeMetrics is arg-constructed from the data window). The 99/84 hero is a round-number hook, the gap is the precise computed figure (the audit's P3 rounding note — documented + locked, hero unchanged).Default window = full corpus (Shawn-approved)
DEFAULT_PRESET_KEY'52w'→'all': the deployed landing view now shows the canonical full-corpus figures ($57,197/14.8pt) instead of a 52-week subset (~$59K/14.9pt) — the exact preset-basis defect this program exists to prevent. Window label prints beside every number. Users can still narrow. vitest 63 pass (App still shows 99%/84%), tsc clean.Client mode (lailara_engagement)
Verification
🤖 Generated with Claude Code