Skip to content

Client mode + full-corpus default: otif-blind-spot (Wave 1B) - #1

Open
MsShawnP wants to merge 7 commits into
mainfrom
client-mode-2026-08
Open

Client mode + full-corpus default: otif-blind-spot (Wave 1B)#1
MsShawnP wants to merge 7 commits into
mainfrom
client-mode-2026-08

Conversation

@MsShawnP

@MsShawnP MsShawnP commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Engagement-ready conversion of otif-blind-spot (Wave 1B, Prompt 4). Demo byte-identical except the Shawn-approved default-window change.

Demo golden + blockers

  • SHA-256 byte-lock on the 7 committed demo JSON + pinned canonical 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).
  • Blockers verified: README foot P2 + stale worktrees already fixed; no wall-clock dates (the 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)

  • One OTIF scorecard file → internal-fill vs retailer-OTIF gap, on-time/in-full failure split, fines exposure (×12/window). Boolean results parse many spellings. Velocity damage disclosed as a modeled figure a scorecard can't produce (never invented). Missing column → branded Data Readiness Report.
  • INPUT-SPEC (code-derived), engagement.demo.yml (canonical identity), 8 §6 fixtures. Verified: on the demo Walmart scorecard, retailer OTIF = 0.8445 (matches canonical exactly).

Verification

  • pytest 46, vitest 63, tsc clean, drift gate clean.

🤖 Generated with Claude Code

MsShawnP and others added 7 commits August 3, 2026 13:17
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant