Session 57: Phase 0 — Kill the Lies (2309 tests)
Work-order Phase 0 (Jul 10 live audit): every fabricated UI element deleted
or rewired to real data. Deletion sprint — no new product features.
0.1 Fake NBA game: root cause was scheduleService fetching the ESPN
scoreboard with no ?dates= param or date filter — off-season ESPN
returns the NEAREST slate (Jun 13 NYK@SA Finals rendered as tonight).
Now pinned to the requested ET date + defensive filter; undated events
dropped. Honest month-aware per-sport empty states (lib/emptyState.js).
0.2 Fake header counters: liveTick stripped to a bare 1s pulse (the
auto-incrementing "247 graded", sin-driven brain-%, aPlus/cascades are
dead). New GET /api/snapshot/summary (cache-only, before /:sport) +
Next proxy; HeartbeatBar shows the real graded count and SYNC =
elapsed since the last pipeline run (amber past 5 min).
0.3 Ticker: hardcoded fallback items deleted (real snapshot exhaust only);
MOVE kept — computeLineDeltas is real movement. <4 real items → no
ticker; bar publishes --ticker-h so the fixed header collapses cleanly.
0.4 /terminal retired: route redirects to /dashboard; VVI/injury-wire/
leaders layouts preserved unrouted as §12 content-engine templates.
Nav PRIMARY = Slate/Scan/Ledger; BottomTabBar Terminal→Explore; PWA
shortcut Terminal→Ledger; #terminal alias → /dashboard.
0.5 ›Query nav pill deleted (duplicate /scan link).
Backend 2289 → 2309 tests (199 suites), web build exit 0.
Spec: specs/phase-0-kill-the-lies.md. Next: work-order Phase 1 (ledger
persistence + settlement).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -130,13 +130,22 @@ describe('Phase G.1 — living-layer tick engine (§8)', () => {
|
||||
liveTick.tick();
|
||||
expect(calls).toBe(2); // unsubscribed
|
||||
});
|
||||
it('advances tick and creeps the graded count, with a fresh state object', () => {
|
||||
it('advances tick with a fresh state object', () => {
|
||||
const first = liveTick.state;
|
||||
for (let i = 0; i < 7; i++) liveTick.tick();
|
||||
expect(liveTick.state.tick).toBe(7);
|
||||
expect(liveTick.state.graded).toBeGreaterThan(first.graded);
|
||||
expect(liveTick.state).not.toBe(first); // new object → React re-renders
|
||||
});
|
||||
// Session 57 (Phase 0) — the fake header counters are dead. The tick engine
|
||||
// must carry NO display data: no auto-incrementing graded count, no
|
||||
// sin-driven neural %. Real numbers come from /api/snapshot/summary only.
|
||||
it('carries no fabricated display counters', () => {
|
||||
liveTick.tick();
|
||||
expect(Object.keys(liveTick.state)).toEqual(['tick']);
|
||||
const src = read('lib/liveTick.js');
|
||||
expect(src).not.toContain('neural');
|
||||
expect(src).not.toContain('247');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Phase G.4 — checkout (§12)', () => {
|
||||
@@ -155,6 +164,15 @@ describe('Phase G — React glue wired correctly', () => {
|
||||
expect(src).toContain('ekg-track');
|
||||
expect(src).toContain('count-tick'); // LiveNumber pop
|
||||
});
|
||||
// Session 57 (Phase 0) — the heartbeat's numbers are REAL: graded count +
|
||||
// sync age come from /api/snapshot/summary; the fake neural % is gone.
|
||||
it('HeartbeatBar reads /api/snapshot/summary and shows no neural %', () => {
|
||||
const src = read('components/vyndr/LiveLayer.tsx');
|
||||
expect(src).toContain('/api/snapshot/summary');
|
||||
expect(src).not.toContain('neural');
|
||||
expect(src).toContain('SYNC'); // elapsed-since-snapshot clock
|
||||
expect(src).toContain('updated_at');
|
||||
});
|
||||
it('GlobalHosts registers the design globals + applies prefs on mount', () => {
|
||||
const src = read('components/vyndr/GlobalHosts.tsx');
|
||||
expect(src).toContain('window.__prefs');
|
||||
|
||||
Reference in New Issue
Block a user