fix(desktop): quiet boot reconcile noise for unreachable relays#1134
Draft
wpfleger96 wants to merge 3 commits into
Draft
fix(desktop): quiet boot reconcile noise for unreachable relays#1134wpfleger96 wants to merge 3 commits into
wpfleger96 wants to merge 3 commits into
Conversation
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>
60f4a0f to
92f8f78
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local agents reconcile their
kind:0profile against their own per-record relay. When that relay is unreachable — which is normal for a local agent deliberately pointed at an offlinews://localhost:3000— both reconcile paths logged one failure line per agent. On boot this produced a wall of identicalrelay unreachablelines on everyjust stagingrun; 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 (whichrestore.rsmirrors) gets the same guard, so both paths are consistent.relay.rs—parse_json_responsepreviously 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 tobuzz-agentinstead ofgoose, matchingdefault_agent_command(), so new local agents stop being created on the deadgoosecommand.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.