Gunnar

mikronova/draupnir

.nornir/testmatrix-arms.json

{
  "_comment": [
    "Rescue arms for the gated-tests guard (nornir_testmatrix::gatedtests).",
    "ENFORCED since 2026-08-01 by tests/silenced_tests_guard.rs — this file is no",
    "longer a note nobody reads: a plain `cargo test` now fails if a test target",
    "goes dark and is not listed here. An arm for something that does not compile",
    "would be silence wearing a badge, so every arm below was actually built, and",
    "every one of them was actually RUN.",
    "",
    "draupnir is `default = []` BY DESIGN — the lean core is pure std and each live",
    "backend sits behind a feature so a lean consumer pulls only what it drives.",
    "That decision is correct and is NOT changed here. Its side effect is that",
    "EVERY backend proof this repo has is feature-gated, and a gated proof is a",
    "silent one until it is declared: `cargo test` printed `0 tests ... ok` for the",
    "repo's two headline BOOT-OK proofs.",
    "",
    "── arm 1 · live_oci_published_port (declared 2026-07-21) ──",
    "",
    "`#![cfg(feature = \"backend-oci\")]`, not in default.",
    "PROVES (oden, 2026-07-21): the file COMPILES under `--features backend-oci`,",
    "killing the zero-tests-by-vacuum silence and catching bit-rot in the",
    "bollard/ContainerBoot path.",
    "does NOT prove: the body is `#[ignore]` and needs a live podman socket + the",
    "FalkorDB image; it was not run in that pass and has not been run since.",
    "  cargo test --features backend-oci --test live_oci_published_port -- --ignored --nocapture",
    "",
    "── arm 2 · stage1_container_start_proof (declared 2026-08-01) ──",
    "",
    "`#![cfg(feature = \"backend-oci\")]`, 1 hidden `#[test]`. The container BOOT-OK:",
    "boot a real OCI image through the pure-Rust bollard → rootless-podman-socket",
    "path (no CLI shell-out), assert RUNNING, read a genuine readiness signal back",
    "(redis `PING` answered `+PONG` on the published port), tear it down.",
    "",
    "PROVES (oden, 2026-08-01, MEASURED — the first time this file has ever run):",
    "  STAGE1_HOST_PORT=6412 STAGE1_IMAGE=docker.io/valkey/valkey:9.1.0-trixie \\",
    "  cargo test --features backend-oci --test stage1_container_start_proof -- --ignored --nocapture",
    "  → STAGE-1 CONTAINER BOOT-OK · Running -> +PONG on host :6412 · after stop Gone",
    "  → test result: ok. 1 passed; 0 failed",
    "The boot path is real and works. One defect WAS found by finally running it:",
    "the host port was a hard-coded `const HOST_PORT = 6399` and the run died on",
    "`bind: address already in use` because an unrelated container had 6399. Fixed",
    "the same day — `$STAGE1_HOST_PORT`, mirroring the `$STAGE1_IMAGE` override the",
    "file already had. That is precisely the class of rot a dark file accumulates.",
    "",
    "does NOT prove: the body is `#[ignore]`, so a plain `cargo test --features",
    "backend-oci` COMPILES it and skips it. The arm's standing guarantee is the",
    "compile; the live run needs a rootless podman socket, a redis-family image,",
    "and a free host port, and must be re-run by hand on a box that has them.",
    "",
    "── arm 3 · stage2_youki_start_proof (declared 2026-08-01) ──",
    "",
    "`#![cfg(feature = \"backend-youki\")]`, 1 hidden `#[test]`. The DAEMON-LESS",
    "proof: a container started through youki-core (`libcontainer`) over Linux",
    "namespaces + cgroups-v2 directly, rootless, with a readiness sentinel read back",
    "from a bind mount.",
    "",
    "PROVES (oden, 2026-08-01, MEASURED): compiles under `--features backend-youki`,",
    "and the run reports `1 passed`.",
    "",
    "does NOT prove — READ THIS BEFORE TRUSTING THE GREEN: on oden that pass is a",
    "SELF-GATED SKIP, not a start. The test prints a loud SKIP naming the blocker",
    "(`kernel.apparmor_restrict_unprivileged_userns=1`, so this binary has no",
    "AppArmor profile granting the userns capability and youki's",
    "`unshare(CLONE_NEWPID)` is denied) and returns green rather than failing. It",
    "never fakes a start, and the skip line is loud — but a green from this test on",
    "this box means 'prerequisites absent', not 'daemon-less boot works'. To get a",
    "real start: an AppArmor profile granting `userns`+`capability` for the test",
    "binary (as podman/crun ship), or",
    "`kernel.apparmor_restrict_unprivileged_userns=0`.",
    "",
    "One arm per file rather than one fat `--features backend-oci,backend-youki`:",
    "the two backends pull disjoint trees (bollard/tokio/tar vs",
    "libcontainer/rustix/flate2), and an arm naming a combination nobody runs would",
    "be a declaration that is not true.",
    "",
    "",
    "── arm 4 · live_oci_list_and_env (declared 2026-08-11) ──",
    "",
    "`#![cfg(feature = \"backend-oci\")]`, 1 hidden `#[test]`. Covers the two calls",
    "added the same day: `ContainerControl::list_containers` and `container_env`.",
    "",
    "WHY THEY EXIST: gunnar's bench suite drove an otherwise zero-shell container",
    "path and then shelled out twice beside it -- `podman ps -a --filter name=` to",
    "sweep dead runs' containers, and `podman inspect --format {{.Config.Env}}` to",
    "read a container's environment back -- under the comment \"draupnir has no",
    "list-containers call\". It was right, and a boot path with no shell fallback",
    "buys little if the janitor next to it reintroduces the podman-not-on-PATH and",
    "wrong-engine failures, silently: a failed `podman ps` and an empty box produce",
    "the same empty stdout.",
    "",
    "PROVES (oden, 2026-08-11, MEASURED, live rootless podman socket + ubuntu:26.04):",
    "  cargo test --features backend-oci --test live_oci_list_and_env -- --ignored --nocapture",
    "  -> test result: ok. 1 passed; 0 failed",
    "Both halves are read-backs of a container this test booted: a variable it set",
    "comes back from the daemon's own record, and the container appears in the",
    "listing as Running. It carries a NEGATIVE half too -- a prefix nothing was",
    "booted under must come back empty -- because a listing that ignored its",
    "argument would satisfy every positive assertion.",
    "",
    "ONE DEFECT FOUND BY RUNNING IT, on the first run: the prefix matches the",
    "DAEMON-side name, and `Machine::container_name` prepends `draupnir-`, so",
    "`list_containers(&spec.name)` matches nothing. Documented on the method.",
    "",
    "does NOT prove: the body is `#[ignore]`; a plain `cargo test --features",
    "backend-oci` compiles and skips it. The standing guarantee is the compile."
    ,
    "── arm 5 · boot_off_medium_proof (declared 2026-08-15) ──",
    "",
    "`#![cfg(feature = \"backend-tunnr\")]`, 4 `#[test]`s (2 of them `#[ignore]`d real",
    "boots). This CLOSES the `backend-tunnr` coverage gap the note below used to",
    "record: until today that feature gated no test file at all.",
    "",
    "WHY IT EXISTS: `ImageSource::Iso` was legal on the Redfish backend ONLY, so no",
    "value a caller could construct meant 'boot this KVM guest off this medium'. The",
    "iso-kvm leg of the appliance chain was unreachable by construction, and with it",
    "every stage past BUILT. `(Iso, Kvm)` is now a legal pairing and BootSpec carries",
    "`medium` + `boot_order`.",
    "",
    "PROVES (this box, 2026-08-15, MEASURED — a real QEMU/KVM guest, /dev/kvm,",
    "OVMF_CODE_4M.fd, gunnar-appliance-x86_64.iso 30457856 B):",
    "  DRAUPNIR_VM_BOOT_TIMEOUT=200 cargo test --features backend-tunnr \\",
    "    --test boot_off_medium_proof -- --ignored --nocapture",
    "  → FIRMWARE: marker seen after 1.000428881s:",
    "      BdsDxe: loading Boot0002 \"UEFI QEMU DVD-ROM QM00005 \" from",
    "      PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x2,0xFFFF,0x0)",
    "  → SERVING : marker seen after 2.252323705s: gunnar ssh listener bound",
    "      local_addr=0.0.0.0:2222",
    "  → STATUS  : Ok(On)   (still serving — never waited for exit)",
    "  → 39396 bytes of real serial console; test result: ok. 1 passed",
    "The guest booted UEFI off the CD, korp-boot chainloaded \\vmlinuz, Linux 7.0.0-29",
    "came up and the gunnar appliance bound :2222 — all from one `BootSpec::iso_boot`.",
    "",
    "AND ITS NEGATIVE, also MEASURED the same day, same box:",
    "  a_blank_disk_boots_no_appliance_and_names_no_medium → a 256 MiB blank raw disk",
    "  booted with `kvm_boot_installed_disk` (`-boot c`, medium ABSENT) produced 311",
    "  bytes reading `BdsDxe: No bootable option or device was found.` — no DVD-ROM",
    "  line, no appliance banner. Without this the positive proof would prove nothing.",
    "",
    "The two non-ignored tests in the file run on a plain",
    "`cargo test --features backend-tunnr` with no KVM: a medium that is not on disk",
    "fails BY NAME before any QEMU is spawned, and a boot-installed spec that still",
    "carries the installer medium is refused (honesty rule 1, enforced at validate()).",
    "",
    "does NOT prove: the INSTALL leg end-to-end. `kvm_install_from_medium` renders",
    "`-cdrom <iso> -boot d` alongside a target disk and that argv is asserted, but no",
    "installer has been run through it and no second-lifetime boot of an installed",
    "disk has been performed on this box. That is the next wall, and it is named.",
    "",
    "STILL NOT covered by any arm as of 2026-08-15 MORNING: `backend-redfish` and",
    "`seed` gate no test file at all. `backend-redfish` is CLOSED by arms 6 and 7",
    "below; `seed` remains a real gap.",
    "",
    "── arm 6 · redfish_server_conformance (declared 2026-08-15) ──",
    "",
    "`#![cfg(feature = \"redfish-server\")]`, 20 `#[test]`s, NONE `#[ignore]`d — it",
    "needs no KVM, no /dev/kvm and no VM, because the server is fronted by a",
    "recording backend that captures the BootSpec and launches nothing.",
    "",
    "WHY IT EXISTS: draupnir now owns BOTH ends of Redfish — the client",
    "(`src/redfish.rs`) and, behind the new `redfish-server` feature, a real Redfish",
    "SERVICE fronting KVM (`src/redfish_server.rs`). Pointing one at the other is a",
    "MIRROR: both halves can be wrong in the same way and every assertion passes. So",
    "nothing here is asserted against a literal typed by whoever wrote the server.",
    "Every shape is read out of DMTF's own published JSON, vendored under",
    "`tests/fixtures/dmtf/` with URLs + sha256 in PROVENANCE.md, and re-hashed at run",
    "time so a fixture edited to make a test pass is itself a red.",
    "",
    "PROVES (this box, 2026-08-15, MEASURED):",
    "  cargo test --features redfish-server,backend-redfish \\",
    "    --test redfish_server_conformance",
    "  → ANCHOR: 16 DMTF fixtures verified against PROVENANCE.md digests",
    "  → ANCHOR: 9 error messages verified against DMTF Base.1.19.0",
    "  → test result: ok. 20 passed; 0 failed",
    "The six endpoints answer with DMTF-declared properties only, every required",
    "property present, @odata.type resolving to a real versioned DMTF definition,",
    "ResetType/BootSource allowable values as SUBSETS of DMTF's enums, DMTF-registry",
    "error payloads, 405+Allow, 401+WWW-Authenticate. The wire PATHS are compared",
    "against the @odata.id strings in DMTF's own public-rackmount1 mockup.",
    "",
    "does NOT prove: that a real iDRAC/iLO interoperates. Conformance to DMTF's",
    "published shapes makes interop PLAUSIBLE; only a burn against real hardware",
    "makes it measured, and there is no BMC on this box.",
    "",
    "── arm 7 · redfish_kvm_loop_proof (declared 2026-08-15) ──",
    "",
    "`#![cfg(all(feature = \"redfish-server\", feature = \"backend-redfish\",",
    "feature = \"backend-tunnr\"))]`, 4 `#[test]`s (2 `#[ignore]`d real boots).",
    "The LOOP: one `BootSpec::iso_boot(..).on_metal(bmc)` → draupnir's Redfish client",
    "(cert PINNED) → draupnir's Redfish server → KvmBoot → a real QEMU/KVM guest.",
    "",
    "PROVES (this box, 2026-08-15, MEASURED — /dev/kvm, OVMF_CODE_4M.fd,",
    "gunnar-appliance-x86_64.iso 30457856 B):",
    "  DRAUPNIR_VM_BOOT_TIMEOUT=200 cargo test \\",
    "    --features redfish-server,backend-redfish,backend-tunnr \\",
    "    --test redfish_kvm_loop_proof -- --ignored --nocapture",
    "  → FIRMWARE: marker seen after 1.250557728s: BdsDxe: loading Boot0002",
    "      \"UEFI QEMU DVD-ROM QM00005 \" from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(...)",
    "  → SERVING : marker seen after 2.501777053s: gunnar ssh listener bound",
    "      local_addr=0.0.0.0:2222",
    "  → POWER   : Ok(On), read back over Redfish (ComputerSystem.PowerState)",
    "  → 39405 bytes of real serial console; test result: ok. 1 passed",
    "",
    "AND THE APPLIED-OUTPUT RED, also MEASURED the same day, same box: the same ISO",
    "left IN THE TRAY, only BootSourceOverrideTarget flipped Cd→Hdd, booted for real",
    "→ 311 bytes reading `BdsDxe: No bootable option or device was found.` — no",
    "DVD-ROM line, no appliance banner. Sabotaging the server to acknowledge the",
    "override without applying it (a 204 on the wire, `iso_boot` regardless) turned",
    "that leg into 39404 bytes with `UEFI QEMU DVD-ROM`, `GUNNAR APPLIANCE` and",
    "`gunnar ssh listener bound` after 3.5 s. Reverted; `git diff` clean.",
    "",
    "The two non-ignored tests run with no KVM: a ResetType outside the advertised",
    "list is refused BY NAME with DMTF's ActionParameterValueNotInList and boots",
    "nothing, and an InsertMedia naming an ISO nobody built is refused BY NAME with",
    "ResourceMissingAtURI and mounts nothing.",
    "",
    "Rows are emitted under the form `draupnir/iso-redfish-sim`, NEVER `iso-metal`.",
    "An emulator proves the wire, never the hardware; recording this in the cell a",
    "real-hardware green would occupy is exactly the false green the form split",
    "exists to prevent. `iso-metal` stays Absent, visibly, on its own row.",
    "",
    "does NOT prove: real metal. Also NOT proven — this BMC mounts only `file://`",
    "URIs and absolute paths and REFUSES an http(s) media URI by name; a real BMC",
    "PULLS the image over the network. That refusal is loud, not silent, but it is a",
    "real difference from an iDRAC and it is named here.",
    "",
    "── arm · live_oci_exec_streaming (declared 2026-10-17) ──",
    "",
    "`#![cfg(feature = \"backend-oci\")]`, 1 hidden `#[test]`: exec_streaming in one",
    "long-lived container — env/user/dir, exit code, a 200 000-byte line whole, four",
    "execs at once. Run on a box with podman + an image with sh:",
    "  cargo test --features backend-oci --test live_oci_exec_streaming -- --ignored --nocapture"
  ],
  "arms": [
    { "package": "draupnir", "features": ["backend-oci"], "test": "live_oci_published_port" },
    { "package": "draupnir", "features": ["backend-oci"], "test": "stage1_container_start_proof" },
    { "package": "draupnir", "features": ["backend-youki"], "test": "stage2_youki_start_proof" },
    { "package": "draupnir", "features": ["backend-oci"], "test": "live_oci_list_and_env" },
    { "package": "draupnir", "features": ["backend-tunnr"], "test": "boot_off_medium_proof" },
    { "package": "draupnir", "features": ["redfish-server"], "test": "redfish_server_conformance" },
    { "package": "draupnir", "features": ["redfish-server", "backend-redfish", "backend-tunnr"], "test": "redfish_kvm_loop_proof" },
    { "package": "draupnir", "features": ["backend-oci"], "test": "live_oci_exec_streaming" }
  ]
}