Files
buzz/desktop/src-tauri
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dandTyler Longwell b3b669f40f Desktop: stop auto-healing agent kind:0 on start and restore
The desktop record was the authority for an agent's avatar: on every
agent start and on app-launch restore, a fire-and-forget task called
reconcile_agent_profile, which recomputed the avatar from the local
ManagedAgentRecord and republished kind:0 whenever it diverged from the
relay. That healed a self-set avatar back to the device default — the
one identity field desktop still overwrote without an explicit user
action.

Remove the two non-explicit kind:0 writers (the start-path spawn in
start_managed_agent and the restore loop in restore_managed_agents).
Desktop now publishes kind:0 only on explicit user action — agent
creation and rename/model-edit save, both of which call
sync_managed_agent_profile directly and are untouched.

With both call sites gone, the reconcile chain is orphaned, so it is
deleted rather than left as dead code: reconcile_agent_profile,
resolve_legacy_avatar, profile_needs_sync, the ProfileReconcileData
struct, and the now-unused relay helpers query_agent_profile /
AgentProfileInfo, plus their unit tests.

One behavior change: reconcile_agent_profile also performed a one-shot
legacy-avatar backfill for pre-PR-921 records with no stored avatar_url.
That backfill was coupled to the unwanted background healer; preserving
it would reintroduce an implicit background kind:0 writer. A legacy
agent now backfills on the next explicit edit-save instead of silently
on start.

No relay changes. Agent signing keys remain in the keyring.

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-06-28 16:48:07 -04:00
..
2026-06-11 15:06:24 +00:00