Pokémon TCG AI Battle - 2026-08-14 ETL and Database Audit
Read-only reconciliation of replay ZIPs, Parquet datasets, SQLite Schema 2.0.0, day metadata, auxiliary targets and relational integrity.
Pokémon TCG AI Battle - 2026-08-14 ETL and Database Audit
Boundary
This is a read-only snapshot of the live checkout on August 14, 2026. No replay archive, Parquet file, SQLite row, source file or future document was deleted or corrected during the audit. Counts from Antigravity reports are retained as provenance when they differ from a direct re-read of the current files.
Replay archive reconciliation
The repository contains 30 daily archives from 2026-07-14.zip through 2026-08-12.zip. A direct re-read of the current ZIP members found 138,138 .json episode members, plus one .csv member in each archive. The earlier Antigravity survey handoff recorded 140,511 raw JSON episodes. That 2,373-member difference is an unresolved audit delta, not silently reclassified as ingestion loss.
The current archive set was readable and each ZIP passed the local member-integrity probe. The source hierarchy still treats raw replay evidence as the ETL authority; database and Parquet counts are derivatives.
Current SQLite population
model/results.db reports schema_metadata.schema_version = 2.0.0, created on 2026-08-03 20:11:17. The current read-only population is:
| Table | Rows |
|---|---|
matches | 139,783 |
match_steps | 3,065,706 |
match_participants | 276,046 |
match_card_usage | 6,106,603 |
step_options | 12,831,700 |
step_events | 15,318,730 |
board_snapshots | 6,028,402 |
pokemon_on_field | 19,067,881 |
agents | 1,117 |
decks | 948 |
deck_cards | 19,343 |
submissions | 8,055 |
submission_decks | 8,055 |
days | 30 |
datasets | 30 |
agent_elo_daily | 28,745 |
deck_elo_daily | 10,742 |
card_elo_daily | 9,350 |
operation_receipts | 138,151 |
tournaments | 128 |
matchups | 1,621 |
The direct source split is 138,023 remote matches and 1,760 local matches. The local rows are the current local-arena observation set; this does not mean that all prior tournament match replays remain linked in matches.
Parquet corpus and auxiliary targets
The current data/bc_data/ directory contains 30 Parquet files and 30 manifest sidecars. The files have 90 columns and 24,177,852 decision rows in total. The latest partition, 2026-08-12.parquet, has 806,653 rows and reports:
| Field | Direct observation |
|---|---|
aux_valid == 1 | 806,653 rows, 100.00% |
aux_ko == 1 | 75,761 rows, 9.39% |
aux_terminal == 1 | 12,228 rows, 1.52% |
aux_prize_delta != 0 | 71,846 rows, 8.91% |
aux_return != 0 | 806,539 rows, 99.99% |
is_attack == 1 | 220,289 rows, 27.31% |
self_deck_id | fixed_size_list<int32>[60] |
The oracle explorer reports that the native bc_would_ko path is bound through rl/search_agent.py and that the dedicated dataset tests passed. This supports the existence of the oracle and the test result. It does not establish that the future MoE training run has been completed.
Day metadata is not a clean completion ledger
All 30 rows in days currently have is_complete=0. ZIP path and SHA256 metadata are populated only for 2026-08-02 through 2026-08-04 and 2026-08-08 through 2026-08-09. Several declared days.n_matches values do not equal either the imported matches count or the physical ZIP count:
| Date | Declared days.n_matches | Imported matches | ZIP JSON members |
|---|---|---|---|
| 2026-08-05 | 6,229 | 4,729 | 4,740 |
| 2026-08-06 | 10,451 | 4,629 | 4,631 |
| 2026-08-07 | 8,716 | 4,636 | 4,639 |
| 2026-08-10 | 5,139 | 4,599 | 4,603 |
| 2026-08-11 | 7,632 | 4,621 | 4,622 |
| 2026-08-12 | 20,325 | 6,361 | 4,604 |
These are observations for ETL follow-up. They are not interpreted here as proof of a specific reset, loss mechanism or required repair.
Relational integrity status
The read-only foreign-key audit reports 2,946,336 violations. The Antigravity DB explorer's breakdown is:
- 2,488,290 orphaned
match_stepsrows whosematch_idis absent frommatches; - 458,046 orphaned
match_card_usagerows whosematch_idis absent frommatches; - no reported orphaned
match_participants,step_options,step_events,board_snapshotsorpokemon_on_fieldroots in that direct explorer report; - child rows were observed beneath orphaned steps in the explorer's diagnostic report.
This page records the anomaly and its provenance. The proposed purge in the M2 scope was not executed, and the database is not described as repaired or foreign-key clean.
Elite pool status
The Antigravity survey reports 39,957 matches with both relevant participants at daily Elo >= 1100.0, with a target of roughly 40,000 to 100,000 matches and 6.5M to 12M decision rows for a refined elite corpus. That filter result is retained as a survey observation and should be recomputed before it becomes a final dataset claim. The current 24.18M-row Parquet corpus is the broad 30-day corpus, not proof that the elite compilation has been completed.
ETL implementation boundary
The current code path is split across scripts/bc/build_bc_from_zips.py, scripts/bc/build_bc_dataset.py and rl/results_db.py. Raw replay archives remain the physical source, SQLite provides catalog and rating joins, and Parquet provides the training representation. scripts/rebuild_db.py describes a staging and atomic-publish rebuild, but no rebuild or orphan purge was run during this documentation pass.
Cross-references
- pokemon_tcg_aug14_architecture_and_handoff_audit - source-versus-blueprint boundary
- pokemon_tcg_aug14_ablations_tournaments - current ablation and tournament evidence
- pokemon_tcg_sqlite_schema_current - historical August 7 snapshot plus current pointer
- pokemon_tcg_parquet_dataset - Parquet format and column contract
- pokemon_tcg_data_pipeline - historical NPY pipeline and migration lineage
- pokemon_tcg_local_platform_status - implementation boundary for the local platform