fix(app)!: name herdr as down instead of blaming the connection - #167
Merged
Conversation
When herdr's background server isn't running on the host, herdr 0.8.0
returns a `server_not_running` error envelope on stderr with exit 1.
`HerdrClient._exec` already parsed that envelope, but `classifyError`
routed the resulting `HerdrException` to `AppErrorKind.unknown`, which
renders the raw technical string as the headline. On herdr 0.7.x the same
failure printed a bare `Error: Os { code: 61, kind: ConnectionRefused,
... }`, which reads exactly like the SSH-level refusal dartssh2 raises for
a failed TCP connect — so users diagnosed a network problem that did not
exist while SSH was in fact fine.
Classify `server_not_running` into a new `AppErrorKind.herdrServerUnreachable`
before any `cause` inspection, and give it copy that says the host was
reached and herdr is what is down. `HerdrClient` itself is unchanged.
Raise `kMinHerdrVersion` to 0.8.0: this diagnosis only exists from 0.8.0,
and drover deliberately does not parse the older bare Rust error string.
Docs and the support page state the new floor.
Closes #160
BREAKING CHANGE: hosts running herdr 0.7.x are no longer supported. drover
shows its version warning and blocks launching agents on them; update herdr
on the host to 0.8.0 or newer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Closes #160.
What was wrong
When herdr's background server isn't running on the host,
herdr agent listfails — but SSH is fine. drover surfaced that as a raw technical string, and on herdr 0.7.x that string wasError: Os { code: 61, kind: ConnectionRefused, ... }— the same errno and wording dartssh2 raises for a failed TCP connect. Users reasonably concluded the network or SSH was broken when it wasn't.What changed
Verified against herdr 0.8.0 (
HERDR_SOCKET_PATH=/tmp/nope.sock herdr agent list): the server-down case returns exit 1 with an empty stdout and aserver_not_runningerror envelope on stderr.HerdrClient._execalready probes both channels, soherdr_client.dartis unchanged — the only gap was classification.AppErrorKind.herdrServerUnreachable, matched onHerdrException.code == 'server_not_running'before anycauseinspection, so thecause != null -> hostConnectionfallback can't shadow it.errorHostConnection/errorHostConnectionLost. The raw herdr message stays available in the Details expander via the existingerrorDetailpath.Error: Os { ... }output anywhere.Minimum herdr version raised to 0.8.0
This is a deliberate diagnosability floor, not a command-shape requirement — on 0.7.x every drover command still works, it just reports a server-down host with the misleading string above. Requested explicitly;
docs/,site/support/and the demo backend's self-reported version all moved with it.docs/app-store-submission.mdholds the App Store listing copy. This PR updates the file, but the live App Store Connect description still says "Herdr 0.7.5 or newer" and needs the same edit at the next submission.Verification
fvm flutter analyze --no-pub— cleanfvm flutter test --no-pub— 796 tests, all passing (full suite)server_not_runningclassification with and without acause; the headline is distinct from both host-connection strings; the real exit-1/stderr envelope shape surfaces the right code; the version-floor tests updated for the bump.Review notes
/code-reviewcaught three real defects in the first draft, all fixed here: the docs note and the new client test claimed the envelope arrives on stdout (it's stderr — re-verified live), the new strings used backticks that render literally in a plainTextwidget, and the version-bump rationale overstated its own necessity in both the code comment and the public support page.🤖 Generated with Claude Code