audit_csv
Validate an enriched Lorcana collection CSV against live API data and report field-level mismatches in Ink, cost, type, subtypes, inkable status, and stats.
Instructions
Audit an already-enriched Lorcana collection CSV against live API data and report exactly which fields drifted from the current source of truth — a correctness check on data already in the CSV, not a re-enrichment.
Checks Ink color, Ink Cost, Card Type, Subtypes, Inkable, and stats (Strength / Willpower / Lore Points) for every non-promo card, one live API call per unique card. Promo rows are always skipped entirely (counted separately as "promos skipped") since there's no reliable live source to diff a promo printing against. Ability/Keyword text is not checked — only the structured fields above.
Behavior: reports every field-level mismatch as "csv_value" → "api_value", grouped by card. One known, harmless false-positive class:
Subtypes differences that are purely separator/ordering (e.g.
"Storyborn/Ally/Toy" vs "Storyborn, Ally, Toy") — same data, different
formatting convention, most common in newer sets. Skim for those before
treating every reported line as a real error. A completely clean CSV
returns a one-line "no discrepancies found" summary instead of an empty
list.
Usage guidelines: run this after a new set releases, after any manual CSV
edits, or whenever enrichment output looks suspicious — not as a routine
step after every enrich_csv call, since it re-fetches from the live API
per unique card and adds real latency on a large collection. If it turns
up genuine (non-Subtypes-formatting) discrepancies, the fix is to re-run
enrich_csv, not to hand-edit the CSV — this tool only reports drift, it
does not write any changes back to the file.
Args: csv_path: Absolute path to an enriched Lorcana collection CSV.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |