Item 1 — VERB LAW: one verb, READ (never SCAN), + a lint that enforces it
The product argued with itself: FAB/nav said "Scan", Free tier "5 scans", ticker "MLB slate scanned" — while the Ledger says "MY READS". Swept every user-visible surface to READ: - BottomTabBar FAB + Nav link: 'Scan' → 'Read' - Pricing free tier: '5 scans to try the model' → '5 reads …' - StatStrip: 'Awaiting next scan' → 'Awaiting next read' - Ticker badge + snapshotService event: tag 'SCAN' → 'READ', 'slate scanned' → 'slate read' (readSportOf parses BOTH old and new so cached ticker items dedupe cleanly through the rollover) - upgradePitch: 'You've scanned N parlays' / 'unlimited scans' → read/reads Internal untouched (not user-visible): /api/scan routes, scan_count column, scanning state, DemoScan/ScanIcon, scanlines CSS, the transitional SCAN color-map key. tests/unit/verbLaw.test.js is the enforcement: it fails on user-visible scan/scanned/scans copy across web/src + src/services (skips comments). Suite 270/3254 green, web build exit 0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,15 +72,15 @@ describe('GET /api/ticker', () => {
|
||||
}
|
||||
|
||||
it('returns snapshot items newest-first', async () => {
|
||||
mockCache.value = [{ tag: 'SCAN', text: 'MLB slate scanned · 248 props graded' }, { tag: 'A+', text: 'BOMBER Judge graded A+' }];
|
||||
mockCache.value = [{ tag: 'READ', text: 'MLB slate read · 248 props graded' }, { tag: 'A+', text: 'BOMBER Judge graded A+' }];
|
||||
delete process.env.TICKER_MANUAL;
|
||||
const res = await request(mountTicker()).get('/api/ticker');
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body.items[0].tag).toBe('SCAN');
|
||||
expect(res.body.items[0].tag).toBe('READ');
|
||||
});
|
||||
|
||||
it('merges editorial pins from TICKER_MANUAL', async () => {
|
||||
mockCache.value = [{ tag: 'SCAN', text: 'scanned' }];
|
||||
mockCache.value = [{ tag: 'READ', text: 'read' }];
|
||||
process.env.TICKER_MANUAL = JSON.stringify([{ tag: 'ALERT', text: 'VYNDR 2.0 is live.' }]);
|
||||
const res = await request(mountTicker()).get('/api/ticker');
|
||||
expect(res.body.items.find((i) => i.tag === 'ALERT')).toBeTruthy();
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('GET /api/internal/snapshot/status', () => {
|
||||
mockCacheGet.mockImplementation(async (key) => {
|
||||
if (key === 'snapshot:mlb:latest') return { updated_at: '2026-06-19T18:00:00Z', grades: [{}, {}, {}], deltas: [{}] };
|
||||
if (key === 'grades:mlb') return { grades: [{}, {}, {}] };
|
||||
if (key === 'ticker:items') return [{ type: 'SCAN' }, { type: 'ALERT' }];
|
||||
if (key === 'ticker:items') return [{ type: 'READ' }, { type: 'ALERT' }];
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user