own-VPS supply/fleet/enrolment stay wired to LoopbackTarget — SSH goes to the workstation, not the droplet #436
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.
Blocks
Reference
Matou/idss#436
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?
Failure
Drive
20260811T145107Z(droplet journey, own-VPS) never reached the leg registry —artifacts/legs.jsonis[], so the reporter synthesized the genericwizardred. The REAL failure is instate/founding-state.json(mirrored inlogs/founding-state.log:131-137): the journey ran clean through connect/point/seed/enroll-configure/enroll-activate, then went red onsupply:state/founding-state.json'sdraft.accessconfirms the operator's real box is209.38.85.200— the supply leg tried127.0.0.1instead, which on the rehearsal workstation is the workstation's own sshd, so any key is refused.Root cause
app/helper/cmd/helper/wiring_prod.go:378-382wiresguest-supply(and identicallychallenge-sourceat :360-365,fleetat :383-391,enrolmentat :392-403) withfleetwire.LoopbackTarget()unconditionally, at process-start wiring time. That's correct for the private path (a local qemu guest reached over a loopback SSH forward) but wrong for the own-VPS path, which must land on the operator's real box.The code's own comments say this should already be fixed:
wiring_prod.go:377— "the private path is the loopback target (ADR 0126); the own-VPS carrier (T2) passes the remote one" — andinternal/founding/ownvpspath.go:135-139— "The app helper's fleetwire.Supply is wired with the RemoteTarget posture for the same box, so the two agree on the destination." Neither is true in the actual wiring: all four ports are still hardcoded toLoopbackTarget().This is a second-order bug behind the one #432 (commit
e7a21d7) just fixed. #432's own commit message describes the SAME symptom (root@127.0.0.1: Permission denied (publickey)) but with an additionalIdentity file ... not accessibleclause — #432 fixed the missing guest-trust key. This run's error has no missing-identity clause, confirming the identity now exists and is baked into the box'saccess.nix, but the destination host is still wrong.What plugging it needs
internal/fleetwire.Supply(andFleet/Enrolment/ChallengeSource) fix theirTargetat construction (internal/fleetwire/supply.go:43-48) rather than accepting one per call, sowiring_prod.gocannot select loopback vs. remote per active journey path — the operator's IP is only known once the wizard runs, long after these ports are wired.The existing pattern to follow is
internal/fleetwire/carrier.go'sOwnVPSCarrier.Connect(ctx, ip): it takes the IP as a call-time argument and buildsRemoteTarget(ip, cfg.KnownHosts)per call, rather than baking a target in at wiring time.GuestSupply.Seed/Fleet/Enrolment/ChallengeSource's founding-package interfaces would need the same shape (an IP or Target argument at call time, threaded from wherever the own-VPS path holds the connected box's address —draft.access.ipperfounding-state.json), withinternal/founding/ownvpspath.go:302(and the equivalent fleet/enrolment/pair call sites) passing it through, andwiring_prod.goupdated to stop hardcodingLoopbackTarget()for all four ports.This spans an interface-signature change across
internal/founding,internal/fleetwire, andapp/helper/cmd/helper/wiring_prod.go/wiring_dev.go, plus new plumbing to carry the box's IP from the connect leg through to four call sites — not a mechanical one-line fix, so filing rather than self-fixing.Suspected layer
internal/fleetwire(Target construction/lifetime) +internal/founding(own-VPS orchestrator call sites) +app/helper/cmd/helper(production wiring).drive
20260811T145107Zred atwizard:drive red at wizard — the wizard died before any leg ranevidence:
test-results/…/20260811T145107Z/on matou-workstation (legs.json, droplet-journal.txt, trace)Done this iteration — the reproduced
supplyred is fixed (commit8dabf03, onmain)The
supplyleg now lands on the operator's real box, not the workstation's loopback sshd:founding.GuestSupply.Seedtakes the destination host per call —Seed(ctx, host, sshPort). The own-VPS worker threadsdraft.access.ip(internal/founding/ownvpspath.go); the private path passes""(byte-identical loopback, ADR 0126,internal/founding/privatepath.go).fleetwire.SupplybuildsRemoteTarget(host, ownVPSKnownHosts)when a host is named (accept-new + pinned own-VPS known-hosts, ADR 0152), otherwise the loopback default.NewSupplygains the own-VPS known-hosts path;wiring_prod.gopassesownVPSKnownHostsPath().FakeSupplynow recordsSeededHosts, so the seam catches a wrong destination (the old fake only recorded the port, which is why this hid behind #432).This is the second-order bug behind #432: the guest-trust key now exists and is baked onto the box, but the destination host was still
127.0.0.1. New seam tests:TestSupplySeed_OwnVPSHostDrivesTheRealBox(fleetwire) + the own-VPS AC-1supply.SeededHostsassertion.go build ./...,go vet ./...and the full pre-push suite are green.Handed back for a decision — the other three ports need more than a Target swap
The issue's framing assumes threading an IP/Target fixes
Fleet/Enrolment/ChallengeSourcetoo, but that is not sufficient for them, so I did not churn their signatures:Fleet/Enrolmentdo not just SSH — they poll the gateway over the loopback SSH forward:Fleet.pollUntilhitshttp://127.0.0.1:<APIPort>andEnrolment.liveIDPbuilds a kanidm client againsthttps://localhost:<KanidmPort>, and both resolve their ports vianewGuestVM().SSHPort/APIPort/KanidmPort— the private VM's forwards, which do not exist on an own-VPS drive. The gateway binds kanidm/control-plane on loopback on the box (publicKanidmLoopbackPort=8443,gateURL=127.0.0.1:8080), so they are not reachable on the public IP either. Making these work on own-VPS needs SSH-tunnel plumbing to the box (a larger, separate change), not a destination host.ChallengeSourceis not reached on the own-VPS founding path at all — the own-VPS point leg writes the A + wildcard alone (pointOwnVPSNamepassesfulldomain="") and the gateway heartbeat re-points the challenge later (ADR 0136).These legs are downstream of
supply/pair/deployand have never been reached on a real own-VPS drive. Recommendation: split theFleet/Enrolmentown-VPS work into its own ticket scoped as "stand up an SSH forward to the own-VPS box so the guest-facing HTTP/kanidm polls resolve" — the next own-VPS drive that gets pastsupplywill red there with concrete evidence. Re-addready-for-agentif you'd rather I attempt that tunnel plumbing directly.Ruled (Ben): supply half delivered by
8dabf03— closing. The Fleet/Enrolment forward plumbing is split to its own ticket (#437, ready-for-agent, wired to #378) scoped to preserve the 127.0.0.1 contract via -L forwards over the carrier connection, per this hand-back's own analysis. Thanks for the clean split — the SeededHosts fake upgrade is exactly the class-closer.