Skip to content

test(os): combine #1931 #1945 #1966 RC2 KVM gate - #2002

Draft
VijitSingh97 wants to merge 60 commits into
developfrom
codex/1939-1947-1982-kvm-gate
Draft

test(os): combine #1931 #1945 #1966 RC2 KVM gate#2002
VijitSingh97 wants to merge 60 commits into
developfrom
codex/1939-1947-1982-kvm-gate

Conversation

@VijitSingh97

@VijitSingh97 VijitSingh97 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • carry the debug registry into the appliance environment so SSH-driven recovery uses the test registry
  • wait for provisioning units before the restore leg captures its backup
  • add the RC2 hostname, diagnostics, approval, backup/restore, and failed-install regression coverage
  • re-arm the borrowed RigForge pool after control writes before worker-dependent phases
  • fail closed on stale approvals, uncertain detached jobs, lost parent locks, mutable release inputs, unverifiable image provenance, surviving KVM guests, and libvirt query failures
  • retry post-promotion reads until both user-facing tags resolve to the captured digest

This combines and supersedes #1939, #1947, and #1982 so their interacting appliance changes can be reviewed, run through CI, and exercised by one exact-image KVM lifecycle against the current develop head and RigForge v1.17.3.

Closes #1931.
Closes #1945.
Closes #1966.
Closes #1994.

Validation

  • exact head: fd511612634a21ada55a349684c13a3a284f1aeb
  • independent correctness and security reviews: PASS at the exact head
  • focused release domain: 58 passed, 0 failed, including two valid stale registry reads before the expected digest appears
  • parent-lock continuity: 31 passed, 0 failed
  • borrowed-pool re-arm: 9 passed, 0 failed
  • RigForge control barrier, approval, hostname, and diagnostics self-tests passed
  • KVM teardown self-test covers surviving domain, libvirt query failure, and confirmed absence
  • private cut syntax, format, ShellCheck, custody, artifact, and claim-retention controls passed
  • file-budget, generated CLI, and test-inventory gates passed
  • fresh exact-head CI: pending
  • combined backup/restore KVM lifecycle: pending

The three remaining local selftest-e2e-phases failures are the known BSD wc whitespace difference; the changed phase, token, launch-intent, PID, and drain assertions pass locally and are exercised by Linux CI.

Companion release

Requires p2pool-starter-stack/rigforge#492 (test: fail closed across combined appliance gates). The two must be tested together: this branch carries the immutable RigForge build override through the appliance lifecycle and forwards the rollback input to the detached matrix runner, and #492 is the v1.17.4 companion those gates run against. Neither should merge without the combined acceptance matrix covering both.

CI status

Both red checks at head d3a8a96c are inherited from develop, not introduced here:

Both clear once #2005 lands on develop; nothing to change here.

VijitSingh97 and others added 30 commits September 6, 2026 05:23
…ironment too

A pithead verb run by hand over SSH reads /etc/environment through PAM, never a
unit's drop-in, so on the RC1 image `./pithead backup` restarted the stack from
the org's registry (no 2.0.0 there) and left it down. The tar-append copies the
rootfs's own /etc/environment out (it carries PITHEAD_ENGINE), appends the pin,
and appends the file back as a leaf so mkimage's tar -xf lands it whole.
verify-image --test asserts the pin beside the engine line; release mode refuses
any PITHEAD_REGISTRY= line there.

Measured: synthetic tar, both lines extracted; the new assertion on the RC1 image
(built before this fix) fails exactly one row, 119/1 against the chain's 119/0.
Positive control (an image built with the fix) waits for the bench.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
…re it backs up

The leg read "provisioned" off two identical `podman ps` readings, which
cannot see the wizard's `up` still inside its tor-health wait, holding the
mutation lock. The backup then waited that `up` out and, when it died,
archived and restarted the wreck, and the red said "could not take the
source backup" instead of naming the failed setup.

tests/os/provisioning-settled.sh: settled when neither pithead-firstboot
nor pithead-boot is `activating` (word-anchored: `deactivating` is on its
way out), bounded, with a verdict line that carries the units and the
wizard's spooled error. run.sh swaps the settle loop for it, line-neutral
at its ceiling. Ten fixture rows in test-appliance-boot-remint.sh drive the
helper with a stubbed _ssh; five mutants each red their own rows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
…ce-regressions-followup

# Conflicts:
#	tests/stack/test-lifecycle.sh
@VijitSingh97

Copy link
Copy Markdown
Collaborator Author

Independent exact-head review: PASS at fd511612634a21ada55a349684c13a3a284f1aeb against develop a03d0796b8e28d1beca87b5a118a4f681997fb66.

The correctness and security reviews found and rechecked the fail-closed VM teardown, libvirt query errors, nested restore-artifact retention, approval-fixture cleanup, root-owned release staging, detached parent-lock continuity, RigForge re-arm ordering, immutable Compose provenance, and post-promotion digest visibility retry. No critical, high, or medium actionable defect remains in the PR delta.

Bounded local evidence: release domain 58/0; parent-lock 31/0; borrowed-pool re-arm 9/0; focused appliance and procedure controls passed. Fresh CI and the exact-image KVM battery remain separate execution gates before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment