fix(dev_tools): use unified cards/{id} endpoint for /dev refractor-test #168

Merged
cal merged 2 commits from fix/refractor-test-unified-cards-lookup into main 2026-04-11 17:22:22 +00:00

2 Commits

Author SHA1 Message Date
Cal Corum
c8424e6cb1 docs(dev_tools): update refractor-test card_id describe string
All checks were successful
Ruff Lint / lint (pull_request) Successful in 17s
Review follow-up: the @app_commands.describe string still referenced
"batting or pitching card ID" after the switch to the unified cards
endpoint. Update to clarify that card_id is now a card-instance ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:19:46 -05:00
Cal Corum
1c47928356 fix(dev_tools): use unified cards/{id} endpoint for /dev refractor-test
All checks were successful
Ruff Lint / lint (pull_request) Successful in 27s
The previous two-step battingcards→pitchingcards fallback caused card
ID collisions — e.g. card 494 resolving to Cameron Maybin (batting)
instead of the intended pitcher Grayson Rodriguez. The unified cards
endpoint is keyed on globally-unique card instance IDs and carries
player, team, and variant in a single response.

- Single db_get("cards", object_id=card_id) lookup
- Card type derived from player.pos_1 (SP→sp, RP/CP→rp, else→batter)
- team_id sourced from card["team"]["id"] (no get_team_by_owner fallback)
- TestRefractorTestSetup rewritten for the single-endpoint contract

Spec: docs/superpowers/specs/2026-04-11-refractor-test-unified-cards-lookup-design.md
2026-04-11 12:07:35 -05:00