Repository navigation
WDB 12.9.25-32 - the side-orientation rework
The side-orientation rework. Match 1476 was recorded backwards - it stored a winner
that contradicted its own heroes - and this makes that defect unrepresentable rather
than fixed.
What changed
A match is now two canonically-sorted trios plus pointers, in both databases.
1476 happened because there were two independent side labels, match.outcome and
match_hero.side, and nothing forced them to agree. There is now one composition,
with winning_trio and blue_trio pointing into it. Which trio is "1" is a pure
function of the heroes, so two spectators who watched the same match with the panels
the other way round store it under the same numbers.
Orientation is resolved from the trios at record time - never from a banner, a tint,
a player name or a panel position - and resolved BEFORE anything is announced or
recorded. On refusal the trios and the winner are still stored, because those need no
orientation; only the draft-relative values are declined, and declined rather than
guessed.
Fixed
- The stale carryover: after a draw or a timeout, the previous match's prediction
and ratings were recorded against the next one. - 53 duplicate rows were counted twice in the model fit. 1547 decisive rows become
1494. - The HIT/MISS line compared a draft-relative probability against a summary panel,
so a mirrored match announced the inverted verdict. - Every odds sample was silently lost to a swallowed
TypeError.
Migration
The local reshape runs automatically on launch and does the repair and the shape
change in one step - they cannot be sequenced by asking. Verified against a copy of
the operator's database: 1547 canonical, 3 unrepresentable, 0 unclassified, a snapshot
row for every match, and a second run byte-identical to the first.
342 local rows keep blue_trio NULL because the audit never covered them. 8% of
audited rows were mirrored, so guessing would be wrong about one row in twelve,
silently.
The server must be deployed and migrated before this build is used, and that
migration is irreversible. See docs/superpowers/plans/2026-08-01-side-orientation.md.
Full detail in CHANGELOG.md.