finish-leg ledger scp still hits "No such file or directory" on /var/lib/ourcloud after #441's tmpfiles fix landed (sig 404124947736 recurs a 3rd time) #442
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.
Blocks
Reference
Matou/idss#442
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?
Failure
Drive
20260811T195131Z(own-VPS, target droplet) went red at thesupply/finishleg, identical to two prior reds carrying the same signature404124947736:Evidence:
test-results/drive-droplet/20260811T195131Z/artifacts/legs.json(all legs green throughenroll-activate,supplyred with this exact text), same string in.../artifacts/journey.droplet-.../error-context.md.Why this is surprising
This is the THIRD time signature
404124947736has gone red, and the SECOND supposed fix for it:99393f9(sig404124947736, first heal) — added DDR 0162's finish row to the droplet e2e's own-VPS order. Did not touch the actual dir-creation defect.d765cf6(#441, landed 2026-08-11 19:29:13) — the durable, targeted fix:renderGatewayGuest(internal/clan/vmguest.go:262) now declaressystemd.tmpfiles.rules = [ "d /var/lib/ourcloud 0700 root root -" ]at boot, plusStateDirectoryMode = "0700"on the control-plane unit, specifically because the ledger scp precedes the unit's first start (which is what used to create the dir viaStateDirectory). Pinned byTestRenderGatewayGuest_LedgerDirExistsAtBoot(internal/clan/vmguest_test.go) — I re-ran this test on current HEAD (591374b) and it still passes, so the source fix is genuinely present in the checkout.20260811T195131Z, started ~22 minutes after #441 landed) hit the byte-identical scp failure anyway.What I ruled out
scripts/smoke-private-path.shrunspnpm --filter app build:electronandpnpm --filter app build:helper(not:dev) fresh on every drive (lines ~325-326), andapp/helper/cmd/helperis what importsinternal/clanand callsrenderGatewayGuest. The script's ownoc_payload_freshstaleness gate only guards the control-plane/dashboard payload components (built separately, ridden into the warm image) — that gate is irrelevant here since the render comes from the freshly-built helper, not the payload.enrollment.go'sbuild()(line 652) andcopy()(line 711) are explicitly best-effort accelerators — every failure there just falls through to the authoritativeverify()step (enrollment.go:788,clan machines update <node> --flake ... --target-host ...), which rebuilds/deploys the CURRENT flake content unconditionally every run. No hash/memoization exists in the Go code (store_count.go'splannedPathCount/missingOnTargetshell out tonixlive every call). The suspiciously fastenroll-build/enroll-copytimings inlegs.json(8ms/9ms) are a harness polling artifact, not evidence of a skip —app/tests/e2e/fixtures/journey.ts'slegVerdict/waitForLeg(lines 76-137) mark a leg done as soon ascurrentIdhas already moved past it, so a leg can read near-zero ms if the poll simply never landed while it was current.Suspected layer
Since
enroll-activate(theclan machines updatecall,enrollment.go:788) reported green BEFOREsupplyran, the gateway's NixOS system should already be on the generation carrying #441's tmpfiles rule by the time fleetwire's scp lands (internal/fleetwire/fleet.go:113SeedLedger, called frominternal/founding/seed.go:307). Yet the directory still doesn't exist. That points at NixOS/clan activation semantics I can't verify without a live box: whetherclan machines update's remote activation performs a genuineswitch(which should runsystemd-tmpfiles --createfor a brand-new/etc/tmpfiles.dentry immediately) versus something closer toboot(which would defer the new generation, including the tmpfiles rule, to the next reboot — and this journey never reboots the gateway again after enroll-activate). I cannot rule this in or out without droplet access.Evidence gap (separate, smaller defect worth fixing regardless)
test-results/drive-droplet/20260811T195131Z/logs/droplet-journal.txtshows the post-drive evidence gather ALSO failed:Host key verification failedfor134.199.156.13,Offending ED25519 key in /home/dev/.ssh/known_hosts:93.oc_droplet_evidence(scripts/lib/rehearsal-droplet.sh:81-89) runs a plainssh(default strict checking against the operator's real~/.ssh/known_hosts), unlikeoc_droplet_create's connectivity wait (lines 66, 74) which explicitly scrubs the entry (ssh-keygen -R) and uses-o StrictHostKeyChecking=accept-newbefore connecting. Since DO recycles droplet IPs across runs, evidence gather can collide with a stale key from an unrelated prior droplet at the same address and silently lose thejournalctl/ls -laR /var/lib/ourcloudcapture — exactly the evidence that would prove or disprove whether #441's fix actually took effect on THIS box. Fixingoc_droplet_evidenceto matchoc_droplet_create's host-key handling (scrub + accept-new) won't fix the red leg, but it's a one-line, low-risk fix that would let the NEXT red drive's evidence answer this question directly.What plugging the real defect needs
A droplet-side inspection a healer can't do blind: run the next drive with
REHEARSAL_KEEP_RED_DROPLET=1, and on red SSH into the kept box (scrub~/.ssh/known_hostsfirst) to checkls -la /etc/tmpfiles.d/+ the generated ourcloud entry's content,systemd-tmpfiles --create --dry-run,journalctl -u systemd-tmpfiles-setup, andreadlink -f /run/current-systemagainst the toplevelclan machines updatereported building. That will show whether the new generation with the tmpfiles rule is actually live, and if it is, why the directory still isn't there.Why I'm filing instead of self-fixing
#441 was small, certain-looking, and unit-tested — and it still didn't hold on a real droplet. I can't name a different exact defective line with the same confidence, and I have no droplet access here to verify any change against the real failure mode. Per the resisted-heal guidance, a third guess risks burning another paid droplet on the same wrong theory.
drive
20260811T195131Zred atsupply:journey leg "finish" went red: founding: hand over authority: founding: hand the ledger into the fleet: fleetwire: land the ledger on the gateway: fleetwire: scp: exit status N — scp: dest open "/va scp: failed to upload file /home/dev/swarm/Matou/ourcloud/test-results/drive-droplet/HTNZ/state/scratch/enroll.json to /var/lib/ourcloud/enroll.jsonevidence:
test-results/…/20260811T195131Z/on matou-workstation (legs.json, droplet-journal.txt, trace)Root cause found (manual trace of run 195131Z's captured flake) — #441's fix landed in the WRONG render for the own-VPS path, the same VM-vs-FullInstall divergence that bit #399 (hostPlatform), #410 (identity), #432 (trust key), #436 (loopback target):
d765cf6added thesystemd.tmpfiles.rulesd /var/lib/ourcloud 0700 root root -torenderGatewayGuest(internal/clan/vmguest.go), whose output isgateway-guest.nix(GatewayGuestFileName), written only atenrollment.go:403for the VM-mode gateway.state/clan-config/machines/gateway/containsconfiguration.nix, disko.nix, networking.nix, front-door.nix, acme-dns.nix, access.nix, platform.nix— no gateway-guest.nix. So the tmpfiles rule never reaches the droplet, and/var/lib/ourcloudis still absent when the finish-leg scp lands the ledger →scp: dest open "/var/lib/ourcloud/enroll.json": No such file or directory(3rd recurrence, sig 404124947736).Fix — put the rule where the own-VPS gateway carries it
The ledger's home must be declared in a render the FullInstall path emits. Options, cleanest first:
d /var/lib/ourcloud 0700 root root -tmpfiles rule into the entryconfiguration.nixrender (renderVMGuestBaseline, vmguest.go) — BOTH paths write it (enrollment.go:405and the own-VPS assembly), so the ledger dir exists on VM and droplet alike. This also lets #441's now-VM-only seam test cover both.ledger.nixmodule in the gateway machine dir, added toAttachGateway's import list (gateway_attach.go) so every gateway — VM or FullInstall — carries it.Keep #441's
StateDirectoryMode = "0700"pin on the control-plane unit (that part is correct and path-agnostic). Extend the seam test to assert the rule appears in the OWN-VPS gateway assembly, not just gateway-guest.nix — that assertion is what would have caught this.This remains the genuine last tooth: #440's honesty guard is proven (this run red-ed correctly at finish instead of a false green), so once the dir truly lands, the next drive completes the founding. Blocks #378.
Fixed in
3762a67(on origin/main).Followed ben's trace + option 2: the
d /var/lib/ourcloud 0700 root root -tmpfiles rule was inrenderGatewayGuest(vmguest.go), the VM-mode render whose outputgateway-guest.nixthe own-VPS full-install path never bakes (#399) — so #441's rule evaluated on the loopback VM and was absent on the real droplet, the 3rd recurrence of sig 404124947736.Fix: the rule now lives in a dedicated
ledger.nix(renderLedgerDir, gateway_attach.go) thatAttachGateway— the ONE composition point for BOTH gateway shapes (enrollment.go:355) — writes and imports on every gateway viabaseMachineModules. Removed fromrenderGatewayGuest; kept itsStateDirectoryMode = "0700"pin.warm_repomirrors ledger.nix too.Seam test that would have caught #441:
TestAttachGateway_LedgerHomeReachesOwnVPSGatewayasserts the rule at the composed OWN-VPS assembly (front door + acme-dns, NO gateway-guest.nix) — verified it fails without the ledger.nix write.TestRenderGatewayGuest_LedgerDirExistsAtBoot→LedgerDirModePinned(mode-only, plus a negative assert that the render no longer carries the rule).Companion fix (issue body):
oc_droplet_evidence(scripts/lib/rehearsal-droplet.sh) now scrubs the stale known_hosts entry +accept-newlikeoc_droplet_create, so a recycled-IP host-key clash no longer silently loses the droplet journal /ls /var/lib/ourcloudevidence.Docs: GOTCHAS #18 (gateway config in
renderGatewayGuestnever reaches the own-VPS gateway — the VM/full-install divergence class); STATUS header lead.go test ./internal/clan/...green; pre-push gate green. Blocks #378 — the next drive should land the ledger and complete the hand-off. NOTE: this fix is unit-verified but, like #441, not verified on a live droplet from here; if it recurs, run with REHEARSAL_KEEP_RED_DROPLET=1 and inspect/etc/tmpfiles.d/+readlink -f /run/current-systemper the issue's inspection plan.