Ingest defence, and make Bonferroni cumulative across the programme

Two things shipped that stand regardless of sample.

DEFENCE. Statcast Outs Above Average is free on the host we already pull six
feeds from, so there was nothing to decide. 514 fielders, aggregated to team
level -- the unit a batter's prop actually needs, the defence behind the
pitcher he faces -- and persisted as 31 team rows. Verified in production.
Cubs +56 best, Mariners -29 worst.

Unknown is not zero, and it bites unusually hard here: an OAA of 0 is a REAL
reading meaning exactly average, so coercing absence to 0 would assert that
every unmeasured fielder is league-average, which is the commonest defensive
profile there is. team_defense also carries as_of_date in its primary key from
the first row -- statcast_aggregates was built upsert-in-place and that
silently made every backtest leak the games it predicted, so point-in-time is
available here before it is needed rather than after a wrong answer.

A bug worth recording as a class: BASE already ends in /leaderboard, so the
new feed built a doubled path and 404'd. Because a failing feed degrades to an
empty index by design -- correct, so one broken source cannot fail the whole
pull -- it surfaced as "fielding_oaa: 0 rows", which reads exactly like
"Statcast has no fielding data". Graceful degradation makes a wiring bug look
like an honest absence.

CUMULATIVE CORRECTION. Bonferroni had been applied per session throughout: a
run testing eight features corrected by eight. Across a programme's lifetime
that is wrong in the dangerous direction, because every order gets a fresh
generous alpha and the false-positive rate compounds quietly. Correcting by 8
when sixty have been tried is how a noise result eventually gets recorded as
PROVEN with a p-value to point at. The denominator is now distinct hypotheses
ever tested, persisted, and it moved 19 -> 38 within this session alone, alpha
0.0026 -> 0.0013. Re-tests deliberately do not inflate it: re-asking the same
question on more data is not a new shot on goal, and counting it would punish
the discipline of waiting for sample.

THE MEASUREMENT. The differential the theory predicted is present: defence
correlates with the counter's residual at +0.130 for GHOST, the contact and
speed archetype, and -0.018 for BOMBER, the power archetype. A GHOST's hits
depend on whether anyone can range to the ball; a BOMBER's barrels clear the
defence entirely. So a flat BOMBER result is the theory working rather than
the test failing.

It is not a result. GHOST is n=104 against a 500 bar, with p=0.188 against a
corrected alpha of 0.0013 -- three orders of magnitude short. Both are
recorded as CANDIDATE with their measured lift, tagged contact-skill, so the
re-run at full sample compares against a recorded baseline.

Nothing proved, so nothing was recalibrated and nothing shipped.

4,228 tests green (336 suites); web build exit 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1sivYNqY2TS5ftykmHBU9
This commit is contained in:
Kev
2026-08-03 22:20:30 -04:00
parent 25e36c0257
commit ece2b9f5f9
6 changed files with 435 additions and 6 deletions
+33
View File
@@ -1496,6 +1496,39 @@ phased plan in the Session-57 conversation / BUILD-STATE Next section).
- Within BOMBER, the counter still leads on hits (0.218 vs 0.160) — consistent
with the closed pooled hits negative.
## Defence ingest + cumulative Bonferroni (Session 87 — non-obvious)
- **BONFERRONI IS NOW CUMULATIVE ACROSS THE PROGRAMME LIFETIME**
(`src/services/model/testLedger.js` + `mc_test_ledger`). Correcting per-session
(8 tests → /8, forever) let the false-positive rate compound silently; the
denominator is now DISTINCT hypotheses ever tested. Demonstrated: 19 → 38 in
one session, α 0.0026 → **0.0013**. RE-TESTS DO NOT INFLATE IT — re-asking the
same question on more data is not a new shot on goal, and counting it would
punish waiting for sample. The alpha only ever shrinks, so prefer re-testing
standing candidates over inventing new hypotheses — that is now mathematically
the disciplined choice.
- **DEFENCE IS INGESTED** — free Statcast OAA (`FEEDS.fielding_oaa`), 514
fielders → `team_defense` (31 teams, dated). Team-level is the right unit (the
defence behind the pitcher faced). `oaa_sum` + `oaa_mean` (mean because a team
with more measured fielders would else look better for being measured more);
<3 fielders → absent. **OAA 0 is a REAL "exactly average" reading** — coercing
absence to 0 asserts every unmeasured fielder is league-average, the commonest
profile there is. `team_defense` carries `as_of_date` in the PK FROM ROW ONE
(the statcast_aggregates lesson, applied before it was needed).
- **`BASE` in statcastAdapter ALREADY ENDS IN `/leaderboard`** — the new feed
doubled it and 404'd. And because a failing feed degrades to an EMPTY index by
design, it surfaced as "fielding_oaa: 0 rows", which reads exactly like
"Statcast has no fielding data". **Graceful degradation makes a wiring bug look
like an honest absence — treat any feed reporting 0 as suspect until the URL is
fetched by hand.**
- **THE DEFENCE DIFFERENTIAL APPEARS AS THEORY PREDICTS:** solo r vs counter
residual is **+0.130 for GHOST** (contact/speed, n=104) and **0.018 for
BOMBER** (power, n=245). A GHOST's hits depend on fielder range; a BOMBER's
barrels clear the defence. **A flat BOMBER result is the theory working, not
the test failing.** Both UNDERPOWERED (p=0.188 vs corrected α 0.0013) — a
signal shape, not a result.
- `team_defense` keys on Savant's DISPLAY NAME (a nickname, "Cubs") while game
logs give full names ("Chicago Cubs") — match on both.
## Active Skills
- vyndr-voice (all user-facing output)
- prop-analysis (grading methodology)