Files
buzz/desktop/src-tauri
25a61129f4 fix(desktop): capture one relay target per nest regeneration
The archive read re-resolved the workspace relay override twice — once in
fetch_relay_self for the NIP-11 signer and again in query_relay for the
snapshot — while the rendered footer captured it a third time. A workspace
switch between those reads could pair one relay's advertised signer with
another relay's snapshot, fail open, and render archived agents as active.

Capture the effective relay target (ws + api base) once, before any network
work, via capture_relay_target, and thread it through fetch_archived_pubkeys_at
(fetch_relay_self_at + query_relay_at) and the rendered footer, so signer,
snapshot, and footer all belong to one relay. A deterministic seam test mutates
the override between capture and fetch and proves the fetch never crosses relays.

Also rename NestRegenCoalescer to NestRegenGate: it is an ordered,
latest-write-wins gate, not a work coalescer — superseded generations still
perform their relay reads and drop the result at commit.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-17 19:00:17 -04:00
..