All 14 success criteria met, all 10 child tasks completed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
title, status, type, priority, created_at, updated_at, parent
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| Genlocke edge cases | completed | task | normal | 2026-02-09T08:48:46Z | 2026-02-09T11:04:01Z | nuzlocke-tracker-25mh |
Guard genlocke-related data integrity edge cases. Audited existing endpoints for gaps in validation when runs, encounters, or legs interact with genlocke tracking.
Checklist
Critical
-
Block deletion of genlocke-linked runs.
DELETE /runs/{id}now returns 400 if the run belongs to a genlocke leg. (runs.py) -
Block reactivation of completed/failed genlocke-linked runs.
PATCH /runs/{id}now returns 400 when trying to set status back toactiveon a genlocke-linked run. (runs.py)
High
- Guard encounter deletion against transfer references.
DELETE /encounters/{id}now checks for GenlockeTransfer references and returns 400 instead of a raw FK constraint violation. (encounters.py)
Already handled (verified during audit)
- Advance leg twice — guarded by "next leg already has a run" check in
advance_leg - Transfer eggs blocking starter route — transfer-target encounters are excluded from route-lock checks (
encounters.py:90-96) - Shiny flag preservation during transfers —
is_shinyis copied to egg encounter (genlockes.py) - Genlocke deletion cascading properly — CASCADE on FK for both
GenlockeLegandGenlockeTransfer, runs properly unlinked - Duplicate source transfers — prevented in practice by the "next leg already has a run" guard;
target_encounter_idhas a UNIQUE constraint - Empty transfer list — valid behavior, advances leg without transfers