refactor(coord): genesis IDs for task + reservation; fix composite PK bug
task_id and reservation_id were the last two UUID surrogates. Both now use genesis-addressed IDs deterministic from their creation context.
task_id = sha256(repo_id NUL queue NUL created_by NUL created_at_iso) reservation_id = sha256(repo_id NUL agent_id NUL sorted_addresses NUL created_at_iso)
This also fixes a latent bug in _materialize_reservation: the old PK was reservation_id alone, so session.get(PK) on loop iteration 2+ found the first row and skipped all subsequent addresses. Only the first symbol was ever stored.
Fix: composite PK (reservation_id, symbol_address) — one row per address per reservation. session.get now uses (reservation_id, address) tuple. extend_reservation updated to use UPDATE WHERE instead of single-row get. Alembic 0023 migrates live.
TDD: test_reservation_multi_address_stores_all_rows (was red, now green) test_task_id_canonical, test_reservation_id_canonical
0 comments
muse hub commit comment sha256:a735c8de3c86c03bfb32bc069810dcd5a8699a6cf7296799c40108d296cdaa3b --body "your comment"
No comments yet. Be the first to start the discussion.