rehearsal drive red at deploy-takeover #630
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.
Blocks
Reference
Matou/idss#630
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?
(headless diagnosis unparseable — raw stdout saved to logs/reporter-claude.out)
drive
20260821T030832Zred atdeploy-takeover:expect(locator).toBeVisible() failed Locator: locator('[data-status="deploy-live"]').or(locator('[data-status="hand-off"]')).or(locator('[data-status="deploy-failed"]')).first() Expected: visible Timeevidence:
test-results/…/20260821T030832Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)Ruled by agent under ADR 0174 — veto anytime.
Diagnosed and fixed as a two-way-door code change (a Go source fix in
internal/hostprobe, revertible by commit, proven by new unit tests + a full greengo build/go vet/go test ./...). No one-way-door touched: no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend.Root cause:
internal/hostprobe.Prober.Network— the only productionjoin.Prober, so the sole facts source for a self-hosted full install — was a stub left from spike #12's original scope cut (#183leg B·2), always returning the zero address/gateway/MAC regardless of host.enrollment.go'srenderNetworkdbakes those straight into a MAC-matched networkd config, and its own comment already named the consequence: "a DHCP-only config boots a fresh cloud host unreachable." The sibling own-VPS carrier (fleetwire/carrier.go) captures these facts for real over SSH and fails loud if any are missing; self-hosted had no equivalent — so drive20260821T030832Z's droplet went dark on SSH after the takeover reboot (GOTCHAS #6/#11/#12 shape) even though its rendered config already carried every one of those prior fixes.Fixed in
353a3e03:Prober.Networknow reads the host's real default route (/proc/net/route, parsed directly — the agent runs ON the host, no SSH needed) and that interface's address/MAC (net.InterfaceByName), failing loud and naming what's missing exactly like the carrier already does, instead of silently shipping zeros. A prior test had codified the zero-facts stub as the correct contract; replaced withTestParse_DefaultRoute/TestParse_DefaultRouteNone,TestNetwork_ReportsRealAddressGatewayMAC,TestNetwork_FailsLoudWithNoDefaultRoute,TestNetwork_FailsLoudWhenInterfaceFactsUnreadable. GOTCHAS #45 appended; STATUS.md updated in the same commit.NOT re-proved by a fresh live drive this session — diagnosis worked from the one red drive's evidence only (the reporter's own headless diagnosis session failed,
OAuth session expired, the same gap #628 hit); the nextselfhostedrehearsal that reachesdeploy-takeoveris the live proof.Close report.
What landed: commit
353a3e03("sandcastle: #630 — self-hosted full-install never captured its own network facts"), pushed toorigin/main.internal/hostprobe/prober.go:Networknow reads the real default route + interface address/MAC and fails loud naming what's missing, instead of always returning zero address/gateway/MAC.internal/hostprobe/sources_linux.go: wiresDefaultRoute(/proc/net/routeparse) andInterfaceAddress(net.InterfaceByName) real sources.internal/hostprobe/sources_other.go: non-Linux stays honestly unbuilt (v1 device end is Linux-only, ADR 0056).internal/hostprobe/parse_test.go,prober_test.go: new red-then-green coverage (TestParse_DefaultRoute,TestParse_DefaultRouteNone,TestNetwork_ReportsRealAddressGatewayMAC,TestNetwork_FailsLoudWithNoDefaultRoute,TestNetwork_FailsLoudWhenInterfaceFactsUnreadable); the old test that asserted always-zero facts is gone — that assertion WAS the bug.docs/GOTCHAS.md#45 andSTATUS.mdupdated in the same commit.Proof: full
go build ./...,go vet ./...,go test ./...green (every package, not justinternal/hostprobe). Not re-proved by a fresh live drive — advances #630, the nextselfhostedrehearsal reachingdeploy-takeoveris the live proof, same as the #628/#629 precedent this session's diagnosis followed.Separately, unrelated to this fix: this ticket's own body came through as raw stdout because the reporter's headless diagnosis session hit
OAuth session expired— worth a look if it recurs (matches #628's report of the same failure), not filed separately here since it's out of this ticket's scope.Head-start (evidence
test-results/drive-selfhosted/20260821T030832Z, tree+helper built at6710a0b, pin6710a0b) — NOT the #626/#628 eval failure again: this time the deploy never started at all.deploy-live | hand-off | deploy-failed.state/founding-state.json:step: "deploying"but nodeploykey, and the last event isname-wiring: "rehearsal-b.idss.nz now points at 170.64.235.114". Compare the previous two drives (013253Z,015833Z): both loggeddeploy: "gateway deploy started over the established clan connection"(internal/founding/deploy.go:324) immediately after name-wiring and then failed inside the deploy. Here: 25 minutes of silence, no kexec/disko on the droplet (journal has 0 such lines).FoundingStandup.vueonDeploy()(auto whenstep==='deploying' && !deployfor self-hosted). What runs before the "started" event iscomposeSelfHostedGateway(selfhostedpath.go:154-), which since #626 callsSeedCommunity(L168) thenSecrets().EnsureOperator(L171) beforeEnroll. Prime suspect: one of those blocks —EnsureOperatorshellsclan secrets key generate/registerOperator(secrets.go:63-), and a clan CLI call waiting on a prompt (editor, passphrase, git identity,--no-sandboxconfirmation) would hang exactly like this with nothing logged. Drive015833Z(tree25c9cb5, also post-#626) did get past compose — so check what differs for this founding (fresh state dir? existing age key at the app-scoped path?adoptDefaultKey?). Second suspect: a Go panic in the deploy goroutine (nothing surfaces to the UI) — #629 (6710a0b) touchedadapter.go's readiness path;tail(res.Output)on a nilreswould do it, though that path should only run on a failed preflight.logs/helper.logis 0 bytes this drive (prior drives had the Electron GLX noise in it), so the helper's stderr — where a Go panic or a hanging clan invocation would show — was not captured.launch.ts:102wires__ocHelperLog; worth checking why it came up empty here before re-driving, or the next red will be just as blind. While there: the in-drive healer/reporterclaudecalls fail withOAuth session expiredon every drive since 00:32Z (manual reproductions all pass);d2…addslogs/claude-env.txtto the next run so that can be diagnosed alongside.Reproduce on the workstation: take this drive's state dir and run the compose path under
go test/a harness with a fake CLI that records the invocation sequence — the last recordedInvocationbefore silence names the hang.