Pokemon TCG - Local Platform Status
Current implementation boundary for the local SQLite, tournament, replay, dashboard, and rating platform.
Pokemon TCG - Local Platform Status
Evidence Boundary
This page reconciles the July 27, 2026 local-overhaul contract with the current
pokemon-tcg worktree. It distinguishes implemented code from partial
implementation and still-planned product scope. The authoritative target
contract remains the project task file and Alefita's decisions; this page is a
status map, not a replacement specification.
August 14 live observation
The current read-only database snapshot contains 128 tournament summaries and
1,621 matchup summaries, but only 1,760 local rows in matches. This supports
the existence of a persistent tournament ledger and a current local replay
observation set. It does not establish that every earlier tournament replay
remains in the normalized match tables, or whether an intermediate reset or
partial rebuild occurred. The database also reports unresolved foreign-key
violations and incomplete day metadata. These observations are documented in
pokemon_tcg_aug14_data_etl_database_audit; no remediation is implied here.
The August 15 read-only ResultsDB revalidation reproduced 139,783 matches,
1,760 local matches, 128 tournament summaries, 948 decks and 1,117 agents.
The persistent tournament ledger therefore remains observable, but neither
this page nor the ledger proves that every local replay survived an
intermediate reset. The current source/database reconciliation is in
pokemon_tcg_current_state_reconciliation.
Implemented
rl/results_db.py implements a disposable SQLite schema with exact-version
initialization. A non-empty database with another schema is rejected and must be
rebuilt explicitly.
Implemented relational areas include:
- canonical sources
localandremote; - deck sources and exact deck composition fingerprints;
- teams with reported or unidentified-observation identities;
- cards, decks, and deck-card composition rows;
- submissions and
submission_decks, allowing multiple deck observations for one submission/team context; - tournaments and matchup summaries;
- local and remote matches with uniqueness by local matchup/game, external episode id, or source observation digest;
- match participants, card usage, steps, options, events, board snapshots, and Pokemon-on-field rows;
operation_receiptsfor idempotent tournament and match recording;- card Elo and deck Elo tables, initialized from 600.
scripts/tournament.py persists tournament aggregates and local match replay
data into SQLite. It records env.render(mode='json') output as normalized
rows for steps, options, events, board counters, status flags, and field
Pokemon, then recomputes local card/deck Elo.
scripts/rebuild_db.py rebuilds the remote-context database from canonical
cards, decks, and replay ZIPs through a staging database. It validates SQLite
integrity, foreign keys, required non-empty tables, replay counts, participant
coverage, card usage, and a logical fingerprint before atomically publishing
the rebuilt database.
scripts/dashboard.py is a real Streamlit surface with overview, cards, decks,
deck builder, agents, arena, replays, and configuration tabs.
Partially Implemented
The replay model is normalized enough for local dashboard inspection, but it is not the full target replay contract. The current schema records options, events, snapshots, and Pokemon on field, but it does not yet expose the complete zone snapshot, card movement, serial-scoped effect, and official visualizer reconstruction contract described in pokemon_tcg_replay_data_model.
The dashboard can inspect cards/decks/arena/replays and can write
agent/deck.csv with a backup. It is not yet the complete submission lifecycle,
experiment, tournament-configuration, or official-visualizer control plane.
Ratings exist for deck and card evidence by source. Submission, model, rating policy, epoch, and append-only rating-event layers remain incomplete relative to the target contract.
Planned Or Not Yet Implemented
The current schema does not yet implement the full target families for:
modelsand immutablemodel_revisions;- generic
experiments,experiment_observations, and type-specific result tables; - normalized immutable
training_configsandtraining_runs; - dashboard-editable
tournament_configs; - complete submission lifecycle/events and remote Kaggle mapping;
- rating policies, epochs, submission ratings, model ratings, and append-only rating events;
- external official visualizer launch with verified route/method and Player 1 or Player 2 selection.
These are not failures of the current code. They are open scope from the larger local-platform contract.