From 9a91837f630315c49828dcc55bfb94411a0254bb Mon Sep 17 00:00:00 2001 From: Kev Date: Wed, 22 Jul 2026 12:20:49 -0400 Subject: [PATCH] =?UTF-8?q?STATE:=20Session=2080=20=E2=80=94=20S7=20nudge?= =?UTF-8?q?=20freshness=20completed;=20premise=20corrected=20report-first?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01VCNgGSt5qvcLxaeQqa7Zpj --- specs/STATE.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/specs/STATE.md b/specs/STATE.md index 0283a1f..88e4dd9 100644 --- a/specs/STATE.md +++ b/specs/STATE.md @@ -1,5 +1,5 @@ # VYNDR โ€” STATE OF THE WORLD -### As of `e311f53` (main, DEPLOYED + fingerprinted live), 2026-07-22. This file opens every future session. **Start with the CURRENT STATUS + OPEN ITEMS block below.** +### As of `4f3f433` (main, DEPLOYED + fingerprinted live), 2026-07-22. This file opens every future session. **Start with the CURRENT STATUS + OPEN ITEMS block below.** --- @@ -131,6 +131,62 @@ exist locally; harmless, the data restores completely. `specs/snapshot-retention.md` (Phase 2 report + schema) ยท `specs/audit-data/grade-collapse.md` ยท `specs/audit-data/gate-simulation.md`. +--- + +# ๐ŸŸข SESSION 80 โ€” S7 PRICED-LINE NUDGE COMPLETED (freshness) (2026-07-22) + +## ๐Ÿ”ด REPORT-FIRST corrected the order's premise +Order claimed "S7 is a shell that doesn't update per selection." **Not true** โ€” +`pricedForSelection` is a `useMemo([pricedIndex, selectedPlayer, stat])` and +`setSelectedPlayer/setStat` fire on every pick โ†’ chips already update per +selection (S79 verification stood). **The real gap was FRESHNESS**: the fetch +depended on `[sport]` ONLY, so `pricedIndex` was fetched once per sport-change, +never refreshed โ†’ a page open across a pricing-cron boundary (5 UTC hours) +surfaced hour-stale lines. That was the ONLY defect, and the only thing fixed. + +## Fix (display-layer only, one file) +- `refreshPriced()` re-fetches when the held snapshot is older than + **`PRICED_STALE_MS` (30s = the /api/snapshot cache)** at the moment of use โ€” + **on selection change AND on window focus**. Long-open page never shows a + stale line. Sport change clears first (no old-sport flash). +- **Reversible gate:** whole nudge behind `PRICED_NUDGE_ENABLED = true`. False โ†’ + empties the surfaced set โ†’ S6 link-only fallback. The instant revert lever. + +## Stale-tap (unchanged, already safe) +Scan submit re-fetches the live snapshot server-side, so a stale chip tapped โ†’ +real triplet (still priced) OR honest empty (rotated away). Never lands on +nothing. + +## Phase 4 โ€” every case induced live +| Case | Result | +|---|---| +| (a) priced selection | `Sam Huff hits โ†’ [u0.5 @+105]` (exact) | +| (b) change selection | `Tsung Che Cheng hits โ†’ [o0.5 @-140]` โ€” updates | +| (c) none / off-slate | `[]` / `[]` | +| (d) tap โ†’ triplet | `book +105 ยท fair +120` โ€” real | +| (e) stale-tap (8.5) | no market โ†’ **degrades to empty** | +| (f) freshness | refresh-on-stale + focus wired, fingerprint live in chunk | + +## Verdict โ€” S7 FULLY WIRED (not a shell) +Correct per-selection ยท updates on change ยท fresh on long-open ยท tap reaches a +real triplet ยท stale-tap degrades honestly. **Scan A byte-identical** +(GradeResultCard/PriceTriplet/gradeAdapter/valueState/both scan routes/ +pricedLines unchanged). Independently revertible via the flag. + +## Method note +Scanner page is auth-gated โ†’ data-correctness induced via the exact functions +the `useMemo` runs + the `/api/scan` endpoint the tap hits (the load-bearing +path), not the rendered gated page. Freshness proven by code fingerprint + unit +tests asserting the exact refresh logic. + +## Next open (unchanged) +edge_pct/ev_pct mislabel = **already checked S(prev), no genuine mislabel** โ€” +one metric-CHOICE flagged (GradeResultCard "EDGE" = stat-gap %, tied to the +deferred ranking decision). ยท No settled `p_win` yet ยท 3 key rotations +(PAT stripped locally; Kev must REVOKE on GitHub + rotate internal key + Storage +Box password). + + --- # ๐ŸŸข SESSION 79 โ€” READ-CARD NO-MARKET EMPTY STATE + PRICED-LINE SURFACER (2026-07-22)