P1-7: flat edge board — guard the broken edge placeholder (absent > fabricated)
Phone audit called the board 'mostly-empty'. Two causes, both now addressed: 1. Dead images (P0-2, already fixed) → the matchup/team chips render logos now. 2. Degraded edge data. Live snapshot edge_pct is on a broken scale (distinct values 20/60/100/140 — not a market %), with projection=0 and confidence 35-55%. A real prop-market edge is single-digit, never past ~40%. Leading the board with '+140%' fabricates a signal (Data Semantics Rule). Fix: an edge whose |value| > 40 is treated as ABSENT at BOTH layers — the data layer (flattenToEdgeBoard nulls it, so it can't RANK a fake +140% above a real +8.4%) and the display (EdgeCell shows '—'). Board falls through to the grade-rank tiebreak when edges are unreliable. Real edges (≤40) are untouched. The root cause — edge_pct/projection/confidence degradation — is a BACKEND grading issue (same family as the P2-9 '45% B' flag), reported separately; this is the honest frontend guard, not a fix for the data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -608,6 +608,10 @@ const EDGE_GRADE_RANK = { 'A+': 0, A: 1, 'A-': 2, 'B+': 3, B: 4, 'B-': 5, C: 6,
|
||||
function edgeGradeRank(g) {
|
||||
return EDGE_GRADE_RANK[g] != null ? EDGE_GRADE_RANK[g] : 9;
|
||||
}
|
||||
// Ceiling for a plausible prop-market edge; beyond it the value is a broken
|
||||
// placeholder, not a signal (mirrored in MobileEdgeBoard.EdgeCell).
|
||||
const EDGE_BOARD_SANE_MAX = 40;
|
||||
|
||||
function flattenToEdgeBoard(cards) {
|
||||
const rows = [];
|
||||
for (const c of Array.isArray(cards) ? cards : []) {
|
||||
@@ -624,7 +628,11 @@ function flattenToEdgeBoard(cards) {
|
||||
line: p.line,
|
||||
side: p.side || 'O',
|
||||
grade: p.grade,
|
||||
edge: (p.edge != null && Number.isFinite(p.edge)) ? p.edge : null,
|
||||
// A real prop edge is single-digit %, never past ~40. Values beyond
|
||||
// that are the pipeline's miscalibrated placeholder (live: 60/100/140)
|
||||
// — treat as absent so the board neither displays nor RANKS on a fake
|
||||
// edge. When absent, rows fall through to the grade-rank tiebreak.
|
||||
edge: (p.edge != null && Number.isFinite(p.edge) && Math.abs(p.edge) <= EDGE_BOARD_SANE_MAX) ? p.edge : null,
|
||||
sport: c.sport || '',
|
||||
away,
|
||||
home,
|
||||
|
||||
Reference in New Issue
Block a user