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:
Kev
2026-06-19 13:55:39 -04:00
parent f0674ca07d
commit cdedecf55b
12 changed files with 221 additions and 5 deletions
+16
View File
@@ -577,6 +577,22 @@ snapshot, locked to the line, and read from cache.
`vyndr/GameCard`'s `TeamLink` (stops propagation from the open-game handler).
The roster "+" reuses the Parlay Lab (`useParlay`/`legKey`).
## Infra Verification (Session 52 — non-obvious)
- **`GET /api/internal/snapshot/status`** (internal-key gated) is the post-deploy
health probe: `{ cron_armed, cron_hours_utc, last_snapshot, redis_keys,
ticker_count }`. Use it to confirm the snapshot pipeline is alive without
shelling into the container.
- **Scheduler logs both states** on start: armed (`[snapshotScheduler] armed —
SNAPSHOT_CRON=…`) and disarmed. If you see neither in container logs,
`startSnapshotScheduler()` isn't being called.
- **`SNAPSHOT_DEBUG=1`** turns on a per-run `[deltas]` log in `computeLineDeltas`
(off by default — it's a hot path). Confirms a previous snapshot exists to diff.
- **Redis persistence is NOT app-controlled.** ioredis connects via `REDIS_URL`;
AOF/RDB is a server-side Coolify config. Snapshot keys disappearing on restart
= the Redis instance has persistence off, not a code bug.
- **Push-to-Book is a TEASER only** — "BOOK IT ⟶" (StatStrip) + "PUSH-TO-BOOK ·
COMING SOON" (GradeResultCard) advertise an unbuilt feature. No backend.
## Active Skills
- vyndr-voice (all user-facing output)
- prop-analysis (grading methodology)