deploy-takeover: the TAKEOVER LANDED (device verifiably NixOS) — the red is the phases assertion, which reads a journal a wiped-and-reborn box cannot carry; the evidence lives on the gateway #1109
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1109
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?
The good news first: the takeover LANDED
Drive
20260901T064809Z— the first carrying #1105 — is the first in the arc where the takeover is positively proven.waitForDeviceNixOS(#1099's relay, now reachable) polled the device through the gateway and passed: the box is genuinely NixOS.Verified independently from this session, dialling the device through the gateway exactly as the harness does:
The leg then red on the assertion after it:
That conclusion is false. The erase ran; the box is NixOS.
Why the assertion cannot ever pass
journey.device.spec.ts(deploy-takeover leg):Read off the live device:
Exactly one boot exists — the installed system's first. There is no earlier boot to find, and widening
-bto-b -1or to all boots would not help: the count is 0 everywhere.The reason is structural. The kexec installer runs from RAM, and the takeover then wipes and re-partitions the disk. Nothing the installer logged is written to a journal that survives onto the new filesystem. A successfully taken-over device is by construction a box with no memory of its own takeover.
Where the evidence actually lives: the gateway
The takeover is driven by clan from the gateway's control plane, and the gateway journals it. On this same run:
(The same place drive
20260901T030011Z's#1013reap line was found.)Fix
Assert the takeover phases from the gateway's journal, where they are actually written — the relay's outer hop already has that session, so it costs nothing extra:
keyed on the run's own node id (
node-req-0003here) so it cannot be satisfied by a previous drive's line on an adopted standing gateway — an important guard, since the gateway persists across drives while the device does not.Alternatively drop the check:
waitForDeviceNixOSalready proves the landing positively and from the box's own state, which is the stronger evidence. My preference is to keep a phases assertion but move it to the gateway and key it on the node id — it distinguishes "the box is NixOS because we took it over" from "the box is NixOS somehow", and it is the assertion that would catch a takeover that silently skipped phases.Please also keep the failure sentence honest: the current wording states a conclusion ("the erase did not run on the box") that this run proves false. Name what was and was not observed instead.
Acceptance
waitForDeviceNixOSthrough the relay) — it works and is now arc-proven.Filed by the watching session (ADR 0174) — evidence gathered live off both boxes before teardown; no code change from me, the leg's assertion set is the worker's to reshape.
Arc note: this is the fifth consecutive defect of the same family in this leg (#740/#871/#1096+#1100/#1105/this) — a check that reports a confident conclusion it has no way to observe. The takeover itself has now been correct for at least two drives; what has been red is our ability to ask it the right question.
swarm-claim host=elitebook-distributed-server-03 run=15727
(automated multi-host claim — lowest live claim id works this ticket)
Superseded by #1110, fixed in
4a27f34e— closing. Same red, same root cause, and #1110's fix is better than the one I proposed here. Worth saying why, since the difference is a general lesson.I proposed asserting the takeover phases from the gateway's journal (keyed on the run's node id). #1110 instead reads the device's own
/proc/cmdlineforinit=/nix/store/…-nixos-system-node-req-<id>/init.That is the stronger evidence in two ways:
/proc/cmdlineproves the box is now running this clan node's own NixOS system. When those two can disagree, the second is the one the leg exists to establish — and it is exactly the disagreement a silently-skipped phase would produce./etc/NIXOSgate thatwaitForDeviceNixOSalready passes: it distinguishes "the box is some NixOS" from "the box is node-req-N's NixOS". My gateway-side check would not have caught a box that came up as the wrong node's system.It also has none of the guard my version needed (keying on node id so a prior drive's line on the adopted standing gateway cannot satisfy it) — the device cannot carry another run's
/proc/cmdline, so the guard is structural rather than remembered.#1110 also caught the negative twin in the same pass, which I had not looked for: the rented VMMode
deployleg assertinggrep -c -E "kexec|disko" == "0"was vacuous on a box that never rebooted, and now stampsboot_idat image-boot and re-reads it at deploy. Same family, opposite polarity — an assertion that could only ever pass. Good catch.For the record, the finding this ticket carried stands and is confirmed by #1110's own commit message: the takeover LANDED on drive
20260901T064809Z(device verifiably NixOS through the relay,journalctl --list-bootsshowing a single boot andgrep -ci takeover= 0 across all of them). The box succeeded; only the question we asked it was wrong.GOTCHAS #151 now records the hazard class (boot-scoped proof), which is the durable part.