Repository navigation
feat(period-score): expose the games won inside a period - #64
Merged
Merged
Conversation
Set-based classic sports report the games of each set on the period row, next to the running sets-won tally. home_games/away_games had no place in the period score models, so XmlSerializer dropped the attribute while decoding and consumers were left with the tally only - a per-set row rendered 1:0 where the set was 6:4. The scoreboard cannot recover it either: its games reset with every new set. - home_games/away_games on periodScoreType (feed) and periodScore (API), using the Specified pattern so absence stays distinguishable from a real 0:0 (XmlSerializer cannot encode nullable attributes) - HomeGames/AwayGames (int?) on IPeriodScore and the PeriodScore entity - mapped in both cache paths, feed and API - new Oddin.OddsFeedSdk.Tests project covering both decode paths; CI now runs it instead of the placeholder library test step Additive only - no existing field changes shape or meaning. Mirrors oddin-gg/gosdk#48 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lukassenfeld-oddin
approved these changes
Aug 21, 2026
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.
Why
Set-based classic sports report the games of each set on the period row, next to
the running sets-won tally. A live tennis match with the first set won 6:4 and
the second under way arrives from the feed as:
home_games/away_gameshad no place in the period score models — gamesexisted only on the scoreboard, which describes the set in progress and nothing
else.
XmlSerializertherefore dropped the attribute while decoding, and aconsumer was left with
home_score: the sets-won tally, identical on every row(1:0, 1:0, …). Rendering a per-set row from it shows 1:0 where the set was 6:4.
It also cannot be reconstructed downstream. The scoreboard resets its games with
each new set, so once a set ends its score is gone from the live state, and a
consumer restarting mid-match has nothing to replay it from.
What changed
home_games/away_gamesonperiodScoreType(feed) andperiodScore(API), using the
Specifiedpattern already used elsewhere in these models —XmlSerializercannot encode nullable attributes (the revertedelapsed_timenullable fix hit exactly this), and the flag keeps absence distinguishable
from a legitimate 0:0 at the start of a set
HomeGames/AwayGamesasint?onIPeriodScoreand thePeriodScoreentity
Specified ? value : null)Oddin.OddsFeedSdk.Testsproject (xunit) — the repo had none; the CI"Run Library Tests" step was a placeholder pointing at the library project
and now runs the test project instead
Additive only — no existing field changes shape or meaning.
Mirrors the same change in gosdk: oddin-gg/gosdk#48
Tests
PeriodScoreGamesTestsdeserializes the payload above through both decodepaths (
odds_changeandmatch_summary) and asserts a completed set keeps6:4, the set in progress carries 0:1, a period without games leaves the
Specifiedflags unset (→ null on the entity), and the sets-won tally on thesame row stays readable and independent.
🤖 Generated with Claude Code