0997334f8b
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
75 lines
3.3 KiB
JavaScript
75 lines
3.3 KiB
JavaScript
/**
|
|
* 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 \? '—'/);
|
|
});
|
|
});
|