connect-before-check: a service device (helper) is held to the GATEWAY's "Visitors can reach it" check — a fail blocks a machine nobody on the internet ever dials (DDR 0240 decision 4) #1586
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1586
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?
What is wrong
CheckDevice(internal/founding/connectcheck.go:266) runs the same four pre-checks on every device, and "Visitors can reach it" is one a fail on which blocks. But inbound 80/443 from the internet is the gateway's job — it is the front door. A service device (helper role) is reached over the mesh, by the gateway; nobody on the internet ever dials it. A perfectly good helper on a home network is therefore blocked from carrying services for a requirement it does not have — or, when it reported no address, waved through on a "couldn't check" warn that means nothing for its role.The check set never looks at the role:
deviceFloor(device)picks the helper floor for memory/disk, but the visitors probe runs unconditionally.This is a design-level drift, not just code: DDR 0240 decision 4 lists one check set, decision 7 rules "one step wherever a device is chosen", and the wireframe
docs/ux/wireframes/p2-device-add-cli/p2-s1c-connect-and-check.html:50drawsdata-check="visitors"for an added machine. The same set is mirrored in the control panel's device-add dialog (internal/controlapi/enroll_connect.go,dashboard/src/components/device-add/ConnectScreen.vue), where every device added is a helper or member device, never the gateway.What a helper actually needs
That the gateway can reach it over the mesh and that it can reach the gateway — which the connect leg itself already demonstrates on a dial-in (the machine called in), and which enrollment proves for real when the mesh comes up.
Proposed default ruling (two-way door, ADR 0174)
Amend DDR 0240 decision 4: the visitors check belongs to the gateway only. For an added machine the check set is: the machine answers / enough memory / enough disk. "One step, one form" (decision 7) stands — it is the same step with the role's own checks, exactly as the floors are already the role's own.
Acceptance criteria
p2-s1c-connect-and-check.htmland founding's Add-a-device wireframe drop the visitors row for an added machine.CheckDevicewith a non-emptydeviceruns no outside-in probe and returns novisitorscheck; the gateway's set is unchanged.ConnectScreen.vuematch; the dashboard fake anddeviceAddConnect.test.tsfollow.Why session, not swarm
A DDR amendment and wireframe edits are design-tier work (
ready-for-session).Siblings from the same review (2026-09-18): #1585 (the check probes the private NIC address) and #1587 (the probe's vantage is the operator's own computer).
Close-report — landed, seam-proven (Ruled by agent under ADR 0174 — veto anytime).
The visitors check now belongs to the gateway only. Inbound 80/443 from the internet is the gateway's job (the front door); a service device (helper role) is reached over the mesh, by the gateway — nobody on the internet ever dials it — so holding a helper to a CGNAT/reachability requirement was the defect.
What landed (commit
065fe5e6):deviceFlooralready picks the helper floor.p2-s1c-connect-and-check.htmldrops thevisitorsrow — this is the shared added-machine step founding's Add-a-device dialog uses (DDR 0240 decision 7, "one step, one form"), so the drop covers both surfaces; the gateway's own stepp1-s4d-connect-the-gateway.htmlkeeps the row.founding.CheckDevice. With a non-emptydeviceit runs no outside-in probe and returns novisitorscheck (set = answers · memory · disk). The gateway's set (device == "") is byte-for-byte unchanged (answers · visitors · memory · disk).internal/controlapi/enroll_connect.go) and both renderers (ConnectScreen.vue,FoundingConnectDevice.vue) already draw whatever set the connector returns — they follow with no code change. The dashboard fake (tests/fakes/deviceAdd.ts) +deviceAddConnect.test.tsmirror the role-aware set, and thecheckDeviceseam doc (src/lib/deviceAdd.ts) records it.TestHandle_CheckDevice_HelperSkipsVisitorsProbe: a helper dials in from a private/CGNAT address (192.168.1.50/24), passes its pre-checks, carries novisitorscheck, and the reachability fake records zero probes for it. The gateway'sTestHandle_CheckDevice_MeasuresConnectedDevice(probe runs, CGNAT blocks) is held unchanged. New dashboard test proves a named helper carries novisitorsrow even withcgnatset.Proof:
go build ./...,go vet ./internal/founding, gofmt clean; fullgo test ./internal/founding ./internal/controlapi(uncached) green; full dashboard vitest 1706 passed;vue-tsc+eslintgreen (the push pre-hook raneslint .and passed).Two-way door: revertible code + a DDR amendment, proven by tests — no one-way residue. advances #1586.