Skip to content

fix(desktop): quiet boot reconcile noise for unreachable relays#1134

Draft
wpfleger96 wants to merge 3 commits into
mainfrom
duncan/reconcile-noise-quiet
Draft

fix(desktop): quiet boot reconcile noise for unreachable relays#1134
wpfleger96 wants to merge 3 commits into
mainfrom
duncan/reconcile-noise-quiet

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Local agents reconcile their kind:0 profile against their own per-record relay. When that relay is unreachable — which is normal for a local agent deliberately pointed at an offline ws://localhost:3000 — both reconcile paths logged one failure line per agent. On boot this produced a wall of identical relay unreachable lines on every just staging run; on a manual start it logged a spurious line per agent.

This keeps the per-record relay authoritative (a local agent can still target whatever relay it wants) and only changes how an unreachable relay is logged.

Changes

  • restore.rs — boot reconciliation suppresses the per-agent failure line when the error is the expected relay-unreachable case, detected via the documented "relay unreachable:" prefix the relay helper guarantees (relay.rs). Genuine reconcile failures still log loudly.
  • agents.rs — the UI-start reconcile path (which restore.rs mirrors) gets the same guard, so both paths are consistent.
  • relay.rsparse_json_response previously labeled a successful 2xx response with an undeserializable body as "relay unreachable:", the same prefix as a genuine transport failure. That meant the reconcile guard above would silently swallow a reached-but-malformed response (protocol mismatch, relay bug, corrupted body). Re-prefixed to "relay returned malformed response:" so it falls outside the unreachable bucket and surfaces loudly. The frontend connectivity classifier (relayError.ts) also correctly stops treating it as a connectivity failure — a parse error is not a connectivity problem.
  • CreateAgentDialog.tsx — the create-agent picker defaults to buzz-agent instead of goose, matching default_agent_command(), so new local agents stop being created on the dead goose command.

No relay override, no data migration, nothing written to managed-agents.json. The only behavior changes are the picker default and which error conditions log; where agents connect is untouched.

@wpfleger96 wpfleger96 marked this pull request as draft June 19, 2026 17:04
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 and others added 3 commits June 19, 2026 13:20
Boot-time profile reconciliation logged a per-agent failure line every
time a local agent's per-record relay was unreachable, producing a wall of
identical "relay unreachable" lines on every `just staging` run. A local
agent may deliberately target an offline relay, so an unreachable per-record
relay is expected, not an error worth shouting each boot.

Suppress only the relay-unreachable case (detected via the documented
"relay unreachable:" prefix from relay.rs); genuine reconcile failures still
surface loudly. Also default the create-agent picker to buzz-agent instead of
goose so new local agents stop being born on the dead goose command. Keeps
the per-record relay authoritative everywhere — no override, no migration.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The UI-start profile reconciliation path carried the identical per-agent
eprintln! that restore.rs's boot path just learned to suppress. Without
the same guard, manually starting a local agent whose relay is unreachable
still logs a spurious failure. Apply the matching "relay unreachable:"
guard so both reconcile paths are consistent.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
parse_json_response tagged a 2xx response with an undeserializable body
as "relay unreachable:", the same prefix used for genuine transport
failures. The reconcile log-guard suppresses that prefix, so a reached-but-
malformed response (protocol mismatch, relay bug, corrupted body) was being
silently swallowed instead of surfaced. Re-prefix it to "relay returned
malformed response:" so it falls outside the unreachable bucket and logs
loudly; the frontend connectivity classifier also correctly stops treating
it as a connectivity failure. No other code reads the old string.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 force-pushed the duncan/reconcile-noise-quiet branch from 60f4a0f to 92f8f78 Compare June 19, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant