S11 (a1): live tracking — the read locked, the game watched

MLB statsapi + WNBA ESPN live boxscores -> per-player current values
(live:{sport}:{date} TTL 90s, /api/live/:sport + Next proxy). Pure
propState math (HIT / ON PACE / NEEDS N / HOLDS / LINE PASSED — never
red in-progress), attachLiveProgress strip join on nameKey+statType,
proximity-to-hit slate float, StatStrip LiveTracker in the ROW-GRAMMAR
outcome slot (spec amended + lock test updated). Grades never change
in-game — tracking, labeled as such. 2698 -> 2757 tests, web build 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kev
2026-07-12 00:45:29 -04:00
parent 14dc9cf270
commit b5d3fd14bb
18 changed files with 1666 additions and 18 deletions
+16 -4
View File
@@ -32,7 +32,8 @@ describe('ROW-GRAMMAR §2 — canonical prop-row slot order (snapshot mode)', ()
'<MovementChip p={p} />', // slot 4b — market movement
'p.revisedFrom', // slot 5a — revision strikethrough
'<GradeBadge grade={p.grade}', // slot 5b — the current grade
'<OutcomeChip p={p} />', // slot 6 settled result
'<LiveTracker p={p} />', // slot 6alive proto-outcome (S11)
'<OutcomeChip p={p} />', // slot 6b — settled result
'<ParlayBtn p={p} />', // slot 7a — action
'<BookItTeaser p={p} />', // slot 7b — action
'Graded {p.gradedAt.ago}', // slot 8 — provenance, always last
@@ -60,9 +61,9 @@ describe('ROW-GRAMMAR §2 — canonical prop-row slot order (snapshot mode)', ()
], base);
});
test('settled/dead rows suppress actions (the bet is over)', () => {
expect(strip).toContain('{!p.outcome && !p.dead && <ParlayBtn p={p} />}');
expect(strip).toContain('{!p.outcome && !p.dead && <BookItTeaser p={p} />}');
test('live/settled/dead rows suppress actions (the bet window is over) — S11 amendment', () => {
expect(strip).toContain('{!p.outcome && !p.dead && !p.live && <ParlayBtn p={p} />}');
expect(strip).toContain('{!p.outcome && !p.dead && !p.live && <BookItTeaser p={p} />}');
});
});
@@ -94,6 +95,17 @@ describe('ROW-GRAMMAR §3 — one meaning per color', () => {
expect(src).toContain("steam ? 'var(--amber");
expect(src).not.toContain('--miss');
});
test('live TRACKING mark is green/amber only — an in-progress prop is never red (S11)', () => {
const src = section('export function LiveTracker', 'export function DotStrip');
expect(src).toContain('var(--g-a');
expect(src).toContain('var(--amber');
expect(src).not.toContain('--miss');
// The label never implies re-grading: TRACKING, read locked pre-game.
expect(src).toContain('TRACKING — read locked pre-game');
// Data → mono.
expect(src).toContain('className="mono"');
});
});
describe('ROW-GRAMMAR §1.4 — no truncation of names/times/pitchers', () => {