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
+21
View File
@@ -3,6 +3,27 @@
## Last Updated
2026-08-03
## Session 87 (2026-08-03) — Defence ingested; cumulative correction locked ✅
Spec: `specs/defense-ingest-and-cumulative-correction.md`. 4,228 tests / 336
suites green, build exit 0. Counter + clusters byte-identical.
- **DEFENCE INGESTED (free):** Statcast OAA feed → 514 fielders → `team_defense`
(31 teams, dated from row one). Prod-verified: fielding rows 514,
team_defense_written 31. Cubs +56 best, Mariners 29 worst.
- **CUMULATIVE BONFERRONI LOCKED** (`testLedger.js` + `mc_test_ledger`): the
denominator is now distinct hypotheses across the programme lifetime, not the
session. Demonstrated 19 → 38, α 0.0026 → 0.0013. Re-tests don't inflate it.
- **THE PREDICTED DIFFERENTIAL APPEARS:** defence solo r = **+0.130 GHOST**
(contact/speed) vs **0.018 BOMBER** (power). Exactly "defence matters, and for
whom". Both UNDERPOWERED (n=104/245, p=0.188 vs α=0.0013) — signal shape only.
- **Bug class recorded:** the feed 404'd on a doubled `/leaderboard` path and,
because feeds degrade to an empty index by design, reported "0 rows" — which
reads like an honest absence. Any feed reporting 0 is suspect.
- **Nothing proved → nothing recalibrated, nothing shipped.** validatedSkills()
is {} everywhere; proven set still EMPTY.
- **Next:** sample only. GHOST×hits needs ~396 more rows, BOMBER×hits ~213.
Prefer re-testing standing candidates — every new hypothesis now tightens α
for everything after it.
## Session 86 (2026-08-03) — Conditioning registry + a probe so "proven" stops drifting ✅
Spec: `specs/conditioning-registry.md`. 4,221 tests / 335 suites green, build exit
0. Counter + batter model + pitcher engine byte-identical.