A 200-game sweep found one extra pointer row still aimed at the old game number.
The collision case
A season move gives a game a fresh id when the destination table already uses its id, and it re-points everything that referred to the game. In that collided case, the rows pointing at the game were re-pointed only when the game had no pointer of its own. A game that already carried a pointer fell outside that condition. One row that pointed at such a game kept the old number.
The fix
The condition on the game’s own pointer came off. Every non-same-account collided move now re-points the rows that point at the game, whether or not the game has a pointer of its own.
AI Skills
Use this lesson with the AI assistant you already use
A season move gives a game a fresh id when the destination table already uses its id, and it re-points everything that referred to the game. A 200-game sweep found one extra pointer row still aimed at the old game number.
Paste the prompt, share only the context needed to answer it, and treat the result as a draft for your review. Do not include confidential information or let an AI assistant make changes without your approval.
Optional: for a visual report and saved memory, run /dxdev first.
Don’t have it? Get it at dxdev.com/skills/dxdev. The prompt works without it.
dxdev LESSON · paste into your AI coding agent
LESSON: When A Fix Is Gated On An Incidental Condition, Sweep For The Cases That Fall Outside It
SOURCE: dxdev.com/blog/slug-season-move-collided-id-pointer-sweep
WHAT HAPPENED: In the collided case, the code re-pointed the rows that referred to a game only when the game had no pointer of its own. A game that already carried its own pointer fell outside that condition, so its referring rows were skipped. One row that pointed at such a game kept the old number. A sweep across 200 games surfaced that leftover row. The fix removed the condition on the game's own pointer, so every non-same-account collided move now re-points the referring rows.
THE RULE: When a re-pointing step is guarded by a condition unrelated to whether the references need updating, drop the guard or prove it is always true. Then verify with a sweep that no row still references the old identifier.
CHECK MY CODE, then report PASS or FAIL with file:line for each:
1. Every code path that assigns a fresh id to a moved record also re-points all rows that reference the old id, with no extra condition on the record's other fields.
2. After a bulk move, a query for rows still referencing any old id returns zero results.
3. Tests cover a collided move where the moved record already has its own pointer, and assert that referring rows are updated.
THEN PRINT: a table (check, PASS/FAIL, evidence, fix) + a verdict (applies / partially / OUT_OF_SCOPE / no) + the single most important next action.