Skip to content

fix(arena): reset OHH historian builder after Round::Complete#267

Merged
elliottneilclark merged 1 commit intomasterfrom
fix/m6-ohh-historian-reset
Apr 15, 2026
Merged

fix(arena): reset OHH historian builder after Round::Complete#267
elliottneilclark merged 1 commit intomasterfrom
fix/m6-ohh-historian-reset

Conversation

@elliottneilclark
Copy link
Copy Markdown
Owner

Both OpenHandHistoryHistorian and OpenHandHistoryVecHistorian
consumed their inner HandHistoryBuilder via take() when a hand
completed and never re-initialised it. A historian instance reused
across hands (e.g., passed to HoldemCompetition::run as part of a
cloned context) started returning UnableToRecordAction on every
subsequent call — silently dropping every subsequent hand's history.

Store the ConverterConfig on self so the builder can be
re-constructed after build() consumes the old one, and reset
self.builder = Some(HandHistoryBuilder::new(config.clone())) after
appending/pushing the completed hand. Replace the two tests that
previously pinned the buggy "errors after completion" behaviour with
regression tests asserting both historians can record multiple
consecutive hands.

Both `OpenHandHistoryHistorian` and `OpenHandHistoryVecHistorian`
consumed their inner `HandHistoryBuilder` via `take()` when a hand
completed and never re-initialised it. A historian instance reused
across hands (e.g., passed to `HoldemCompetition::run` as part of a
cloned context) started returning `UnableToRecordAction` on every
subsequent call — silently dropping every subsequent hand's history.

Store the `ConverterConfig` on `self` so the builder can be
re-constructed after `build()` consumes the old one, and reset
`self.builder = Some(HandHistoryBuilder::new(config.clone()))` after
appending/pushing the completed hand. Replace the two tests that
previously pinned the buggy "errors after completion" behaviour with
regression tests asserting both historians can record multiple
consecutive hands.
@elliottneilclark elliottneilclark merged commit 5207af7 into master Apr 15, 2026
2 checks passed
@elliottneilclark elliottneilclark deleted the fix/m6-ohh-historian-reset branch April 15, 2026 20:03
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