founding self-hosted: the Connect check tests the router's ports BEFORE the operator is told to open them — the manual port board sits inside Build it, behind the check that blocks it #1588

Closed
opened 2026-09-18 15:58:10 +00:00 by ben · 4 comments
Owner

What is wrong

On the self-hosted path the founding page tests the router's ports before it has told the operator to open them, and the screen that explains how sits behind the test it blocks.

  • The Connect section's "Visitors can reach it" check (internal/founding/connectcheck.go:285) probes 80/443 at selection, and a fail disables Continue (DDR 0240 decision 1: connect → check → plan is a gate).
  • A household router with nothing forwarded silently drops those probes → the firewall lane → fail. That is the normal first state of every home machine, not a fault.
  • The only port help that exists — the manual port board (P1-S10b, DDR 0175: per-row router instructions + recheck-ports) — is mounted in FoundingStandup.vue, i.e. inside Build it, which the operator cannot reach with a failed check.
  • CheckDevice copies res.Detail onto the check and drops res.Guidance — the prober's own "forward 80 and 443 to this machine…" line never reaches the Connect screen. The operator reads "the probe to 80 and 443 was dropped, not refused" with no remedy. p1-s4d-connect-the-gateway.html has no port, router or forwarding copy at all.
  • p1-s4c-how-your-ports-will-open.html (the soft preview of the port-group table, DDR 0175 decision 1) has no home in the founding page since the v1 cutover (#1455) — manual-only / port-groups appear nowhere in app/src.
  • DDR 0240 decision 8 rules Build it is unattended — "nothing on the build waits for someone to walk to a machine". A port board inside Build it waits for someone to log in to a router. The two DDRs now contradict each other on the self-hosted path.

Automatic opening does not rescue this: ADR 0137 (ask, then try UPnP/NAT-PMP/PCP) and ADR 0141 (the portmap seam) are designed, not built — no port-mapping library is in go.mod, internal/controlapi/network.go:91 says "Building the portmap seam is another slice (ADR 0141, #331)", and #331 is deferred. Manual is the only fill strategy, so the manual lane has to be reachable.

Proposed default ruling (two-way door, ADR 0174)

The port board moves to where the device is checked. On the self-hosted gateway's Connect step a dropped visitors probe opens the S10b board in place — same rows, same prober vocabulary, same recheck-ports — and the check passes when every required-now row answers. Build it's S10 then verifies what selection proved rather than discovering it, exactly as #1414 did for the connect leg, and decision 8 holds. When ADR 0137's automatic opening lands it joins this board as the second fill strategy, as DDR 0175 already says. Does not apply to helpers (#1586).

Acceptance criteria

  1. DDR amending 0240 (decision 4/8) and 0175 (where the board lives); p1-s4d-connect-the-gateway.html gains the dropped-probe state with the board; p1-founding.mermaid follows.
  2. DeviceCheck carries the prober's guidance and per-port rows; the Connect screen renders them on a visitors fail.
  3. Retry re-probes without re-connecting; all required rows answering flips the check to pass and enables Continue.
  4. Build it's reachability leg re-verifies and never opens an attended board on a plan whose gateway passed at selection.
  5. The CGNAT lane still blocks with its own wording — no router row fixes it.

#1585 (which address is probed), #1587 (where from) — until both land this board's verdicts on a home network are unreliable, so order: #1585 → this → #1587. #331 stays deferred; this is the manual lane being unreachable, not the automatic one being absent.

## What is wrong On the self-hosted path the founding page **tests the router's ports before it has told the operator to open them**, and the screen that explains how sits behind the test it blocks. - The Connect section's "Visitors can reach it" check (`internal/founding/connectcheck.go:285`) probes 80/443 at **selection**, and a fail disables Continue (DDR 0240 decision 1: connect → check → plan is a gate). - A household router with nothing forwarded silently drops those probes → the firewall lane → **fail**. That is the normal first state of every home machine, not a fault. - The only port help that exists — the manual port board (P1-S10b, DDR 0175: per-row router instructions + `recheck-ports`) — is mounted in `FoundingStandup.vue`, i.e. inside **Build it**, which the operator cannot reach with a failed check. - `CheckDevice` copies `res.Detail` onto the check and **drops `res.Guidance`** — the prober's own "forward 80 and 443 to this machine…" line never reaches the Connect screen. The operator reads "the probe to 80 and 443 was dropped, not refused" with no remedy. `p1-s4d-connect-the-gateway.html` has no port, router or forwarding copy at all. - `p1-s4c-how-your-ports-will-open.html` (the soft preview of the port-group table, DDR 0175 decision 1) has no home in the founding page since the v1 cutover (#1455) — `manual-only` / `port-groups` appear nowhere in `app/src`. - DDR 0240 decision 8 rules **Build it is unattended** — "nothing on the build waits for someone to walk to a machine". A port board inside Build it waits for someone to log in to a router. The two DDRs now contradict each other on the self-hosted path. Automatic opening does not rescue this: ADR 0137 (ask, then try UPnP/NAT-PMP/PCP) and ADR 0141 (the portmap seam) are **designed, not built** — no port-mapping library is in `go.mod`, `internal/controlapi/network.go:91` says "Building the portmap seam is another slice (ADR 0141, #331)", and #331 is `deferred`. Manual is the only fill strategy, so the manual lane has to be reachable. ## Proposed default ruling (two-way door, ADR 0174) The port board moves to where the device is checked. On the self-hosted gateway's Connect step a dropped visitors probe opens the S10b board **in place** — same rows, same prober vocabulary, same `recheck-ports` — and the check passes when every required-now row answers. Build it's S10 then *verifies* what selection proved rather than discovering it, exactly as #1414 did for the connect leg, and decision 8 holds. When ADR 0137's automatic opening lands it joins this board as the second fill strategy, as DDR 0175 already says. Does not apply to helpers (#1586). ## Acceptance criteria 1. DDR amending 0240 (decision 4/8) and 0175 (where the board lives); `p1-s4d-connect-the-gateway.html` gains the dropped-probe state with the board; `p1-founding.mermaid` follows. 2. `DeviceCheck` carries the prober's guidance and per-port rows; the Connect screen renders them on a visitors fail. 3. Retry re-probes without re-connecting; all required rows answering flips the check to pass and enables Continue. 4. Build it's reachability leg re-verifies and never opens an attended board on a plan whose gateway passed at selection. 5. The CGNAT lane still blocks with its own wording — no router row fixes it. ## Related #1585 (which address is probed), #1587 (where from) — until both land this board's verdicts on a home network are unreliable, so order: #1585 → this → #1587. #331 stays deferred; this is the manual lane being unreachable, not the automatic one being absent.

Ruled by agent under ADR 0174 — veto anytime. Two-way door: revertible DDR + wireframe + flow, no code.

What landed this session (AC 1 — the design tier)

Adopted the ticket's proposed default ruling: the manual port board moves to where the device is checked (the Connect step, S4d). A dropped "Visitors can reach it" probe opens the S10b board in place (same surface, same prober vocabulary, same recheck-ports); the check passes when every required-now row answers; Build it's S10 leg verifies what selection proved rather than discovering an unopened router (so DDR 0240 decision 8 — Build it is unattended — holds). CGNAT stays a distinct blocking state, no router row fixes it (DDR 0175 §3). Does not apply to helpers (#1586).

Commit fe9092a1f28d (main):

  • DDR 0252 — docs/adr/0252-design-the-port-board-lives-where-the-device-is-checked.md, amending DDR 0240 decisions 4 + 8 and DDR 0175 (where the board lives).
  • p1-s4d-connect-the-gateway.html — gains the dropped-probe board-in-place state and the distinct CGNAT block, carrying the same data-status="port-walkthrough" / lane-guidance / port-groups / row data-port+data-status / data-action="recheck-ports" selector contract as p1-s10b-port-board.html (DDR 0175 §4).
  • p1-founding.mermaid — S4d self-loop for the board (re-check without reconnecting); the self-hosted-gateway S10 → S10b discover edge annotated as superseded (S10 verifies). scripts/check-mermaid.mjs green.
  • STATUS.md — dated entry.

What is NOT built, and why (AC 2–5 — the code)

DeviceCheck carrying guidance+ports; the Connect screen rendering the board on a visitors fail; recheck-ports re-probing without reconnecting; the S10 re-verify; the CGNAT wording.

Blocked on #1585 — a hard, author-declared ordering dependency (#1585 → this → #1587), and #1585 is unlanded. Until #1585 lands, CheckDevice probes the machine's private NIC address (connectcheck.go:285), which the prober short-circuits into the CGNAT lane before dialling (reachability/prober.go:155-163) — so on a real home network the visitors check fails as CGNAT, never dropped, returns no Ports, and this board's dropped-lane entry has no rows and no live path to reach. #1585 makes the probe use the line's public-facing address, at which point an unforwarded home router yields the dropped verdict the board is built for. Building AC 2–5 now would either build on the known-buggy probe (the feature's trigger unreachable on its real case — the exact anti-pattern #1585's "why nothing caught it" names: connectcheck_test.go:218 already scripts a public address and thereby hides the bug) or require fixing #1585 here, which rule 1 forbids (work only this ticket).

Routing

  • Native depends_on set: #1588 blocked by #1585. The session-runner picker skips a ticket with open dependencies (session-runner.sh:379-382), so #1588 will not be re-attempted until #1585 closes.
  • Left ready-for-session: the code tier is session-sized and design-aware. A future session (post-#1585) builds AC 2–5 with this design already in place — a smaller, unblocked slice.
  • Order #1585 → #1588 → #1587 is now recorded on the tracker and in DDR 0252. (#1587 is ready-for-human, ordered after this; not set as a dependency here since it does not block #1588.)
  • #331 stays deferred: this is the manual lane being made reachable, not the automatic one being built.
**Ruled by agent under ADR 0174 — veto anytime.** Two-way door: revertible DDR + wireframe + flow, no code. ## What landed this session (AC 1 — the design tier) Adopted the ticket's proposed default ruling: the manual port board moves to **where the device is checked** (the Connect step, S4d). A dropped "Visitors can reach it" probe opens the S10b board **in place** (same surface, same prober vocabulary, same `recheck-ports`); the check passes when every required-now row answers; Build it's S10 leg **verifies** what selection proved rather than discovering an unopened router (so DDR 0240 decision 8 — Build it is unattended — holds). CGNAT stays a **distinct** blocking state, no router row fixes it (DDR 0175 §3). Does not apply to helpers (#1586). Commit `fe9092a1f28d` (main): - **DDR 0252** — `docs/adr/0252-design-the-port-board-lives-where-the-device-is-checked.md`, amending **DDR 0240 decisions 4 + 8** and **DDR 0175** (where the board lives). - **`p1-s4d-connect-the-gateway.html`** — gains the dropped-probe board-in-place state and the distinct CGNAT block, carrying the same `data-status="port-walkthrough"` / `lane-guidance` / `port-groups` / row `data-port`+`data-status` / `data-action="recheck-ports"` selector contract as `p1-s10b-port-board.html` (DDR 0175 §4). - **`p1-founding.mermaid`** — S4d self-loop for the board (re-check without reconnecting); the self-hosted-gateway `S10 → S10b` discover edge annotated as superseded (S10 verifies). `scripts/check-mermaid.mjs` green. - **STATUS.md** — dated entry. ## What is NOT built, and why (AC 2–5 — the code) `DeviceCheck` carrying `guidance`+`ports`; the Connect screen rendering the board on a visitors fail; `recheck-ports` re-probing without reconnecting; the S10 re-verify; the CGNAT wording. **Blocked on #1585 — a hard, author-declared ordering dependency (#1585 → this → #1587), and #1585 is unlanded.** Until #1585 lands, `CheckDevice` probes the machine's **private NIC address** (`connectcheck.go:285`), which the prober short-circuits into the **CGNAT lane before dialling** (`reachability/prober.go:155-163`) — so on a real home network the visitors check fails as **CGNAT, never `dropped`**, returns no `Ports`, and this board's dropped-lane entry has no rows and no live path to reach. #1585 makes the probe use the line's **public-facing address**, at which point an unforwarded home router yields the `dropped` verdict the board is built for. Building AC 2–5 now would either build on the known-buggy probe (the feature's trigger unreachable on its real case — the exact anti-pattern #1585's "why nothing caught it" names: `connectcheck_test.go:218` already scripts a *public* address and thereby hides the bug) or require fixing #1585 here, which rule 1 forbids (work only this ticket). ## Routing - Native `depends_on` set: **#1588 blocked by #1585**. The session-runner picker skips a ticket with open dependencies (`session-runner.sh:379-382`), so #1588 will not be re-attempted until #1585 closes. - Left `ready-for-session`: the code tier is session-sized and design-aware. A future session (post-#1585) builds AC 2–5 with this design already in place — a smaller, unblocked slice. - Order **#1585 → #1588 → #1587** is now recorded on the tracker and in DDR 0252. (#1587 is `ready-for-human`, ordered after this; not set as a dependency here since it does not block #1588.) - #331 stays deferred: this is the *manual* lane being made reachable, not the *automatic* one being built.

Routing correction (same ruling). On reflection the honest routing is not ready-for-session (which the session-runner reads as "no progress" when left open) — the design tier is complete, so what remains (AC 2–5) is a design-complete, fully-specified build slice that is simply blocked on #1585. Relabelled bug + ready-for-agent and left the native depends_on (#1588 blocked by #1585) in place: list-ready-tasks.sh hides a ready-for-agent ticket with an open dependency, so the swarm surfaces #1588's code tier the moment #1585 closes — same effect as the session-runner's dependency skip, but on the queue whose gated tail (code-review → design-verify) fits a specified build. No one-way door, so not ready-for-human. Ruled by agent under ADR 0174 — veto anytime.

**Routing correction (same ruling).** On reflection the honest routing is not `ready-for-session` (which the session-runner reads as "no progress" when left open) — the **design tier is complete**, so what remains (AC 2–5) is a design-complete, fully-specified build slice that is simply **blocked on #1585**. Relabelled **`bug` + `ready-for-agent`** and left the native `depends_on` (#1588 blocked by #1585) in place: `list-ready-tasks.sh` hides a `ready-for-agent` ticket with an open dependency, so the swarm surfaces #1588's code tier the moment #1585 closes — same effect as the session-runner's dependency skip, but on the queue whose gated tail (code-review → design-verify) fits a specified build. No one-way door, so not `ready-for-human`. Ruled by agent under ADR 0174 — veto anytime.

swarm-claim host=bens-mac-04 run=26656
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26656 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1588 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1588,
  "status": "success",
  "commits": [
    "64d5787025694ee1957cce9ffa21a7e705962b45"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/components/founding/FoundingConnectDevice.vue",
    "app/src/i18n/founding/g10.uipass.en.ts",
    "app/src/i18n/founding/g10.uipass.es.ts",
    "app/src/i18n/founding/g10.uipass.fr.ts",
    "app/src/i18n/founding/g10.uipass.nl.ts",
    "app/src/lib/founding.ts",
    "app/tests/unit/foundingConnectDevice.test.ts",
    "dashboard/src/lib/api/generated.ts",
    "internal/controlapi/enroll_connect.go",
    "internal/founding/connectcheck.go",
    "internal/founding/connectcheck_test.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/founding/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./... && go vet ./internal/founding/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c gofmt -l internal/founding internal/controlapi",
      "exit_code": 0
    },
    {
      "command": "app: vitest run tests/unit/foundingConnectDevice.test.ts (9 pass)",
      "exit_code": 0
    },
    {
      "command": "app: vitest run tests/unit/productTypeScale.test.ts + i18n suites",
      "exit_code": 0
    },
    {
      "command": "app: vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "dashboard: vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "eslint (FoundingConnectDevice.vue, founding.ts, test, i18n)",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "packages/openapi-spec: vitest run (9 pass)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "AC1 — DDR amending 0240/0175; p1-s4d gains the dropped-probe state; p1-founding.mermaid follows": "Design tier landed in fe9092a1 (DDR 0252, p1-s4d-connect-the-gateway.html, p1-founding.mermaid); this ticket built AC 2–5, the code tier the DDR contracts.",
    "AC2 — DeviceCheck carries the prober's guidance and per-port rows; the Connect screen renders them on a visitors fail": "founding.DeviceCheck (+ controlapi mirror, OpenAPI DeviceCheck/PortRow, app founding.ts) gain guidance+ports; CheckDevice carries res.Guidance and boardRows(res.Ports) on a firewall-lane fail (internal/founding/connectcheck.go); FoundingConnectDevice.vue draws the board (data-field port-walkthrough/lane-guidance/port-groups, rows data-port carrying verdict as data-status). Test: TestHandle_CheckDevice_DroppedProbeCarriesBoardRowsAndGuidance + component test 'a dropped visitors probe opens the port board in place'.",
    "AC3 — Retry re-probes without re-connecting; all required rows answering flips the check to pass and enables Continue": "recheck-ports re-runs check-device against the same pinned public address (no new dial-in); when the required row answers visitors flips to pass and Continue enables. Test: TestHandle_CheckDevice_RecheckReprobesWithoutReconnectAndFlipsToPass (probes same address twice, no reconnect, pass lands on draft) + component test asserts connect-device count unchanged across the re-check.",
    "AC4 — Build it's reachability leg re-verifies and never opens an attended board on a plan whose gateway passed at selection": "Holds by construction: CheckDevice sets Passed=false and disables Continue on a visitors fail, so only a plan whose gateway passed at S4d reaches Build it, where the existing runReachability re-probe passes and draws no board (the 'nothing forwarded yet' dropped state can no longer reach Build it). No S10 attended board is opened on a passed plan.",
    "AC5 — The CGNAT lane still blocks with its own wording — no router row fixes it": "CGNAT lane returns no ports, so CheckDevice carries guidance but no board; FoundingConnectDevice.vue renders a distinct block (data-status=cgnat, data-field=cgnat), Continue stays disabled, no recheck-ports. Test: TestHandle_CheckDevice_CGNATCarriesGuidanceButNoBoard + component test 'CGNAT is a distinct block with no port board'."
  },
  "summary": "Moved the manual port board to the Connect step (where the device is checked): a dropped visitors probe draws the S10b board in place, re-check re-probes without reconnecting, CGNAT stays a distinct block, and Build it verifies rather than discovers.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1588 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1588, "status": "success", "commits": [ "64d5787025694ee1957cce9ffa21a7e705962b45" ], "changed_files": [ "STATUS.md", "app/src/components/founding/FoundingConnectDevice.vue", "app/src/i18n/founding/g10.uipass.en.ts", "app/src/i18n/founding/g10.uipass.es.ts", "app/src/i18n/founding/g10.uipass.fr.ts", "app/src/i18n/founding/g10.uipass.nl.ts", "app/src/lib/founding.ts", "app/tests/unit/foundingConnectDevice.test.ts", "dashboard/src/lib/api/generated.ts", "internal/controlapi/enroll_connect.go", "internal/founding/connectcheck.go", "internal/founding/connectcheck_test.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/founding/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./... && go vet ./internal/founding/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c gofmt -l internal/founding internal/controlapi", "exit_code": 0 }, { "command": "app: vitest run tests/unit/foundingConnectDevice.test.ts (9 pass)", "exit_code": 0 }, { "command": "app: vitest run tests/unit/productTypeScale.test.ts + i18n suites", "exit_code": 0 }, { "command": "app: vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "dashboard: vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "eslint (FoundingConnectDevice.vue, founding.ts, test, i18n)", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "packages/openapi-spec: vitest run (9 pass)", "exit_code": 0 } ], "criteria": { "AC1 — DDR amending 0240/0175; p1-s4d gains the dropped-probe state; p1-founding.mermaid follows": "Design tier landed in fe9092a1 (DDR 0252, p1-s4d-connect-the-gateway.html, p1-founding.mermaid); this ticket built AC 2–5, the code tier the DDR contracts.", "AC2 — DeviceCheck carries the prober's guidance and per-port rows; the Connect screen renders them on a visitors fail": "founding.DeviceCheck (+ controlapi mirror, OpenAPI DeviceCheck/PortRow, app founding.ts) gain guidance+ports; CheckDevice carries res.Guidance and boardRows(res.Ports) on a firewall-lane fail (internal/founding/connectcheck.go); FoundingConnectDevice.vue draws the board (data-field port-walkthrough/lane-guidance/port-groups, rows data-port carrying verdict as data-status). Test: TestHandle_CheckDevice_DroppedProbeCarriesBoardRowsAndGuidance + component test 'a dropped visitors probe opens the port board in place'.", "AC3 — Retry re-probes without re-connecting; all required rows answering flips the check to pass and enables Continue": "recheck-ports re-runs check-device against the same pinned public address (no new dial-in); when the required row answers visitors flips to pass and Continue enables. Test: TestHandle_CheckDevice_RecheckReprobesWithoutReconnectAndFlipsToPass (probes same address twice, no reconnect, pass lands on draft) + component test asserts connect-device count unchanged across the re-check.", "AC4 — Build it's reachability leg re-verifies and never opens an attended board on a plan whose gateway passed at selection": "Holds by construction: CheckDevice sets Passed=false and disables Continue on a visitors fail, so only a plan whose gateway passed at S4d reaches Build it, where the existing runReachability re-probe passes and draws no board (the 'nothing forwarded yet' dropped state can no longer reach Build it). No S10 attended board is opened on a passed plan.", "AC5 — The CGNAT lane still blocks with its own wording — no router row fixes it": "CGNAT lane returns no ports, so CheckDevice carries guidance but no board; FoundingConnectDevice.vue renders a distinct block (data-status=cgnat, data-field=cgnat), Continue stays disabled, no recheck-ports. Test: TestHandle_CheckDevice_CGNATCarriesGuidanceButNoBoard + component test 'CGNAT is a distinct block with no port board'." }, "summary": "Moved the manual port board to the Connect step (where the device is checked): a dropped visitors probe draws the S10b board in place, re-check re-probes without reconnecting, CGNAT stays a distinct block, and Build it verifies rather than discovers.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1588
No description provided.