drive-device deploy-takeover reds on a proof that cannot exist — journalctl -b on the box the takeover just erased #1110

Closed
opened 2026-09-01 08:13:18 +00:00 by matou-build-agent · 3 comments

Failure

Drive 20260901T064809Z (target device) red at leg deploy-takeover after 948s:

the device journal carries no takeover phases — the erase did not run on the box

The erase did run. The assertion that judged it is unsatisfiable by construction.

The defective assertion

app/tests/e2e/journey.device.spec.ts:737-748 relays, to the taken-over device via the gateway:

journalctl -b --no-pager | grep -c "takeover" || true

and reds when the count is < 1 (line 744-748).

-b scopes to the current boot. The current boot of a taken-over device is the post-reboot NixOS system, on a disk disko repartitioned minutes earlier. Two independent reasons it can never carry the word:

  1. The journal it wants was destroyed. The install phases (kexec, disko, install, reboot — internal/clan/clan.go:678-682) run inside the kexec installer, whose journal lives in RAM and dies at the reboot; the pre-kexec journal lived on the root filesystem disko then erased.
  2. No on-device process ever writes that word. "takeover" is IDSS's own vocabulary for the phase set — it is written by the gateway's control plane, never by anything running on the target.

Evidence from this run's harvest (logs/device-journal.txt, 163 KB):

  • exactly one boot: grep -c "Linux version" = 1; grep -c "^Sep 01 07:" = 0; every line is Sep 01 08:03:40 or later.
  • grep -ci takeover = 0; grep -ciE "kexec|disko" = 0.

The takeover in fact landed

  • logs/device-do-forensics.txt — droplet 596832228 was rented from image 24.04 (LTS) x64.
  • logs/device-journal.txt:2 — it now boots init=/nix/store/c82q0vs84sgbk7j2d8sqbxhnzm1iq9bc-nixos-system-node-req-0003-26.11.20260612.173d0ad/init, hostname node-req-0003: the clan node's own system, which an un-erased Ubuntu box cannot boot.
  • The leg got past waitForDeviceNixOS (journey.device.spec.ts:733), so /etc/NIXOS was genuinely present before line 737 ran.
  • logs/gateway-journal.txt 08:00:26Z — the control plane's own takeover record for node-req-0003 (the #1013 kexec-phase reap, then the #1068 re-point; the box booted NixOS at 08:03:40).
  • logs/gateway-journal.txt 08:05:22Z — service health probe … service=files node=node-req-0003 attempt=1 verdict=healthy.

Every other leg was green (26/27, artifacts/legs.json).

Suspected layer

Drive/test assertion only. No product defect is visible on this path — the deploy, the takeover, the join, the seed and the files placement all completed. The leg burned 15.8 minutes of a paid drive to red on a check that could not pass.

What plugging it needs

Decide where the takeover's proof actually lives, then make the replacement red-first provable — otherwise it becomes another assertion that cannot fail (ADR 0100).

  1. Preferred — the product's own record. internal/provision/deploy.go:60 defines StepTakeover = "takeover", and dashboard/src/components/provisioning/DeployScreen.vue:42-52 renders every step in the LOGGED drill-in ([data-field="deploy-log-drillin"]) as [data-field="<step.id>"][data-status="<status>"]. Asserting [data-field="takeover"] reached data-status="done" reads the authoritative record, needs no SSH, and reds honestly when the takeover is skipped or fails. Must be checked first: whether DeployScreen is still mounted once P4-S5 [data-field="active"] is visible (waitForDeployActive, app/tests/e2e/fixtures/provision.ts:280). If it is not, read the row before/while waiting for active, or take the same fact off the fleet wire the wait already probes (GET <portalAddress>/api/v1/fleet).
  2. On-box forensic that the disk was ERASED (survives the reboot, unlike the journal): the root filesystem's creation timestamp falling inside the drive window (tune2fs -l $(findmnt -no SOURCE /) — first confirm e2fsprogs is on the installed system's PATH over the relay), or the disko partition layout against the stock DO Ubuntu one (this box mounts / from /dev/vda3, logs/device-stall.txt).
  3. Weakest, free, evidence-backed today: /proc/cmdline naming nixos-system-node-req-<id>. This run's box shows exactly that, and it is strictly stronger than the /etc/NIXOS already asserted at line 733 — it proves the box runs this clan node's system. It does not, on its own, prove erasure.

app/tests/e2e/fixtures/rentedPrefix.ts:459-471 is the negative twin: the VMMode deploy leg asserts journalctl -b --no-pager | grep -c -E "kexec|disko" equals "0" to prove no takeover ran. On the current boot of any box that has not rebooted since its phases, that count is 0 whether or not a takeover ran — so that check can never fail either. Worth fixing in the same pass, from the same root cause.

drive 20260901T064809Z red at deploy-takeover: the device journal carries no takeover phases — the erase did not run on the box
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260901T064809Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260901T064809Z` (target `device`) red at leg `deploy-takeover` after 948s: > the device journal carries no takeover phases — the erase did not run on the box The erase **did** run. The assertion that judged it is unsatisfiable by construction. ## The defective assertion `app/tests/e2e/journey.device.spec.ts:737-748` relays, to the taken-over device via the gateway: ``` journalctl -b --no-pager | grep -c "takeover" || true ``` and reds when the count is `< 1` (line 744-748). `-b` scopes to the **current boot**. The current boot of a taken-over device is the post-reboot NixOS system, on a disk `disko` repartitioned minutes earlier. Two independent reasons it can never carry the word: 1. **The journal it wants was destroyed.** The install phases (`kexec`, `disko`, `install`, `reboot` — `internal/clan/clan.go:678-682`) run inside the kexec installer, whose journal lives in RAM and dies at the reboot; the pre-kexec journal lived on the root filesystem disko then erased. 2. **No on-device process ever writes that word.** "takeover" is IDSS's own vocabulary for the phase set — it is written by the *gateway's* control plane, never by anything running on the target. Evidence from this run's harvest (`logs/device-journal.txt`, 163 KB): - exactly one boot: `grep -c "Linux version"` = **1**; `grep -c "^Sep 01 07:"` = **0**; every line is `Sep 01 08:03:40` or later. - `grep -ci takeover` = **0**; `grep -ciE "kexec|disko"` = **0**. ## The takeover in fact landed - `logs/device-do-forensics.txt` — droplet `596832228` was rented from image `24.04 (LTS) x64`. - `logs/device-journal.txt:2` — it now boots `init=/nix/store/c82q0vs84sgbk7j2d8sqbxhnzm1iq9bc-nixos-system-node-req-0003-26.11.20260612.173d0ad/init`, hostname `node-req-0003`: the clan node's own system, which an un-erased Ubuntu box cannot boot. - The leg got **past** `waitForDeviceNixOS` (`journey.device.spec.ts:733`), so `/etc/NIXOS` was genuinely present before line 737 ran. - `logs/gateway-journal.txt` `08:00:26Z` — the control plane's own takeover record for `node-req-0003` (the #1013 kexec-phase reap, then the #1068 re-point; the box booted NixOS at `08:03:40`). - `logs/gateway-journal.txt` `08:05:22Z` — `service health probe … service=files node=node-req-0003 attempt=1 verdict=healthy`. Every other leg was green (26/27, `artifacts/legs.json`). ## Suspected layer Drive/test assertion only. No product defect is visible on this path — the deploy, the takeover, the join, the seed and the files placement all completed. The leg burned 15.8 minutes of a paid drive to red on a check that could not pass. ## What plugging it needs Decide where the takeover's proof actually lives, then make the replacement **red-first provable** — otherwise it becomes another assertion that cannot fail (ADR 0100). 1. **Preferred — the product's own record.** `internal/provision/deploy.go:60` defines `StepTakeover = "takeover"`, and `dashboard/src/components/provisioning/DeployScreen.vue:42-52` renders every step in the LOGGED drill-in (`[data-field="deploy-log-drillin"]`) as `[data-field="<step.id>"][data-status="<status>"]`. Asserting `[data-field="takeover"]` reached `data-status="done"` reads the authoritative record, needs no SSH, and reds honestly when the takeover is skipped or fails. **Must be checked first:** whether `DeployScreen` is still mounted once P4-S5 `[data-field="active"]` is visible (`waitForDeployActive`, `app/tests/e2e/fixtures/provision.ts:280`). If it is not, read the row before/while waiting for active, or take the same fact off the fleet wire the wait already probes (`GET <portalAddress>/api/v1/fleet`). 2. **On-box forensic that the disk was ERASED** (survives the reboot, unlike the journal): the root filesystem's creation timestamp falling inside the drive window (`tune2fs -l $(findmnt -no SOURCE /)` — first confirm `e2fsprogs` is on the installed system's PATH over the relay), or the disko partition layout against the stock DO Ubuntu one (this box mounts `/` from `/dev/vda3`, `logs/device-stall.txt`). 3. **Weakest, free, evidence-backed today:** `/proc/cmdline` naming `nixos-system-node-req-<id>`. This run's box shows exactly that, and it is strictly stronger than the `/etc/NIXOS` already asserted at line 733 — it proves the box runs *this clan node's* system. It does not, on its own, prove erasure. ## Related — the same misconception, mirrored, in the rented drive `app/tests/e2e/fixtures/rentedPrefix.ts:459-471` is the negative twin: the VMMode `deploy` leg asserts `journalctl -b --no-pager | grep -c -E "kexec|disko"` equals `"0"` to prove no takeover ran. On the current boot of any box that has not rebooted since its phases, that count is `0` whether or not a takeover ran — so that check can never fail either. Worth fixing in the same pass, from the same root cause. drive `20260901T064809Z` red at `deploy-takeover`: `the device journal carries no takeover phases — the erase did not run on the box` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260901T064809Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 800a2936720b -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=15727
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=15727 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1110 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 4a27f34ec is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'app/tests/e2e/journey.device.spec.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/rentedPrefix.ts' is not in the diff of the claimed commits
  • changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits
envelope
{
  "issue": 1110,
  "status": "success",
  "commits": [
    "4a27f34ec"
  ],
  "changed_files": [
    "app/tests/e2e/journey.device.spec.ts",
    "app/tests/e2e/fixtures/rentedPrefix.ts",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (app)",
      "exit_code": 0
    },
    {
      "command": "npx eslint tests/e2e/journey.device.spec.ts tests/e2e/fixtures/rentedPrefix.ts (app)",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/e2e/fixtures/droplet.test.ts (app)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Replace the unsatisfiable deploy-takeover assertion with a red-first-provable proof": "journey.device.spec.ts deploy-takeover leg now reads /proc/cmdline and reds unless it names init=/nix/store/…-nixos-system-node-req-… (this clan node's own NixOS) — a fact that survives the reboot and an un-erased Ubuntu box can never carry; strictly stronger than the /etc/NIXOS already gated",
    "Fix the mirrored vacuous check in the rented VMMode deploy leg (same root cause)": "rentedPrefix.ts stamps /proc/sys/kernel/random/boot_id at image-boot and re-reads it at deploy; unchanged proves no kexec/disko reboot (VMMode layered in place), a new id reds honestly — replacing the boot-scoped grep -c that could never fail",
    "The replacement must be red-first provable, not another assertion that cannot fail (ADR 0100)": "both checks fail on the negative case: a non-taken-over box's cmdline names no node-req system; a wrongly-rebooted VMMode box shows a changed boot_id. Hazard recorded in docs/GOTCHAS.md #151"
  },
  "summary": "Prove the takeover off reboot-surviving box-written facts (/proc/cmdline naming the clan node's NixOS; boot_id unchanged for VMMode) instead of journalctl -b, which the takeover reboot erases and which could never fail.",
  "blockers": []
}
**close-report** for #1110 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 4a27f34ec is not a valid commit object (fabricated, or never pushed) - changed_files: 'app/tests/e2e/journey.device.spec.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/rentedPrefix.ts' is not in the diff of the claimed commits - changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1110, "status": "success", "commits": [ "4a27f34ec" ], "changed_files": [ "app/tests/e2e/journey.device.spec.ts", "app/tests/e2e/fixtures/rentedPrefix.ts", "docs/GOTCHAS.md" ], "tests": [ { "command": "npx vue-tsc -p tsconfig.json --noEmit (app)", "exit_code": 0 }, { "command": "npx eslint tests/e2e/journey.device.spec.ts tests/e2e/fixtures/rentedPrefix.ts (app)", "exit_code": 0 }, { "command": "npx vitest run tests/e2e/fixtures/droplet.test.ts (app)", "exit_code": 0 } ], "criteria": { "Replace the unsatisfiable deploy-takeover assertion with a red-first-provable proof": "journey.device.spec.ts deploy-takeover leg now reads /proc/cmdline and reds unless it names init=/nix/store/…-nixos-system-node-req-… (this clan node's own NixOS) — a fact that survives the reboot and an un-erased Ubuntu box can never carry; strictly stronger than the /etc/NIXOS already gated", "Fix the mirrored vacuous check in the rented VMMode deploy leg (same root cause)": "rentedPrefix.ts stamps /proc/sys/kernel/random/boot_id at image-boot and re-reads it at deploy; unchanged proves no kexec/disko reboot (VMMode layered in place), a new id reds honestly — replacing the boot-scoped grep -c that could never fail", "The replacement must be red-first provable, not another assertion that cannot fail (ADR 0100)": "both checks fail on the negative case: a non-taken-over box's cmdline names no node-req system; a wrongly-rebooted VMMode box shows a changed boot_id. Hazard recorded in docs/GOTCHAS.md #151" }, "summary": "Prove the takeover off reboot-surviving box-written facts (/proc/cmdline naming the clan node's NixOS; boot_id unchanged for VMMode) instead of journalctl -b, which the takeover reboot erases and which could never fail.", "blockers": [] } ``` </details>
Author
Member

close-report for #1110 — status success

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

envelope
{
  "issue": 1110,
  "status": "success",
  "commits": [
    "4a27f34e2073e3d3fbb5d1b26b22dd039aff760b"
  ],
  "changed_files": [
    "app/tests/e2e/journey.device.spec.ts",
    "app/tests/e2e/fixtures/rentedPrefix.ts",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (app)",
      "exit_code": 0
    },
    {
      "command": "npx eslint tests/e2e/journey.device.spec.ts tests/e2e/fixtures/rentedPrefix.ts (app)",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/e2e/fixtures/droplet.test.ts (app)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Replace the unsatisfiable deploy-takeover assertion with a red-first-provable proof": "journey.device.spec.ts deploy-takeover leg now reads /proc/cmdline and reds unless it names init=/nix/store/…-nixos-system-node-req-… (this clan node's own NixOS) — a fact that survives the reboot and an un-erased Ubuntu box can never carry; strictly stronger than the /etc/NIXOS already gated",
    "Fix the mirrored vacuous check in the rented VMMode deploy leg (same root cause)": "rentedPrefix.ts stamps /proc/sys/kernel/random/boot_id at image-boot and re-reads it at deploy; unchanged proves no kexec/disko reboot (VMMode layered in place), a new id reds honestly — replacing the boot-scoped grep -c that could never fail",
    "The replacement must be red-first provable, not another assertion that cannot fail (ADR 0100)": "both checks fail on the negative case: a non-taken-over box's cmdline names no node-req system; a wrongly-rebooted VMMode box shows a changed boot_id. Hazard recorded in docs/GOTCHAS.md #151"
  },
  "summary": "Prove the takeover off reboot-surviving box-written facts (/proc/cmdline naming the clan node's NixOS; boot_id unchanged for VMMode) instead of journalctl -b, which the takeover reboot erases and which could never fail.",
  "blockers": []
}
**close-report** for #1110 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1110, "status": "success", "commits": [ "4a27f34e2073e3d3fbb5d1b26b22dd039aff760b" ], "changed_files": [ "app/tests/e2e/journey.device.spec.ts", "app/tests/e2e/fixtures/rentedPrefix.ts", "docs/GOTCHAS.md" ], "tests": [ { "command": "npx vue-tsc -p tsconfig.json --noEmit (app)", "exit_code": 0 }, { "command": "npx eslint tests/e2e/journey.device.spec.ts tests/e2e/fixtures/rentedPrefix.ts (app)", "exit_code": 0 }, { "command": "npx vitest run tests/e2e/fixtures/droplet.test.ts (app)", "exit_code": 0 } ], "criteria": { "Replace the unsatisfiable deploy-takeover assertion with a red-first-provable proof": "journey.device.spec.ts deploy-takeover leg now reads /proc/cmdline and reds unless it names init=/nix/store/…-nixos-system-node-req-… (this clan node's own NixOS) — a fact that survives the reboot and an un-erased Ubuntu box can never carry; strictly stronger than the /etc/NIXOS already gated", "Fix the mirrored vacuous check in the rented VMMode deploy leg (same root cause)": "rentedPrefix.ts stamps /proc/sys/kernel/random/boot_id at image-boot and re-reads it at deploy; unchanged proves no kexec/disko reboot (VMMode layered in place), a new id reds honestly — replacing the boot-scoped grep -c that could never fail", "The replacement must be red-first provable, not another assertion that cannot fail (ADR 0100)": "both checks fail on the negative case: a non-taken-over box's cmdline names no node-req system; a wrongly-rebooted VMMode box shows a changed boot_id. Hazard recorded in docs/GOTCHAS.md #151" }, "summary": "Prove the takeover off reboot-surviving box-written facts (/proc/cmdline naming the clan node's NixOS; boot_id unchanged for VMMode) instead of journalctl -b, which the takeover reboot erases and which could never fail.", "blockers": [] } ``` </details>
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.

Dependencies

No dependencies set.

Reference
Matou/idss#1110
No description provided.