Summary
Manual runner advances currently update the inning score when a runner scores, but they do not consistently update the rest of the stat model.
Why this matters
The app promises that batter and pitcher stat lines update automatically. Right now, scoring via manual advance reasons like wild pitch, passed ball, balk, or other can leave the line score out of sync with runner runs scored, pitcher runs allowed, and related bookkeeping.
Current examples
advance_runner() increments the inning score when a runner reaches home.
WildPitch increments wild pitches on the pitcher.
PassedBall, Balk, and Other do not fully reconcile player/pitcher/run bookkeeping.
- The play log/stat model can drift from the visible score.
Acceptance criteria
- There is a single reliable path for recording a manually scored run so inning score, runner stats, pitcher stats, and logs stay in sync.
- Wild pitch, passed ball, balk, stolen base, caught stealing, and other manual-advance reasons all update the correct stats and side effects.
- Scoring a run manually updates the runner's runs scored.
- Pitcher runs allowed / earned-run treatment is explicitly defined for supported manual-advance reasons.
- Add tests covering manual scoring to home for each supported reason where behavior should differ.
Notes
This may want a shared helper for “runner scored outside an at-bat result” to avoid future drift.
Summary
Manual runner advances currently update the inning score when a runner scores, but they do not consistently update the rest of the stat model.
Why this matters
The app promises that batter and pitcher stat lines update automatically. Right now, scoring via manual advance reasons like wild pitch, passed ball, balk, or other can leave the line score out of sync with runner runs scored, pitcher runs allowed, and related bookkeeping.
Current examples
advance_runner()increments the inning score when a runner reaches home.WildPitchincrements wild pitches on the pitcher.PassedBall,Balk, andOtherdo not fully reconcile player/pitcher/run bookkeeping.Acceptance criteria
Notes
This may want a shared helper for “runner scored outside an at-bat result” to avoid future drift.