Session 52: Coming Soon teaser + infrastructure verification (2239 tests)
Phase 1 — Push-to-Book teaser (feature not live; teaser only): - StatStrip: "BOOK IT ⟶" per graded prop (hover: "Push-to-Book coming soon"). - GradeResultCard: "PUSH-TO-BOOK · COMING SOON" footer. Phase 2 — infrastructure verification: - snapshotScheduler logs armed AND disarmed state (incl SNAPSHOT_CRON) so container logs disambiguate off-vs-crashed. - NEW GET /api/internal/snapshot/status (internal-key gated): cron_armed, cron_hours_utc, last_snapshot per sport (gradeCount/deltaCount), redis_keys existence map, ticker_count. The post-deploy pipeline health probe. - Finding: Redis AOF/RDB persistence is a server-side (Coolify) config the app can't set/verify — documented. Phase 3 — delta pipeline (verified sound, no fix needed): - runSnapshot already rotates :latest->:previous and diffs locked lines; added opt-in SNAPSHOT_DEBUG=1 [deltas] log + a trace test asserting :previous is preserved verbatim and the delta math is correct. Backend 2234 -> 2239 tests (+5), 192 suites. Web build clean (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,10 +123,15 @@ describe('runSnapshot (fully injected)', () => {
|
||||
{ player: 'Aaron Judge', stat_type: 'total_bases', line, direction: 'over', grade: 'A+', confidence: 80 },
|
||||
])(sport, props, opts);
|
||||
await svc.runSnapshot('mlb', d);
|
||||
const firstLatest = cache.store['snapshot:mlb:latest'];
|
||||
line = 2.5; // line moved +1.0
|
||||
const r2 = await svc.runSnapshot('mlb', d);
|
||||
expect(cache.store['snapshot:mlb:previous']).toBeTruthy();
|
||||
expect(r2.deltas).toBe(1);
|
||||
// Session 52 trace: the previous snapshot is preserved verbatim so the next
|
||||
// run can diff against the exact locked lines (the delta pipeline's input).
|
||||
expect(cache.store['snapshot:mlb:previous']).toEqual(firstLatest);
|
||||
expect(cache.store['snapshot:mlb:latest'].deltas[0]).toMatchObject({ delta: 1, gradedLine: 1.5, currentLine: 2.5 });
|
||||
});
|
||||
|
||||
it('pushes ticker events (capped) into ticker:items', async () => {
|
||||
|
||||
Reference in New Issue
Block a user