"Wrong game" re-searches on the spot; resolve explains what it won't do
Eric pressed wrong-game on both rows, ran resolve, and resolve truthfully found "nothing to match" — unmatched is a human-owned state it refuses to touch, but the button's name promised a re-match and the pipeline was the natural place to seek one. reopen_match now clears the match AND re-searches immediately (merged depunct search, sibling editions included, stats attached), returning the row as an ambiguous ballot on the very card the button lives on; if BGG is unreachable it reopens bare with a visible warning, and re-search/manual-id remain. run_resolve's summary now says out loud that unmatched rows wait for the human — it never overrides a decision, including "this is wrong." Data: the two stranded WIZ-WAR rows re-searched into ballots — both cards now offer all three lineages, awaiting Eric's picks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
co-authored by
Claude Fable 5
parent
1dd72d2688
commit
481fa63488
@@ -717,6 +717,13 @@ def run_resolve(
|
||||
f"Resolved {len(new_rows)} title(s) ({summary or 'nothing new'}); "
|
||||
f"skipped {skipped} already in {cfg.matches_path}."
|
||||
)
|
||||
waiting = sum(1 for r in all_rows if r.get("match_status") == "unmatched")
|
||||
if waiting:
|
||||
typer.echo(
|
||||
f" {waiting} unmatched row(s) wait for YOUR call in review "
|
||||
"(re-search or manual id) — resolve never overrides a human "
|
||||
"decision, including 'this match is wrong'"
|
||||
)
|
||||
if blocked:
|
||||
typer.echo(
|
||||
f"\n{len(blocked)} title(s) are waiting on the BGG API "
|
||||
|
||||
+32
-4
@@ -32,6 +32,7 @@ from bggpipe.normalize import normalize_title
|
||||
from bggpipe.resolve import (
|
||||
MatchRow,
|
||||
TitleEntry,
|
||||
_merged_candidates,
|
||||
_score_version,
|
||||
load_titles,
|
||||
read_matches,
|
||||
@@ -369,10 +370,12 @@ class ReviewSession:
|
||||
self._save(row)
|
||||
|
||||
def reopen_match(self, row: dict) -> None:
|
||||
"""The human says a matched row is the WRONG game: back to the
|
||||
unmatched queue with a clean slate — manual id and re-search live
|
||||
there. (The .dungeon case: an exact-normalized impostor wins when
|
||||
the real game never surfaced in the search.)"""
|
||||
"""The human says a matched row is the WRONG game: clear the match
|
||||
and immediately re-search so the card comes back as a ballot — the
|
||||
machine re-OFFERS, only the human re-decides (run_resolve never
|
||||
touches unmatched rows, so without this the row would just sit).
|
||||
If BGG is unreachable the row still reopens, bare: re-search and
|
||||
manual id remain available on the card."""
|
||||
row["match_status"] = "unmatched"
|
||||
row["bgg_id"] = ""
|
||||
row["bgg_name"] = ""
|
||||
@@ -383,6 +386,31 @@ class ReviewSession:
|
||||
row["version_id"] = ""
|
||||
row["version_name"] = ""
|
||||
row["version_candidates_json"] = "[]"
|
||||
entry = self.cues_for(row["title_raw"], row["source_photos"]) or TitleEntry(
|
||||
title_raw=row["title_raw"],
|
||||
title_normalized=normalize_title(row["title_raw"]),
|
||||
)
|
||||
try:
|
||||
cands = _merged_candidates(self.client, entry, row["title_raw"])[:8]
|
||||
if cands:
|
||||
stats = {
|
||||
t.bgg_id: t
|
||||
for t in self.client.things([c.bgg_id for c in cands], stats=True)
|
||||
}
|
||||
for c in cands:
|
||||
if c.bgg_id in stats:
|
||||
c.owned = stats[c.bgg_id].owned
|
||||
c.rank = stats[c.bgg_id].rank
|
||||
c.publishers = list(stats[c.bgg_id].publishers)
|
||||
row["match_status"] = "ambiguous"
|
||||
row["candidates_json"] = json.dumps(
|
||||
[c.as_json() for c in cands], ensure_ascii=False
|
||||
)
|
||||
except _BGG_ERRORS as err:
|
||||
self._warn(
|
||||
f"re-search unavailable ({err}) — the row is reopened; use "
|
||||
"(f) re-search or (m) manual id on its card"
|
||||
)
|
||||
self._save(row)
|
||||
|
||||
def open_version_ballot(self, row: dict) -> int:
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<p><b>edit</b> — fix a misread title or add cues you already know (publisher, edition, year, language). A corrected misspelling automatically merges with a correctly-read sighting of the same game from another photo. If the line already had a BGG match, saving re-queues it so resolve searches again with the corrected data.</p>
|
||||
<p><b>split into copies</b> — one line, several physical boxes? Splitting makes each photo its own copy, and each copy picks its own edition afterward. Appears on any line whose title was seen in more than one photo. Splitting one game never affects a same-named different edition.</p>
|
||||
<p><b>pick edition</b> — a matched game with no legible edition cues stays version-less by design (never guess) — but you know which printing your box is. This fetches the game's complete version list into a Review ballot; pick yours there.</p>
|
||||
<p><b>wrong match</b> (inside the edit panel) — an auto-match landed on the wrong game (same-name impostors happen). This clears the match and returns the title to Review's unmatched queue, where re-search and manual-id live. Note BGG sometimes splits one game's lineage across entries — Wiz-War's early editions and its FFG remake are separate games — so a copy whose edition isn't on the ballot may belong to the sibling entry.</p>
|
||||
<p><b>wrong match</b> (inside the edit panel) — an auto-match landed on the wrong game (same-name impostors happen). This clears the match, re-searches immediately, and returns the title to Review as a fresh ballot of candidates (including same-named sibling editions); manual-id entry is there too for games BGG's search can't find. Note BGG sometimes splits one game's lineage across entries — Wiz-War's early editions and its FFG remake are separate games — so a copy whose edition isn't on the ballot may belong to the sibling entry.</p>
|
||||
<p><b>add a game</b> (top of the Titles page) — a game no photo shows: an expansion stored inside a base box, a game away from the shelves. It joins the list like any read (BGG wants base game and expansion as separate collection entries, so boxes that hold both need this for the hidden half), and if a later photo shows it, the sighting merges instead of duplicating.</p>
|
||||
<p><b>remove</b> (inside the edit panel) — for lines that shouldn't exist at all: a book read as a game, box art misread as a title. The line and its matches are discarded and stay gone. This is different from <i>reject</i> on the Review page, which keeps the line visible as "no BGG match" — right for real games BGG doesn't know.</p>
|
||||
<p>Undo: each decision is one record in <code>data/title_edits.json</code>, <code>data/title_splits.json</code>, or <code>data/title_removals.json</code> — delete the record and the next rebuild restores the old state.</p>
|
||||
|
||||
Reference in New Issue
Block a user