honest-error: GuestMeshJoin blames "setup key refused / netbird absent" for what is an ssh auth refusal (exit 255, publickey) #1202
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1202
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split from #1200 (found while fixing the enroll-trust mint gap; not the fault fixed there).
Symptom
internal/vm/manager.go(GuestMeshJoin, ~line 712) wraps EVERY failure of the guestnetbird-mesh upSSH invocation with one fixed sentence:Why it's wrong
exit status 255+Permission denied (publickey,...)is sshd rejecting the host agent before any command ran — the setup key was never presented andnetbirdwas never reached. Naming "the setup key was refused, or netbird is absent" for an ssh AUTH refusal is a masked/mis-attributed cause (ADR 0100 asks for an honest per-stage sentence). #1200's real defect (no enroll-trust key minted) was hidden behind this line for the whole drive.Note: with #1200's mint fix landed, this exact refusal should no longer occur on a healthy path — but the error text still mis-describes any future ssh-layer refusal (wrong key, wrong port, guest sshd down), so the honest-sentence fix stands on its own.
Suggested shape
Distinguish the ssh transport/auth failure (exit 255 /
Permission denied/Connection refused) from a genuinenetbird-mesh upcommand failure (a non-255 exit after ssh authenticated), and give each its own sentence. Reachable two-way (an error-classification + message change, revertible + contract-test-provable — the manager's ssh invocation is already asserted in the contract tests).Advances #1153.
Agent Brief
Category: bug
Summary:
GuestMeshJoinwraps every failure of the guestnetbird-mesh upSSH invocation with the single sentence "the setup key was refused, or netbird is absent from the guest image", even when the failure is an ssh transport/auth refusal (exit 255 /Permission denied/Connection refused) where no command ran and neither the setup key nor netbird was ever reached — a masked/mis-attributed cause (ADR 0100).Current behavior:
The VM-mode land-time mesh join (
Manager.GuestMeshJoin, ADR 0223) runsnetbird-mesh upon the guest over ssh and wraps any error with one fixed message blaming a refused setup key or an absent netbird. When the ssh layer itself rejects the host agent (exit status 255 withPermission denied (publickey,...), orConnection refused), no command executed on the guest — so blaming the setup key or netbird is wrong. In drive20260903T204213Z(#1200) this line hid the real defect (no enroll-trust key minted) for the whole drive.Desired behavior:
Distinguish the two failure classes and give each its own honest sentence:
Permission denied/Connection refused(host agent rejected before any command ran): the message describes an ssh transport/auth refusal (wrong key, wrong port, guest sshd down), not a setup-key or netbird problem.netbird-mesh upran but exited non-zero (a non-255 exit): the message may name the setup-key-refused / netbird-absent cause as before.The underlying error and trimmed guest output remain included in both cases.
Key interfaces:
Manager.GuestMeshJoin(in the vm manager) — classify the error returned by its ssh invocation ofnetbird-mesh upinto transport/auth vs command failure, and emit the matching sentence. Classification should key off the ssh exit status (255) and/or the recognizable ssh refusal strings, not off netbird semantics.Acceptance criteria:
Permission deniedproduces a message describing an ssh transport/auth refusal and does not claim the setup key was refused or netbird is absent.Connection refusedssh failure is treated as the transport/auth class.netbird-mesh upcommand failure (ssh authenticated, command exited non-zero) still produces the setup-key/netbird sentence.Out of scope:
Advances #1153. Ruled
ready-for-agent(no ADR-0174 residue): an error-classification + message change, revertible by a later commit and provable by the existing vm-manager contract test — a two-way door with no one-way-door surface. VerifiedGuestMeshJoinand its fixed error line exist in the vm manager, and thatinternal/vm/manager_test.goalready asserts the ssh invocation.swarm-claim host=matou-dev-server-01 run=17388
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=17388
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=17388
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=17398
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=17402
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=48e93cb2da61 run=17402
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1202 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
node node-req-0003 has no deploy target(drive 20260903T223815Z) #1206