Skip to content

Record the probable starter, not the words "Probable Starting Pitcher" - #201

Merged
Chris-ObtuseAI merged 1 commit into
mainfrom
fix/probable-starter-is-the-athlete
Aug 12, 2026
Merged

Record the probable starter, not the words "Probable Starting Pitcher"#201
Chris-ObtuseAI merged 1 commit into
mainfrom
fix/probable-starter-is-the-athlete

Conversation

@Chris-ObtuseAI

Copy link
Copy Markdown
Collaborator

Follow-up to #200, found by running that wire end-to-end against tomorrow's slate before trusting it.

ESPN's probables[0] carries both a slot label and the athlete:

{ "displayName": "Probable Starting Pitcher",
  "athlete": { "displayName": "Jameson Taillon" } }

_probable_era read the entry's own displayName first, so the athlete fallback never ran and every game resolved to the same constant string.

Harmless while nothing persisted the field. #200 started persisting it — so the first live capture would have written one identical starter onto every MLB game in the lake, with correct varying ERAs beside it. That's the shape that survives a spot check: the rows look populated.

Pitcher identity is the entire point of the field. A per-pitcher rating keyed on a constant is one pooled number wearing 500 names.

Before / after on tomorrow's real slate:

away / home
before Probable Starting Pitcher / Probable Starting Pitcher
after Parker Messick / Keider Montero

ERAs were correct throughout (2.57 / 3.38) — only identity was broken.

Tests assert precedence, not presence, because the label is always there: a test that merely checked for a non-empty name passes on the bug. 9 lake tests green, ruff clean.

🤖 Generated with Claude Code

ESPN's probables entry carries both a slot label and the athlete. Its own
displayName is the literal string "Probable Starting Pitcher", so reading that
before the athlete meant the fallback never ran and every game resolved to the
same constant.

This was harmless while nothing persisted the field. #200 started persisting
it, so the first live capture would have written one identical starter name
onto every MLB game in the lake - with correct, varying ERAs beside it, which
is exactly the shape that looks populated in a spot check. Pitcher identity is
the entire point of the field: a per-pitcher rating keyed on a constant is one
pooled number wearing 500 names.

Caught by running the merged wire end to end against tomorrow's slate before
trusting it; the rows came back with real ERAs and a constant name.

The tests assert precedence rather than presence, because the label is always
present - a test that merely checked for a non-empty name passes on the bug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Chris-ObtuseAI
Chris-ObtuseAI merged commit b51b718 into main Aug 12, 2026
0 of 3 checks passed
@Chris-ObtuseAI
Chris-ObtuseAI deleted the fix/probable-starter-is-the-athlete branch August 12, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant