'use strict'; /** * TEMPLATE 2 — THE HONESTY FLEX. * * The differentiator, and the one that would be worthless if it were padded. * It publishes the REAL grade distribution: how many props were graded, how few * cleared the ceiling, and the fact that A is unissuable because no band of this * model has ever earned one. * * Every competitor's card is all A's. Ours says most of tonight is a base-rate * read — and that claim is only impressive if it is exactly true, so the numbers * come from servedGrade's own bands rather than from a marketing sentence. */ const { knownNumber } = require('../../../utils/known'); module.exports = { id: 'honesty_flex', sport: 'mlb', label: 'The Honesty Flex', requires: ['graded', 'ceiling_letter', 'ceiling_realized', 'base_rate', 'date'], async pull(deps) { const g = await deps.gradeDistribution(); // injected, read-only const sg = deps.servedGrade || require('../../model/servedGrade'); const total = knownNumber(g && g.total); const top = (g && g.by_letter && (g.by_letter['B+'] || 0)) || 0; const flat = (g && g.not_separable) || 0; const ceiling = sg.BANDS[0]; return { date: deps.date, graded: total, top_count: top, top_pct: total ? Math.round((top / total) * 100) : null, flat_count: flat, flat_pct: total ? Math.round((flat / total) * 100) : null, ceiling_letter: ceiling.letter, ceiling_realized: Math.round(ceiling.realized * 100), base_rate: Math.round(sg.BASE_RATE * 100), unissuable: sg.UNISSUABLE.join(', '), }; }, copy: () => `WE GRADED {graded} PROPS TONIGHT. {top_count} CLEARED {ceiling_letter}. That's {top_pct}%. The other {flat_pct}% we can't separate from the baseline, and we say so on the card instead of calling them leans. Our ceiling is {ceiling_letter} — those reads land about {ceiling_realized}% against a {base_rate}% baseline. We do not issue {unissuable}. No band of this model has ever hit at a rate that would justify one. Everybody else's card is all A's. Ask them what their A actually hits.`, card: () => ({ kind: 'flex', title: 'TONIGHT, HONESTLY', subtitle: '{date}', lines: [ { text: '{graded} graded', style: 'lead' }, { text: '{top_count} cleared {ceiling_letter} — {top_pct}%', style: 'stat' }, { text: '{flat_pct}% we cannot separate from baseline', style: 'dim' }, { text: '', style: 'rule' }, { text: 'Ceiling: {ceiling_letter} · lands {ceiling_realized}%', style: 'body' }, { text: 'Baseline: {base_rate}%', style: 'body' }, { text: 'We do not issue {unissuable}.', style: 'body' }, ], footer: 'Grades are earned from realized outcomes, not issued on confidence.', }), absent: () => ({ copy: 'No slate graded tonight. Nothing to show, so nothing shown.', card: { kind: 'absence', title: 'NO SLATE TONIGHT', subtitle: 'NOTHING TO PAD', lines: [{ text: 'No props graded. An empty board is an honest board.', style: 'body' }], footer: 'We post the count even when the count is zero.' }, }), };