The real-data era: token live, stubs retired, editions on demand
BGG application approved. The migration the stub markers guarded for weeks: both synthetic caches deleted; tests/fixtures/bgg_cache re-recorded from the live API (recording list extended to every scenario the suite exercises — Civilization truncation, the Sorcerer SPI tiebreak, StarForce, Flat Top's thematic year, Alice Is Missing's rpgitem fallback); resolve --force re-matched all 133 titles for real (109 auto, 6 ambiguous, 18 unmatched, 30 edition ballots); data/STUB_DATA.marker deleted with its exit condition met — the guard mechanism stays armed should stubs ever regenerate. Reality fixed one bug and taught one lesson. The bug: a multi-type search lists an expansion twice (once per matched type) and the parser kept the generic boardgame entry — parse_search now dedupes by id preferring the specific type, which is what keeps expansion tagging (the base-vs-expansion review guard) alive on real data. The lesson: hand-built ambiguity is tidier than the real thing — Wingspan has 46 versions with three plausible English Stonemaier printings, so the suite's synthetic version ids and version_auto expectations became real ballots (assertions updated to recorded reality; the cue-plumbing test keeps its crafted two-version scenario via an injected transport). New: pick edition. A cue-less matched row is version_unknown by design (never guess) — but the owner knows which printing the box is. open_version_ballot() fetches the game's complete version list, cue-scores it when cues exist, and marks the row version_ambiguous so the normal Review edition pass presents it; the Titles page grows the button (Eric's three Wiz-Wars: two cue-less copies can now each claim their edition). 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
15d3120029
commit
59f4b8c43c
@@ -9,7 +9,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
| # | Command | What it does | Status |
|
||||
|---|---------|--------------|--------|
|
||||
| 1 | `bggpipe extract` | Claude vision reads titles + edition cues from `photos/` | working |
|
||||
| 2 | `bggpipe resolve` | match titles to BGG IDs and versions via XML API2 | working (stub data — see hard rules) |
|
||||
| 2 | `bggpipe resolve` | match titles to BGG IDs and versions via XML API2 | working (real API data since 2026-08-05) |
|
||||
| 3 | `bggpipe review` | human review of ambiguous/unmatched items; `--web` serves a FastAPI UI on port 8377 | working |
|
||||
| 4 | `bggpipe diff` | diff approved matches against the existing BGG collection | working |
|
||||
| 5 | `bggpipe upload` | add games via a logged-in Playwright session | built; browser flows unverified until real data exists (`--dry-run` works now) |
|
||||
@@ -40,7 +40,7 @@ Full design lives in `bgg-shelf-pipeline-spec.md` (read it before changing pipel
|
||||
- **Every stage is idempotent and resumable** — killing mid-run and restarting must lose no work; re-runs skip already-processed items.
|
||||
- Use only the XML API2 and the public website — no undocumented BGG endpoints (BGG tightened access policies in 2025).
|
||||
- BGG has **no write API**: writes drive the real website with a logged-in Playwright session.
|
||||
- **Stub-resolved data is never upload-ready.** All version_ids (and some game data) in `matches.csv`, `to_add.csv`, and `to_update.csv` currently come from SYNTHETIC stub fixtures — placeholders until real fixtures exist. When `BGG_API_TOKEN` arrives: delete both cache dirs, re-record fixtures, `resolve --force`, re-review. Two provenance markers guard this (both written by the fixture generators): `data/bgg_cache/STUB_FIXTURES.marker` (gitignored, travels with the stub XML) and `data/STUB_DATA.marker` (**committed**, so a fresh clone stays guarded). The upload stage MUST refuse to run while either exists; delete `data/STUB_DATA.marker` only after re-resolving from real fixtures.
|
||||
- **Synthetic data must never reach upload.** The stub era ended 2026-08-05: `matches.csv` and `tests/fixtures/bgg_cache/` now hold real API data. The guard mechanism stays armed: the stub-fixture generators write `data/bgg_cache/STUB_FIXTURES.marker` (gitignored) and `data/STUB_DATA.marker` (committed), and the upload stage MUST refuse to run while either exists — regenerating stubs re-locks upload automatically.
|
||||
|
||||
## Domain gotchas
|
||||
|
||||
|
||||
Reference in New Issue
Block a user