rehearsal drive red at ports-honest #609

Closed
opened 2026-08-20 02:28:55 +00:00 by matou-build-agent · 1 comment

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out)

drive 20260820T021653Z red at ports-honest: `mexpect(mmlocatormm).mtoBeVisiblem(mm)m failed

Locator: locator('[data-port="N"][data-status="dropped"]')
Expected: visible
Timeout: Nms
Error: element(s) not found

Call log:
m - Expect "toBeVisible" with timeout Nmsm
m - waiting for locator('[data-port="N"][data-status="dropped"]')mevidence:test-results/…/20260820T021653Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)

(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out) drive `20260820T021653Z` red at `ports-honest`: `mexpect(mmlocatormm).mtoBeVisiblem(mm)m failed Locator: locator('[data-port="N"][data-status="dropped"]') Expected: visible Timeout: Nms Error: element(s) not found Call log: m - Expect "toBeVisible" with timeout Nmsm m - waiting for locator('[data-port="N"][data-status="dropped"]')m` evidence: `test-results/…/20260820T021653Z/` on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596) <!-- rehearsal-sig: 89cf86e7639e -->
Author
Member

Diagnosed off the live evidence at /home/dev/swarm/Matou/ourcloud/test-results/drive-selfhosted/20260820T021653Z (matou-workstation) — artifacts/verdict.json, artifacts/legs.json, state/founding-state.json, artifacts/journey.selfhosted-.../error-context.md.

Not a #608 regression. #608's fix (landed 042d515, 02:14:14) made the reachability auto-probe reactive; this drive (started 02:18:02, after the fix) proves it worked — state/founding-state.json's standup.reach is populated (reachable: false, detail: "There's no gateway address to probe from outside yet.", name_wired: false), not null the way #608's own drive (20260820T012307Z) left it. The probe ran; it just had nothing to dial.

Root cause. internal/reachability/prober.go:142-151 honestly refuses to probe an empty IP. st.GatewayIP (internal/founding/standup.go, knownGatewayIP) only ever had two sources: the Access choice's known IP (empty for self-hosted — the whole point) and the pair probe's NetworkFacts.Address — which internal/hostprobe.Prober.Network never fills for a DHCP host (spike #12 §6 explicitly punts address capture to the full-install path). So st.GatewayIP has been "" for every self-hosted relay-carrier founding, always — this drive is the first to reach S10 far enough (thanks to #608) to expose it honestly instead of hanging.

Fix landed: ce94770 — knownGatewayIP falls back, self-hosted only, to Orchestrator.selfHostedBoxIP (#594's WithSelfHostedBoxAddress, read from the drive-only OC_E2E_DROPLET_IP env — "the drive greens without a UX change" per #594's own ADR 0174 ruling). This is a value the app already holds (to open the SSH relay forward) and is entirely separate from Takeover.Network, which still builds off the box's own probe alone — the takeover's static-vs-DHCP config choice is unaffected, proven by the new test's explicit assertion.

Considered and rejected: reusing internal/dns.PublicIP (ADR 0136's OpenDNS reflection, already proven for the post-founding address heartbeat, #330) to fill the probe's own NetworkFacts.Address instead. That field also feeds clan.BuildNodeConfig's STATIC takeover network config (MatchMAC, Gateway, CIDR Address together) — a bare reflected IP with no CIDR/gateway/MAC would bake a broken static config (empty MatchMAC, no default route) and could brick a real self-hosted takeover on reboot. That's a genuine design question (how to safely learn a real operator's box address without touching the takeover contract) already flagged open in docs/research/2026-08-07-home-gateway-reachability-scope.md §4 item 4 — correctly out of scope for a two-way-door session fix, and NOT needed for this ticket's actual failure (the drive's box address is already known via the carrier).

Proof: internal/founding/selfhostedcarrier_test.go's new TestSelfHostedRelay_GatewayIPFallsBackToCarrierAddressWhenBoxReportsNone — scripts the box's probe reporting DNS only (the real hostprobe shape), reds on main, greens on the fix; asserts GatewayIP takes the carrier's address AND Takeover.Network.Address stays empty. go build/go vet/go test ./.../gofmt/golangci-lint (via nix develop) green tree-wide. The live droplet re-run is the downstream rehearsal-183 proof (same posture as #608's own residual).

Secondary finding, filed separately (not fixed here): this ticket's own body was unreadable — [Nm ANSI garbage, port/timeout redacted to N — because .sandcastle/rehearsal-report.sh runs the dedup-signature fold (normalize_error_line) over the human-facing evidence line, contradicting its own header comment. Filed as #610 (bug, ready-for-session) rather than fixed here: rehearsal-report.sh/heal-lib.sh are vendored byte-identical from Matou/dev-factory (ADR 0180), and dev-factory's main has drifted from this repo's pinned FACTORY_REF in a way that would regress the #596 screenshot-attach feature if re-vendored blind — needs its own session to reconcile, not a blind port riding this ticket.

Ruled by agent under ADR 0174 — veto anytime: a two-way-door bug fix, provable by the new red-before-green unit test.

Diagnosed off the live evidence at `/home/dev/swarm/Matou/ourcloud/test-results/drive-selfhosted/20260820T021653Z` (matou-workstation) — `artifacts/verdict.json`, `artifacts/legs.json`, `state/founding-state.json`, `artifacts/journey.selfhosted-.../error-context.md`. **Not a #608 regression.** #608's fix (landed `042d515`, 02:14:14) made the reachability auto-probe reactive; this drive (started 02:18:02, after the fix) proves it worked — `state/founding-state.json`'s `standup.reach` is populated (`reachable: false, detail: "There's no gateway address to probe from outside yet.", name_wired: false`), not `null` the way #608's own drive (`20260820T012307Z`) left it. The probe ran; it just had nothing to dial. **Root cause.** `internal/reachability/prober.go:142-151` honestly refuses to probe an empty IP. `st.GatewayIP` (`internal/founding/standup.go`, `knownGatewayIP`) only ever had two sources: the Access choice's known IP (empty for self-hosted — the whole point) and the pair probe's `NetworkFacts.Address` — which `internal/hostprobe.Prober.Network` never fills for a DHCP host (spike #12 §6 explicitly punts address capture to the full-install path). So `st.GatewayIP` has been `""` for every self-hosted relay-carrier founding, always — this drive is the first to reach S10 far enough (thanks to #608) to expose it honestly instead of hanging. **Fix landed:** `ce94770` — `knownGatewayIP` falls back, self-hosted only, to `Orchestrator.selfHostedBoxIP` (`#594`'s `WithSelfHostedBoxAddress`, read from the drive-only `OC_E2E_DROPLET_IP` env — "the drive greens without a UX change" per #594's own ADR 0174 ruling). This is a value the app already holds (to open the SSH relay forward) and is entirely separate from `Takeover.Network`, which still builds off the box's own probe alone — the takeover's static-vs-DHCP config choice is unaffected, proven by the new test's explicit assertion. **Considered and rejected:** reusing `internal/dns.PublicIP` (ADR 0136's OpenDNS reflection, already proven for the post-founding address heartbeat, #330) to fill the probe's own `NetworkFacts.Address` instead. That field also feeds `clan.BuildNodeConfig`'s STATIC takeover network config (`MatchMAC`, `Gateway`, CIDR `Address` together) — a bare reflected IP with no CIDR/gateway/MAC would bake a broken static config (empty `MatchMAC`, no default route) and could brick a real self-hosted takeover on reboot. That's a genuine design question (how to safely learn a real operator's box address without touching the takeover contract) already flagged open in `docs/research/2026-08-07-home-gateway-reachability-scope.md` §4 item 4 — correctly out of scope for a two-way-door session fix, and NOT needed for this ticket's actual failure (the drive's box address is already known via the carrier). **Proof:** `internal/founding/selfhostedcarrier_test.go`'s new `TestSelfHostedRelay_GatewayIPFallsBackToCarrierAddressWhenBoxReportsNone` — scripts the box's probe reporting DNS only (the real `hostprobe` shape), reds on `main`, greens on the fix; asserts `GatewayIP` takes the carrier's address AND `Takeover.Network.Address` stays empty. `go build`/`go vet`/`go test ./...`/`gofmt`/`golangci-lint` (via `nix develop`) green tree-wide. The live droplet re-run is the downstream rehearsal-183 proof (same posture as #608's own residual). **Secondary finding, filed separately (not fixed here):** this ticket's own body was unreadable — `[Nm` ANSI garbage, port/timeout redacted to `N` — because `.sandcastle/rehearsal-report.sh` runs the dedup-signature fold (`normalize_error_line`) over the human-facing evidence line, contradicting its own header comment. Filed as #610 (`bug`, `ready-for-session`) rather than fixed here: `rehearsal-report.sh`/`heal-lib.sh` are vendored byte-identical from `Matou/dev-factory` (ADR 0180), and dev-factory's `main` has drifted from this repo's pinned `FACTORY_REF` in a way that would regress the #596 screenshot-attach feature if re-vendored blind — needs its own session to reconcile, not a blind port riding this ticket. Ruled by agent under ADR 0174 — veto anytime: a two-way-door bug fix, provable by the new red-before-green unit test.
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#609
No description provided.