founding: real DNSResolver adapter — name wiring verified (P1-S10) #194

Closed
opened 2026-07-30 20:52:41 +00:00 by ben · 1 comment
Owner

Parent

Split out of #191 per the swarm's re-scoping investigation (Ben confirmed 2026-07-30). Engine-adapters close-out #183 needs founding's own-VPS lane (P1-S10 name wiring) real.

What to build

The real DNSResolver adapter behind founding's port (internal/founding/access.go — currently FakeResolver only): resolves the chosen Address and verifies the name points at the known gateway IP once it exists (P1-S10 "the name is wired up and DNS verified now the IP is known"). Honest verdicts for not-yet-propagated and points-elsewhere cases.

Acceptance criteria

  • Given a name wired to a lab droplet's IP (lab-dns), When verification runs, Then it passes via a real resolver — no fake in the path (ADR 0100)
  • Given a name that resolves elsewhere or not at all, When verification runs, Then the verdict is a legible failure (points-elsewhere / not-propagated), never a masked pass

Task manifest

task: founding:dns-resolver-adapter
implements_seam: "founding's DNSResolver port (spec #11, P1-S10) + ADR 0100"
interface: "the name-verification check founding's access step drives"
seam: "internal/founding access seam; provable with the lab-dns skill against a droplet"
acceptance:
  - given: a name pointed at a lab droplet; when: verification runs; then: real resolve + match verdicts with legible failure lanes
depends_on: []
out_of_scope: [Reachability (sibling ticket), the app packaging (#191), real-hardware journey (#183)]
needs_human_decision: []

Blocks

#183 — leg B·1 (found on the VPS: S10 name wiring).

## Parent Split out of #191 per the swarm's re-scoping investigation (Ben confirmed 2026-07-30). Engine-adapters close-out #183 needs founding's own-VPS lane (P1-S10 name wiring) real. ## What to build The real **DNSResolver** adapter behind founding's port (`internal/founding/access.go` — currently `FakeResolver` only): resolves the chosen Address and verifies the name points at the known gateway IP once it exists (P1-S10 "the name is wired up and DNS verified now the IP is known"). Honest verdicts for not-yet-propagated and points-elsewhere cases. ## Acceptance criteria - [ ] Given a name wired to a lab droplet's IP (lab-dns), When verification runs, Then it passes via a real resolver — no fake in the path (ADR 0100) - [ ] Given a name that resolves elsewhere or not at all, When verification runs, Then the verdict is a legible failure (points-elsewhere / not-propagated), never a masked pass ## Task manifest ```yaml task: founding:dns-resolver-adapter implements_seam: "founding's DNSResolver port (spec #11, P1-S10) + ADR 0100" interface: "the name-verification check founding's access step drives" seam: "internal/founding access seam; provable with the lab-dns skill against a droplet" acceptance: - given: a name pointed at a lab droplet; when: verification runs; then: real resolve + match verdicts with legible failure lanes depends_on: [] out_of_scope: [Reachability (sibling ticket), the app packaging (#191), real-hardware journey (#183)] needs_human_decision: [] ``` ## Blocks #183 — leg B·1 (found on the VPS: S10 name wiring).
Author
Owner

Done in 5c1f567 (on origin/main).

What shipped: internal/dns.Resolver is now the production founding.DNSResolver (ADR 0100), replacing the scripted FakeResolver in a shipped build.

  • AC1 — passes via a real resolver, no fake in the path: Resolve reads the chosen Address over the real system resolver (net.DefaultResolver) and verifies it points at the now-known gateway IP. New() wires only the real system resolver + a real public-address lookup — no fake, no nil.
  • AC2 — legible failure, never a masked pass: honest distinct verdict lanes — matches (Resolved), points-elsewhere (resolves, but to a different IP → not Resolved, names both IPs), not-propagated (no record → not Resolved). Also handles IP-not-yet-known (S5 poll) as resolved-on-presence with no match claim.

Port change: DNSResolver.Resolve(ctx, domain, gatewayIP) grew the gateway IP it verifies against; VerifyDomain (S5 poll) and wireName (S10) thread the now-known IP, the fake ignores it. PreCheck detects CGNAT from the connection's real public address (OpenDNS reflection).

Evidence:

  • internal/dns/resolver_test.go — all verdict lanes deterministically (injected lookups).
  • control-plane/cmd/smoke-dns + scripts/smoke-dns.sh — a real-DNS smoke driving the REAL resolver over real public DNS. Ran green here against a known name/IP: match PASS, points-elsewhere FAIL, not-propagated FAIL — no fake in the path. The lab-dns-pointed-droplet form of the smoke (scripts/smoke-dns.sh creates a clan-lab droplet, points clan-lab.matou.nz at it, drives the smoke) is the driver's arc-gating run — the lab-dns credentials (MATOU_LAB_DNS_HOSTNAME/_PASSWORD) are not provisioned in the swarm sandbox, so that exact leg is run by a driver.

Follow-on: wiring dns.New() into the helper's wiring_prod.go stays #191/the compose ticket's job — the DNSResolver seam still fails loud until then (ADR 0100). Blocks #183 leg B·1.

go build ./... / vet / gofmt + the full Go suite clean.

Done in 5c1f567 (on `origin/main`). **What shipped:** `internal/dns.Resolver` is now the production `founding.DNSResolver` (ADR 0100), replacing the scripted `FakeResolver` in a shipped build. - **AC1 — passes via a real resolver, no fake in the path:** `Resolve` reads the chosen Address over the real system resolver (`net.DefaultResolver`) and verifies it points at the now-known gateway IP. `New()` wires only the real system resolver + a real public-address lookup — no fake, no nil. - **AC2 — legible failure, never a masked pass:** honest distinct verdict lanes — **matches** (Resolved), **points-elsewhere** (resolves, but to a different IP → not Resolved, names both IPs), **not-propagated** (no record → not Resolved). Also handles IP-not-yet-known (S5 poll) as resolved-on-presence with no match claim. **Port change:** `DNSResolver.Resolve(ctx, domain, gatewayIP)` grew the gateway IP it verifies against; `VerifyDomain` (S5 poll) and `wireName` (S10) thread the now-known IP, the fake ignores it. `PreCheck` detects CGNAT from the connection's real public address (OpenDNS reflection). **Evidence:** - `internal/dns/resolver_test.go` — all verdict lanes deterministically (injected lookups). - `control-plane/cmd/smoke-dns` + `scripts/smoke-dns.sh` — a real-DNS smoke driving the REAL resolver over real public DNS. Ran green here against a known name/IP: `match` PASS, `points-elsewhere` FAIL, `not-propagated` FAIL — no fake in the path. The lab-dns-pointed-droplet form of the smoke (`scripts/smoke-dns.sh` creates a clan-lab droplet, points `clan-lab.matou.nz` at it, drives the smoke) is the driver's arc-gating run — the `lab-dns` credentials (`MATOU_LAB_DNS_HOSTNAME`/`_PASSWORD`) are not provisioned in the swarm sandbox, so that exact leg is run by a driver. **Follow-on:** wiring `dns.New()` into the helper's `wiring_prod.go` stays #191/the compose ticket's job — the DNSResolver seam still fails loud until then (ADR 0100). Blocks #183 leg B·1. `go build ./...` / vet / gofmt + the full Go suite clean.
ben closed this issue 2026-07-30 21:07:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#194
No description provided.