founding: the CGNAT pre-check measures the operator's connection, not the gateway's #326
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#326
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?
RunPreCheck(internal/founding/access.go:297-316) callsresolver.PreCheck, whose production implementation reflects the connection the wizard is running on offmyip.opendns.comvia208.67.222.222:53(internal/dns/resolver.go:119-138,:159-178), then blocks on RFC 6598100.64.0.0/10.On the self-hosted path the wizard runs on the operator's laptop. The verdict is therefore only correct when the laptop and the intended gateway share a connection. An operator running the wizard on a phone hotspot, at work, or over a VPN gets a verdict about the wrong network — in either direction:
ADR 0026's reasoning ("the CGNAT pre-check runs before the operator touches any router config") is sound; the measurement is taken from the wrong place.
Definition of done
The pre-check states which connection it measured, or measures the gateway's. Note the ordering constraint: on the self-hosted path no gateway exists yet at S4, which is why the laptop was used — so this likely needs a design answer, not just a code fix.
Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in
docs/research/2026-08-07-home-gateway-reachability-scope.md.Verified:
RunPreCheckconfirmed to callresolver.PreCheck, whose production implementation resolves the public IP of whatever connection the process making the DNS query is running on (via an external resolver) and blocks on the RFC 6598 CGNAT range. Confirmed this runs at S4, before any gateway machine exists on the self-hosted path — there's no gateway to measure yet at that point in the sequence. Claim holds.Routing to ready-for-human, not ready-for-agent: the ticket names its own ordering constraint as the blocker — "on the self-hosted path no gateway exists yet at S4, which is why the laptop was used." Any fix has to answer what the pre-check should measure when the thing it's meant to characterize doesn't exist yet: state the caveat and let a false pass/fail stand (a UX/copy decision about how much to trust an unverified claim), defer the real check to a later step once a gateway exists (a sequencing change to the founding state machine, potentially moving where ADR 0026's guarantee gets enforced), or something else entirely. Each is a different shape of fix with different consequences for ADR 0026's guarantee, not a bug an agent can close by picking one silently. Recommend: rule on whether the pre-check should be deferred to a step where a gateway exists, or stay early with explicit uncertainty in its copy — then this can be re-filed as an agent brief.
Ruled by Ben 2026-08-08 (decision sweep) → DDR 0139 + S4b wireframe (
1716193, on main): label the measurement, then ask. S4b states it tested this device's connection (data-field="measured-connection") and asks whether the community machine will use the same one (data-action="same-connection-yes"/"same-connection-no"). Yes binds the verdict as today; No downgrades todata-status="verdict-unknown"— founding proceeds with a caution to verify where the machine will live. Cures the false fail too. →ready-for-agent.Implemented per DDR 0139 (Ben's ruling in-thread): S4b names the connection it measured, then asks — no confident verdict about the wrong network.
Seam (
internal/founding) — measurement split from choice:RunPreChecknow measures this device's connection only (records nothing, does not advance).ConfirmSelfHosted(sameConnection bool)records the self-hosted Access and advances to Address:truebinds the verdict (as before),falserecords a verdict-unknown caution and proceeds anyway — curing the false fail. Wired as stdio opconfirm-self-hosted.Screen (
app, S4b, wireframep1-s4b-connection-pre-check.htmlcontract):data-field="measured-connection"states we tested this device's line, then asks "Will the community machine use this same internet connection?" (data-action="same-connection-yes"/"same-connection-no") before any verdict shows.data-status="pre-check-pass") → Continue to Address; CGNAT (data-status="pre-check-cgnat") → blocked, choose a different option.data-status="verdict-unknown"caution → Continue to Address (cures both false pass and false fail).Tests: Go seam (measure-only; Yes-binds-pass; CGNAT-measurement-records-nothing; different-connection-proceeds-with-caution) + app component tests over the wireframe's data-* contract. gofmt/vet/golangci-lint, vue-tsc + eslint clean; whole-tree
go test ./...green (push gate).Commit
6720321onorigin/main. Real measurement from the gateway's own connection, once one exists, stays future work for the reachability arcs (per DDR 0139).