claude-memory/graph/workflows/pr-review-paper-dynasty-database37-remove-dead-roster-csv-fi-961377.md

2.1 KiB
Raw Blame History

id type title tags importance confidence created updated relations
96137768-1e1e-4d7c-9890-6443ecd5cc36 workflow PR review: paper-dynasty-database#37 — remove dead roster CSV fields
pr-reviewer
paper-dynasty-database
fastapi
peewee
python
cards-router
0.4 0.8 2026-03-03T20:03:36.362466+00:00 2026-03-03T20:03:36.749702+00:00
target type direction strength edge_id
0fdd32ea-6b6a-4cd0-aa4b-117184e0c81d RELATED_TO outgoing 0.89 5456aab2-c93f-4c4d-b69f-dfc9d8960e2d
target type direction strength edge_id
b9375a89-6e0f-4722-bca7-f1cd655de81a RELATED_TO outgoing 0.89 df40d204-9543-4ced-950a-534034448858
target type direction strength edge_id
1e0e14cd-588f-417d-8fcb-a48a6cca506d RELATED_TO outgoing 0.88 da9c25a4-9c58-44d7-b73a-b920194f935a

PR #37: fix: remove dead roster fields from CSV in v1_cards_get_one

Verdict: APPROVED (posted as COMMENT — Gitea blocks self-approval) Branch: ai/paper-dynasty-database-36 (AI-generated) File reviewed: app/routers_v2/cards.py

Summary

Removed roster1, roster2, roster3 from the CSV output in v1_cards_get_one. These fields don't exist on the Card model (confirmed in db_engine.py lines 472491 — only player, team, pack, value). Accessing them would raise AttributeError on every GET /api/v2/cards/{card_id}?csv=true request.

Key Findings

  • Fix is correct and verified against Card model definition
  • Ruff reformatted entire file (single → double quotes) alongside the fix — noisy diff but harmless
  • Pre-existing inconsistency: get_cards CSV uses player.p_name, v1_cards_get_one CSV uses raw this_card.player (str)
  • v1_cards_patch still has dead roster1_id/roster2_id/roster3_id params that are accepted but silently dropped by Peewee save() — follow-up issue recommended

Patterns Noted

  • Card model fields: player (FK), team (FK), pack (FK), value (int) — no roster fields
  • Peewee silently ignores assignment to undeclared model attributes on save()
  • Gitea blocks APPROVED review state for self-owned PRs; use COMMENT instead