**Use movement half when crediting steal-home runs** #66

Closed
opened 2026-04-21 00:47:35 +02:00 by umpire274 · 0 comments
umpire274 commented 2026-04-21 00:47:35 +02:00 (Migrated from github.com)

Use movement half when crediting steal-home runs

add_runs_to_score(state, 1) credits runs using state.half/state.inning, but replay links steals to the previous committed PA (rm.pa_seq = last_pa_seq in play_ball.rs), so a steal during the first in-progress at-bat of a new half can be replayed while state.half is still the prior half. In that case, this line assigns the run to the wrong team/inning bucket instead of the row’s recorded rm.half_inning, which regresses resume accuracy for steal-home events across half-inning boundaries.

Useful? React with 👍 / 👎.

Originally posted by @chatgpt-codex-connector[bot] in https://github.com/umpire274/bs_scoring/pull/65#discussion_r3114074699

**Use movement half when crediting steal-home runs** `add_runs_to_score(state, 1)` credits runs using `state.half/state.inning`, but replay links steals to the previous committed PA (`rm.pa_seq = last_pa_seq` in `play_ball.rs`), so a steal during the first in-progress at-bat of a new half can be replayed while `state.half` is still the prior half. In that case, this line assigns the run to the wrong team/inning bucket instead of the row’s recorded `rm.half_inning`, which regresses resume accuracy for steal-home events across half-inning boundaries. Useful? React with 👍 / 👎. _Originally posted by @chatgpt-codex-connector[bot] in https://github.com/umpire274/bs_scoring/pull/65#discussion_r3114074699_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
umpire274/bs_scoring#66
No description provided.