Record the probable starter, not the words "Probable Starting Pitcher" - #201
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_eraread the entry's owndisplayNamefirst, so theathletefallback 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:
Probable Starting Pitcher/Probable Starting PitcherParker Messick/Keider MonteroERAs 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