Order B: retire edge_pct display. Promotion gate NOT passed — no flip.

THE PROMOTION WAS NOT PERFORMED. Champion grade path byte-identical (diff empty
across intelligence/, gradeSlateService, snapshotService). Projection, p_win and
the CLV instrument untouched.

REVIEW ZERO IS A GATE AND THREE OF FOUR PREREQUISITES FAIL:
  0.1 scores are ESTIMATED priors from the founding spec, not measured. The
      premise's cited values are not in the code either — the module holds
      nba:points .80 and mlb:total_bases .55; there is no NBA 0.72 and no WNBA
      score at all.
  0.2 VERSION-BOUNDARY TAG DID NOT LAND — config/modelEras.js has zero shading
      references. It was deliberately not applied twice (nothing had been
      promoted) and reported both times. The order's own rule says STOP.
  0.3 NO ROLLBACK FLAG EXISTS — zero occurrences of SHADING_ENABLED /
      EDGE_SHADING / shadingEnabled anywhere in src/.
  0.4 takeable tags DID land (migration 034, 1246/1254 rows). PASS.

AND THE APPROVED DELTA DOES NOT MATCH THE MEASURED ONE. Approved: 43.6% of
grades re-letter, efficient markets tighten and soft hold. Measured on all 1250
live rows: 97.4% change (1217), 79.8% move UP, 17.6% down, resulting in 79.0%
A-family (MLB 93.4%) against the champion's 0.2%. And rows_actually_shaded = 0
of 1250 — 96.5% of markets are unscored (f=1) and the one scored market present
is the anchor (f=1.0 by construction). The entire re-letter comes from switching
to edge-vs-fixed-bar grading, NOT from efficiency shading, which is inert on
this board. That is an unapproved grading-basis change riding along, which the
order's own "no new scaling changes riding along" guardrail forbids.

Flipping would re-letter 97.4% of an append-only public record, move 79.8% of
grades UP and mint A's on 79% of the board, on a letter whose measured
correlation with outcomes is r ~ 0.005 — the exact scenario the permanent
founder ruling forbids.

SHIPPED — ORDER B (independent of the promotion, and a live falsehood):
edge_pct display retired from GradeResultCard (confidence strip, EDGE stat cell
now honest-absent, alt-ladder rung) and SoccerGradeResult. DeskShowcase kept
(already honest). Computation and the board's signed-edge sort fallback SURVIVE
— deleting them would re-break the sort fixed on 2026-07-29; a test asserts all
three survive and the sort still orders agrees -> disagrees -> absent.

Fixed two build-breakers the retirement caused (orphaned edgeColor import,
orphaned edge_pct destructure; edge_pct stays on the props contract). Two
pre-existing tests superseded rather than deleted: they asserted the edge figure
is sign-coloured, and now assert the stronger property that no edge percentage
renders at all.

Floor: 314 suites / 3908 tests green (9 new), web build exit 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QJs13VsyiSKYQP6rj3NNmc
This commit is contained in:
Kev
2026-07-31 00:57:57 -04:00
parent 1e9c808d99
commit 0997334f8b
7 changed files with 207 additions and 28 deletions
+89
View File
@@ -0,0 +1,89 @@
# SPEC — ORDER B: edge_pct DISPLAY RETIREMENT (shipped) + PROMOTION GATE (**NOT PASSED**)
2026-07-31. The champion grade was **NOT flipped**. Projection, p_win, and the CLV instrument
untouched. Push scoring untouched.
---
## PART 1 — THE PROMOTION GATE: **THREE OF FOUR PREREQUISITES FAIL. NO FLIP.**
The order states Review Zero is a gate ("all must pass before flip") and that 0.2 failing means
**STOP**. Checked honestly, against code, not memory:
| gate | result |
|---|---|
| **0.1** scores measured or estimated? | **ESTIMATED priors, transcribed from the founding spec.** And the premise's cited values **are not in the code**: the module holds `nfl:passing_yards .85 · nba:points .80 · mlb:strikeouts .60 · mlb:total_bases .55 · nba:role_player .55`. There is **no NBA 0.72 and no WNBA 0.68** — no WNBA score exists at all. |
| **0.2** version-boundary tag landed? | ❌ **NO.** `config/modelEras.js` contains **zero** references to shading. It was deliberately not applied (twice), because nothing had been promoted, and that was reported both times. **The order's own rule: STOP.** |
| **0.3** rollback flag exists? | ❌ **NO.** Zero occurrences of `SHADING_ENABLED` / `EDGE_SHADING` / `shadingEnabled` anywhere in `src/`. There is no flag to revert with. |
| **0.4** takeable tags landed? | ✅ **YES** — migration 034, 1,246 of 1,254 rows tagged, floor recorded per row. |
### The approved delta does not match the measured delta
The premise approves "re-letters **43.6%** of grades in the correct direction (efficient markets
tighten, soft hold)." Measured on all 1,250 live ledger rows:
| measure | approved | **actual** |
|---|---|---|
| grades changed | 43.6% | **97.4% (1,217 of 1,250)** |
| direction | efficient tighten / soft hold | **79.8% move UP**, 17.6% down |
| resulting A-family | — | **79.0% A** (MLB **93.4%**) vs champion 0.2% |
| **rows actually shaded by efficiency** | — | **0 of 1,250** |
**The entire re-letter comes from switching to edge-vs-fixed-bar grading — not from efficiency
shading, which touches zero live rows** (96.5% of markets are unscored → f=1, and the one scored
market present, `mlb:total_bases`, is the anchor where f=1.0 by construction). So the mechanism
being promoted is **inert**, while the thing that would actually change the board is an
unapproved grading-basis switch riding along — which the order's own "no new scaling changes
riding along" guardrail forbids.
### Why this is a refusal to flip, not a delay
Promoting would re-letter **97.4%** of an append-only public record, moving **79.8% of grades UP**
and minting A's on **79%** of the board — on a letter whose measured correlation with outcomes is
**r ≈ 0.005**. That is the precise scenario CLAUDE.md's permanent founder ruling forbids: *"Minting
A's without new information is a relabelled B sold as an A and it corrupts an append-only ledger."*
No new information is present here — 0 rows are shaded.
**To unblock:** land the version-boundary tag, add a rollback flag, replace the input (`p_win` vs
`fair_prob` — a real price-aware edge) so the fixed bar is meaningful, and fit scores for markets
we actually grade. Then re-measure and re-approve against the true delta.
---
## PART 2 — ORDER B: edge_pct DISPLAY RETIRED (**SHIPPED**)
Independent of the promotion, and a live falsehood, so it shipped in full.
**Retired (display only):**
- `GradeResultCard` confidence strip — the `+X% edge` figure.
- `GradeResultCard` stat row — `EDGE` is now honest-absent `—`.
- `GradeResultCard` alt-ladder rung — the same price-free number; the rung's **line and grade
(real model output) still render**.
- `SoccerGradeResult` — the `· +X.X% edge` clause.
**Deliberately KEPT:** `DeskShowcase` (already honest — nulls anything past the sane cap).
**Computation and sort survive, by design.** Backend `edgePctFor`, web `computeEdge`, and the
board's **signed-edge sort fallback** (`descNullsLast(a.edge, b.edge)`) are all intact — deleting
them would re-break the grade-board sort fixed on 2026-07-29. A test asserts all three survive and
that the sort still orders `agrees → disagrees → absent`.
**Two build-breakers found and fixed:** retiring the display orphaned the `edgeColor` import in
`GradeResultCard` and the `edge_pct` destructure in `SoccerGradeResult`. `edge_pct` stays on the
props **contract** (callers still pass it, the backend still computes it) — only the destructure
for display was dropped.
**Two pre-existing tests were SUPERSEDED, not deleted** (`ds4Billboards`, `colorContract`): they
asserted the edge figure is coloured by sign, which was correct while a figure was shown. They now
assert the stronger property — **no edge percentage renders at all**. `edgeColor` itself is
untouched and still enforced for its other consumers (`MarketBreadth`).
---
## VERIFY
Champion grade path **byte-identical** (diff empty across `intelligence/`, `gradeSlateService`,
`snapshotService`) — **no flip performed**. Projection, `p_win`, CLV instrument untouched.
**314 suites / 3,908 tests green** (9 new), **web build exit 0**.
## TAGS
VERIFIED: gates 0.10.4; the 97.4%/79.8%-up/0-shaded delta; the display retirement + surviving
computation/sort. CANNOT DETERMINE: none. **BLOCKED: the promotion — 0.2 (version tag) and 0.3
(rollback flag) are unmet, and the measured delta does not match the approved one.**
+8 -4
View File
@@ -111,10 +111,14 @@ describe('ARCHETYPE DEDUP — no archetype hue dilutes the signal green (#15,§5
describe('GradeResultCard.tsx — edge by sign, glow by tier', () => {
const src = read('components/vyndr/GradeResultCard.tsx');
it('routes edge coloring through edgeColor (never a hardcoded green on edge)', () => {
expect(src).toContain('import { edgeColor, gradeGlows }');
expect(src).toContain('color: edgeColor(d.edge)');
expect(src).toContain('edgeColor(d.edge) : ');
// SUPERSEDED 2026-07-31 by ORDER B: the edge figure is retired from the card,
// so there is no edge to colour. `edgeColor` itself is untouched and still
// enforced for its other consumers (see MarketBreadth). The retirement is the
// stronger guarantee — an unshown number cannot be mis-coloured.
it('renders no edge figure to colour at all (ORDER B retirement)', () => {
expect(src).not.toContain('color: edgeColor(d.edge)');
expect(src).not.toMatch(/\{d\.edge\}% edge/);
expect(src).toMatch(/l: 'EDGE', v: '—'/);
});
it('does NOT color an edge figure unconditionally green', () => {
// the old bug: a green span wrapping the edge %, agnostic to sign
+10 -8
View File
@@ -106,14 +106,16 @@ describe('StreaksPanel — one hero figure, real identity, one accent', () => {
describe('GradeResultCard — the letter is hero, edge is sign-colored', () => {
const src = read('components/vyndr/GradeResultCard.tsx');
test('a negative edge NEVER renders green — negative = var(--miss)', () => {
// DS3 superseded DS4's local const with the centralized colorContract
// enforcer — same semantics (negative → var(--miss)), now via the shared
// helper. Both the confidence strip and the projection row route edge
// through edgeColor(d.edge), never a hardcoded green.
expect(src).toMatch(/import \{ edgeColor.*\} from '@\/lib\/colorContract'/);
expect(src).toContain('color: edgeColor(d.edge)');
expect(src).toMatch(/d\.edge != null \? edgeColor\(d\.edge\) : 'var\(--text-2\)'/);
// SUPERSEDED 2026-07-31 by ORDER B (specs/edge-pct-display-retirement.md).
// The colour-by-sign rule was correct for as long as an edge figure was shown
// at all — but `edge_pct` is price-free and line-scaled (a 0.5 line reads
// +620%), so the FIGURE ITSELF is retired rather than recoloured. The
// strongest form of "a negative edge never renders green" is now "no edge
// percentage renders at all", which is what this asserts.
test('no edge percentage renders — green or red (ORDER B retirement)', () => {
expect(src).not.toMatch(/\{d\.edge >= 0 \? '\+' : ''\}\{d\.edge\}% edge/);
expect(src).not.toContain('color: edgeColor(d.edge)');
expect(src).toMatch(/l: 'EDGE', v: '—'/);
});
test('the grade LETTER is still the hero (largest element)', () => {
@@ -0,0 +1,74 @@
/**
* ORDER B — edge_pct DISPLAY retirement (specs/edge-pct-display-retirement.md).
*
* The point of these tests: the CLAIM is withdrawn from the UI, but the COMPUTATION and
* the board's signed-edge sort fallback SURVIVE. Deleting those would re-break the
* grade-board sort fixed on 2026-07-29.
*/
const fs = require('fs');
const path = require('path');
const read = (p) => fs.readFileSync(path.join(__dirname, '../../', p), 'utf8');
describe('the "% edge" claim is gone from the user-facing cards', () => {
test('GradeResultCard no longer renders an edge percentage', () => {
const src = read('web/src/components/vyndr/GradeResultCard.tsx');
expect(src).not.toMatch(/\{d\.edge >= 0 \? '\+' : ''\}\{d\.edge\}% edge/);
expect(src).not.toMatch(/\$\{d\.edge >= 0 \? '\+' : ''\}\$\{d\.edge\}%/);
// the EDGE stat cell is honest-absent
expect(src).toMatch(/l: 'EDGE', v: '—'/);
});
test('the alt-ladder rung no longer renders the same price-free number', () => {
const src = read('web/src/components/vyndr/GradeResultCard.tsx');
expect(src).not.toMatch(/\{Number\(a\.edge\) >= 0 \? '\+' : ''\}\{a\.edge\}%/);
});
test('SoccerGradeResult no longer renders "% edge"', () => {
const src = read('web/src/components/SoccerGradeResult.tsx');
expect(src).not.toMatch(/\{edge_pct >= 0 \? '\+' : ''\}\{edge_pct\.toFixed\(1\)\}% edge/);
});
test('no dangling unused edgeColor import (build-breaker guard)', () => {
const src = read('web/src/components/vyndr/GradeResultCard.tsx');
const imports = src.match(/import \{[^}]*\} from '@\/lib\/colorContract'/);
if (imports && /edgeColor/.test(imports[0])) {
expect(src).toMatch(/edgeColor\(/); // imported ⇒ must be used
}
});
});
describe('COMPUTATION and SORT survive — removing them would re-break the board', () => {
test('backend edgePctFor still computes edge_pct', () => {
expect(read('src/services/intelligence/analyzeViaEngine1.js')).toMatch(/function edgePctFor/);
});
test('web computeEdge still exists', () => {
expect(read('web/src/lib/gradeAdapter.js')).toMatch(/function computeEdge/);
});
test('the signed-edge sort fallback is INTACT (nulls last, no abs)', () => {
const src = read('web/src/lib/slateAdapter.js');
expect(src).toMatch(/descNullsLast\(a\.edge, b\.edge\)/);
// Strip comments before asserting the abs() bug is gone — the file's own
// doc-comment QUOTES the old broken key to explain the fix, and matching
// that would be a false positive.
const code = src.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '');
expect(code).not.toMatch(/Math\.abs\(numOr\(g\.edge/);
expect(code).toMatch(/edge: strictNum\(g\.edge\)/);
});
test('the sort still orders a real signed edge correctly', () => {
const adapter = require('../../web/src/lib/slateAdapter');
const out = adapter.selectTopGrades([
{ player: 'disagrees', grade: 'B', confidence: 50, edge: -40 },
{ player: 'agrees', grade: 'B', confidence: 50, edge: 12 },
{ player: 'absent', grade: 'B', confidence: 50 },
], 10).map((g) => g.player);
expect(out).toEqual(['agrees', 'disagrees', 'absent']);
});
test('DeskShowcase keeps its own already-honest rendering', () => {
const src = read('web/src/app/pricing/DeskShowcase.tsx');
expect(src).toMatch(/edge == null \? '—'/);
});
});
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -170,7 +170,9 @@ function gradeColor(grade: string): string {
export default function SoccerGradeResult(props: SoccerGradeResultProps) {
const {
player, stat_type, line, direction, league, grade, confidence, edge_pct,
// ORDER B: `edge_pct` stays on the props CONTRACT (callers still pass it and the
// backend still computes it) but is no longer destructured for display.
player, stat_type, line, direction, league, grade, confidence,
reasoning, kill_conditions_triggered, tier_gated, upgrade_hint,
onUpgradeClick, onClose,
} = props;
@@ -225,9 +227,9 @@ export default function SoccerGradeResult(props: SoccerGradeResultProps) {
{typeof confidence === 'number' && (
<div className="mono" style={{ fontSize: 11, color: 'var(--text-tertiary)', marginTop: 4 }}>
{confidence.toFixed(0)}% conf
{typeof edge_pct === 'number' && (
<> · {edge_pct >= 0 ? '+' : ''}{edge_pct.toFixed(1)}% edge</>
)}
{/* ORDER B (2026-07-31) — "% edge" retired. edge_pct is price-free and
line-scaled; calling it an edge is false at any scale. The prop is
still passed and still computed — only the claim is withdrawn. */}
</div>
)}
</div>
+19 -11
View File
@@ -12,7 +12,10 @@ import PlayerAvatar from '@/components/vyndr/PlayerAvatar';
import BookComparisonPanel from '@/components/vyndr/BookComparisonPanel';
import { type HeadshotSport } from '@/lib/playerHeadshot';
import { gradeColor, gradeHex } from '@/lib/vyndrTokens';
import { edgeColor, gradeGlows } from '@/lib/colorContract';
// ORDER B (2026-07-31): `edgeColor` was only ever used to tint the retired
// edge_pct display. Dropped from the import rather than left dangling — the
// helper itself stays in colorContract for other consumers.
import { gradeGlows } from '@/lib/colorContract';
import PriceTriplet, { type PriceTripletData } from './PriceTriplet';
import { playerHref } from '@/lib/playerHref';
@@ -176,12 +179,13 @@ export default function GradeResultCard({
{/* 3. CONFIDENCE STRIP */}
<div className="mono" style={{ position: 'relative', zIndex: 2, marginTop: 8, fontSize: 15, fontWeight: 600, color: 'var(--text-0)', display: 'flex', justifyContent: 'center', flexWrap: 'wrap', alignItems: 'center' }}>
<span style={{ color: hex, fontWeight: 800 }}>{d.grade}</span>
{d.edge != null && (
<>
<span style={{ color: 'rgba(232,255,244,.4)', margin: '0 9px' }}>·</span>
<span style={{ color: edgeColor(d.edge) }}>{d.edge >= 0 ? '+' : ''}{d.edge}% edge</span>
</>
)}
{/* ORDER B (2026-07-31) — the "edge %" is RETIRED from display.
`edge_pct` is `(projection line) / line`: PRICE-FREE, and its scale is a
function of line size, so on a 0.5 line it reads +620%. Calling that an
"edge" is false at any scale — an edge requires a price. The value is still
COMPUTED and still drives the board's signed-edge sort fallback; only the
user-facing claim is withdrawn until a real price-aware edge (ev_pct) is
live. See specs/edge-pct-display-retirement.md. */}
<span style={{ color: 'rgba(232,255,244,.4)', margin: '0 9px' }}>·</span>
<span>{d.confidence}% confidence</span>
</div>
@@ -213,7 +217,10 @@ export default function GradeResultCard({
{[
{ l: 'MODEL', v: d.projection != null ? d.projection : '—', col: d.projection != null ? 'var(--g-a)' : 'var(--text-2)' },
{ l: 'LINE', v: d.line, col: 'var(--text-0)' },
{ l: 'EDGE', v: d.edge != null ? `${d.edge >= 0 ? '+' : ''}${d.edge}%` : '—', col: d.edge != null ? edgeColor(d.edge) : 'var(--text-2)' },
// ORDER B — honest-absent until a price-aware edge exists. edge_pct is
// price-free and line-scaled (a 0.5 line reads +620%), so it is never shown
// as "EDGE". Computation + sort fallback are untouched.
{ l: 'EDGE', v: '—', col: 'var(--text-2)' },
].map((x, i) => (
<div key={i} style={{ padding: '14px 16px', textAlign: 'center', borderRight: i < 2 ? '1px solid var(--border)' : 'none' }}>
<div className="label" style={{ fontSize: 10, marginBottom: 5 }}>{x.l}</div>
@@ -321,9 +328,10 @@ export default function GradeResultCard({
<div key={i} style={{ flex: '1 1 0', minWidth: 64, textAlign: 'center', padding: '9px 6px', background: 'var(--bg-2)', border: a.base ? '1px solid var(--border-hi)' : '1px solid var(--border)', borderRadius: 6 }}>
<div className="mono" style={{ fontSize: 12, color: a.base ? 'var(--text-0)' : 'var(--text-1)', marginBottom: 5 }}>{a.line}{a.base ? ' •' : ''}</div>
<div className="mono" style={{ fontSize: 17, fontWeight: 800, color: gradeColor(a.grade) }}>{a.grade}</div>
{a.edge != null && (
<div className="mono" style={{ fontSize: 10, color: Number(a.edge) >= 0 ? 'var(--g-a)' : 'var(--miss)', marginTop: 3 }}>{Number(a.edge) >= 0 ? '+' : ''}{a.edge}%</div>
)}
{/* ORDER B — the ladder rung's % is the SAME price-free edge_pct, so it
is withdrawn here too. The rung's LINE and GRADE (real model output)
still render; DeskShowcase keeps its own already-honest rendering,
which nulls anything beyond the sane cap. */}
</div>
))}
</div>