Files
clinch/app/models
Dan MilneandClaude Opus 4.8 8b146db54e Device code: retry user_code generation on collision
Regenerate the user_code when a freshly generated one collides with an existing
code (up to USER_CODE_MAX_ATTEMPTS), so a client never gets a uniqueness error
just because two codes happened to match; the DB unique index stays the final
guard against a concurrent-insert race.

Replace the model test that asserted Rails' uniqueness validator message
("has already been taken") — per CLAUDE.md we don't test framework behavior —
with one that exercises the app-specific property: generation retries past a
collision and yields a unique code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7cwhwDJp3MJJDoNPVE6zq
2026-07-19 14:43:03 +10:00
..
2025-10-23 16:19:56 +11:00
2026-01-01 13:29:44 +11:00
2025-10-23 16:45:00 +11:00
2026-01-01 13:29:44 +11:00