Editions become changeable — losslessly

Eric hit a diff version-disagreement and found there was no way to
revisit a set edition: the Titles pick-edition button only appeared
while the version was UNSET. It now shows as "change edition" on
version_auto/version_approved rows — and reopening the ballot no
longer clears the current pick, because change must be lossless:
abandoning the ballot keeps the approved edition, the lingering id is
inert while ambiguous (is_confident_version gates diff and upload),
and the next decision overwrites or clears it.

Help documents the other half of the disagreement story: the pipeline
NEVER edits a version already set on a BGG collection entry (the
additive-only rule), so a diff disagreement is resolved either by
changing the pipeline's pick here or by fixing the entry by hand on
BGG.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
Eric Wagoner
2026-08-09 12:28:59 -04:00
co-authored by Claude Fable 5
parent fb9f654cd8
commit f825a91ea4
8 changed files with 369 additions and 7 deletions
+31
View File
@@ -761,3 +761,34 @@ def test_research_clears_the_previous_games_version(tmp_path):
assert row["version_status"] == ""
assert row["version_id"] == "" and row["version_name"] == ""
assert row["version_candidates_json"] == "[]"
def test_reopening_a_version_ballot_keeps_the_current_pick(tmp_path):
"""Change-edition must be lossless: opening the full printing list on
an approved row keeps the pick until a new decision, and the lingering
id is inert while ambiguous."""
from bggpipe.models import is_confident_version
cfg = _setup(
tmp_path,
[
_row(
title_raw="Wingspan",
match_status="approved",
bgg_id="266192",
version_status="version_approved",
version_id="465063",
version_name="English first edition",
)
],
)
session = ReviewSession(
cfg, console=quiet_console(), input_fn=scripted(), client=fixture_client()
)
row = session.rows[0]
assert session.open_version_ballot(row) > 1
assert row["version_status"] == "version_ambiguous"
assert row["version_id"] == "465063" # survives until a new choice
assert not is_confident_version(row) # but inert for diff/upload
session.decide_version(row, None) # "can't tell" clears it properly
assert row["version_id"] == ""