STATE: Session 66 — price-layer tokens + the triplet, with induction proof

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCNgGSt5qvcLxaeQqa7Zpj
This commit is contained in:
Kev
2026-07-20 18:33:02 -04:00
parent 8cf9cbfc26
commit 16697a4b90
+94 -1
View File
@@ -1,5 +1,5 @@
# VYNDR — STATE OF THE WORLD
### As of `f5156dd` (main, DEPLOYED + fingerprinted live), 2026-07-20. This file opens every future session. **Start with the CURRENT STATUS + OPEN ITEMS block below.**
### As of `8cf9cbf` (main, DEPLOYED + fingerprinted live), 2026-07-20. This file opens every future session. **Start with the CURRENT STATUS + OPEN ITEMS block below.**
---
@@ -131,6 +131,99 @@ 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 66 — PRICE-LAYER TOKENS + THE PRICE TRIPLET (2026-07-20)
Path 3: establish the token foundation, build the hero feature natively on it,
migrate nothing. Design source = `specs/design-reference/Vyndr Price
Triplet.dc.html` (ACT 01) + `HANDOFF.md`, committed in `f549422`.
## ⚠️ THE PHASE-0 FINDING — the token layer already existed
The order asked me to establish a token layer. **It was already there and
already correct.** `web/src/app/globals.css` `:root` carries HANDOFF's
surfaces / borders / text ramp / fonts / grade colours byte-for-byte (aligned
2026-07-16), and `web/src/lib/colorContract.js` already encodes green-is-edge-
only + glow-is-A-tier-only with an enforcing test. Building a second parallel
layer would have created two competing sources of truth, so this session
**EXTENDED** the existing one. If a future order says "establish tokens", check
globals.css first.
**Vehicle (confirmed against the stack, not assumed):** Tailwind v4 CSS-first
(`@import "tailwindcss"`, NO tailwind.config file) + inline `style={{}}`
components reading `var(--x)` — 2,305 inline-style sites and 1,916 `var(--…)`
reads. **CSS custom properties are the only vehicle this stack consumes
natively.** A TS token module or a Tailwind theme config would have fought it.
## What was ADDED (additive proof: 149 insertions, 0 deletions in existing files)
- **One genuinely new colour** — the priced-out blue `--priced-out #8fb2de`
(+ dim/tints/borders). It is the carve-out that lets a row say "there IS
edge" without green saying "take it".
- `--glow-a` (the A-tier glow finally tokenized — the law lived in
`gradeGlows()` with no value to hand back) and the fair-leg tints.
- **The LAWS are written INTO the token block** and asserted by
`tests/unit/priceTriplet.test.js`: green = takeable edge only · glow =
A-tier only · amber = caution + the fair leg · red = miss/negative only ·
blue = edge priced out · JetBrains Mono = all data. A test also asserts every
newly-declared name is NEW (zero collisions, zero overrides).
## The law layer — `web/src/lib/valueState.js`
ONE function (`deriveValueState`) answers "is this value?"; the component
renders what it returns and never re-derives a verdict.
- **VALUE requires `ev >= 2` AND a takeable price (160…+200). Both.** Raw
positive EV is NOT value — +11.7% EV at 210 is a juiced price we won't call
a play. The constants MIRROR `src/config/valueEngine.js` and a test reads
BOTH files and fails on drift (the `playerName.js` pattern).
- Five states + a sixth display state: VALUE · PRICED_OUT · NO_EDGE ·
QUARANTINE · REFUSAL · NO_VERDICT_LOCKED (free tier — entitled data withheld,
which is NOT quarantine and NOT refusal).
- **Free tier gates at the WIRE**: `tiers.js` gains `model_price`,
`utils/tierGating` deletes `model_odds` and sets `model_price_locked`. Book
and fair pass through on EVERY tier — **the fair leg is never the paywall**.
## 🔴 INDUCTION CAUGHT A REAL BUG THAT REVIEW WOULD NOT HAVE
The "VS FAIR" figure compared **BOOK to fair**, so state 1 rendered
**"VALUE · 6.5% VS FAIR"** — a contradiction on screen, from code that read
fine and passed its tests. The design's own two worked examples pin the
formula: **MODEL minus FAIR in implied-probability PERCENTAGE POINTS**
(book +125 · fair +110 · model +98 → +2.9; book +118 · fair +104 · model +112
1.8). `modelVsFair` now reproduces both exactly and a test locks them.
The figure renders **only when its sign agrees with the verdict** — a row that
clears the EV bar on the book price while our price sits level with fair leads
with the EV instead of a number that reads as a contradiction.
## Proof (induced in a real browser; computed styles, not markup)
| State | Rendered |
|---|---|
| VALUE | model + verdict `rgb(0,212,160)` — the ONLY green in the set |
| EDGE · NOT TAKEABLE | verdict `rgb(143,178,222)`, model leg **white, not green** |
| NO EDGE | grey verdict, stated at full voice |
| QUARANTINE | `MODEL —` withheld, **book + fair still render**, amber |
| REFUSAL | no legs, no gauge — "CAN'T PRICE THIS ONE" |
| FREE TIER | lock bar; book 120 + fair 104 still honest |
**Live landing hero (real `/api/hero-prop` data, not samples):** book 153 ·
fair 129 · model 343 · `VALUE +21.1% VS FAIR` · +28.1% EV.
**Mobile 390:** three legs hold at 117px each, right edge 378 < 390, no
horizontal overflow, fair no smaller than its neighbours.
**Post-deploy fingerprint:** tokens resolve in prod (`--priced-out: #8fb2de`,
`--glow-a`), triplet live on the landing hero.
**Additive proof:** `/dashboard` and `/ledger` return 200 with NO triplet and
were not touched — 0 deletions across every existing file.
*(Screenshots were not captured — the browser screenshot tool errored on every
attempt this session. Substituted stronger evidence: computed-style readback
per state and measured layout at a real 390px column.)*
## Scope held / deferred
- **Slate row HELD** — `lib/marketBreadth.js` computes LINES only (median book
line vs model value); it has no prices at all, so the triplet needs new
upstream fields there. Not a same-pass fit.
- **Ledger + public profile OUT** — `ledger_entries` has no fair-odds column
(`dclv_fair_lock` is 0/707). Needs a schema decision.
- **The rest of the redesign is a ranked migration backlog** — see the
Session-65 inventory. Nothing was migrated this order.
---
# 🟢 SESSION 65 — TWO TRUTH-LAW FIXES (2026-07-20, from Chrome's logged-out audit)