Parent
Review findings on #96.
What to build
The agent must receive exactly one "answers available" wake per delivered answer, across server disconnects and re-registrations. Today the dedup for a follow-up that has been sent but not yet persisted by Pi lives only in an in-memory set that is discarded when the coordinator stops; the replacement coordinator's recovery re-sends the wake, so the agent gets two wakes and calls get_answer twice. Conversely, if Pi's follow-up queue is cleared, the id stays in the in-memory set forever and the wake is never retried.
Persist a sent marker (or dedupe against Pi's actual queued messages) so recovery is correct in both directions.
Acceptance criteria
Blocked by
- None — can start immediately
Parent
Review findings on #96.
What to build
The agent must receive exactly one "answers available" wake per delivered answer, across server disconnects and re-registrations. Today the dedup for a follow-up that has been sent but not yet persisted by Pi lives only in an in-memory set that is discarded when the coordinator stops; the replacement coordinator's recovery re-sends the wake, so the agent gets two wakes and calls get_answer twice. Conversely, if Pi's follow-up queue is cleared, the id stays in the in-memory set forever and the wake is never retried.
Persist a sent marker (or dedupe against Pi's actual queued messages) so recovery is correct in both directions.
Acceptance criteria
Blocked by