Skip to content

OSS-377: reproducible QCOW2/cloud-init node VM artifact (fixtures) - #526

Merged
athNdev merged 3 commits into
mainfrom
codex/node-vm
Nov 18, 2026
Merged

athNdev merged 3 commits into
mainfrom
codex/node-vm

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

OSS-377 (child of OSS-368) artifact lane: a reproducible, secret-free QCOW2 + cloud-init node VM build definition for Proxmox VE and generic KVM/libvirt. Fixture/design only — no live VM, host config change, provisioning, registry push or release.

The shared enrollment/control contract (ADR 0019, PRs 516/517/518) is consumed, not forked. No node-control RPC is defined, mounted or changed here.

What is included

  • packaging/node-vm/config/ — pinned build config, scoped enrollment policy (digest-only, no baked secrets, bootstrap scopes limited to BeginEnrollmentChallenge/ClaimEnrollment), staged upgrade/rollback policy.
  • packaging/node-vm/provenance/base-images.json — pinned Ubuntu 24.04 amd64/arm64 cloud-image URLs, versions, signing-key fingerprint and upstream checksum URL. Digests are fixture-placeholder and are a hard stop for apply until an operator records a verified digest.
  • packaging/node-vm/MATRIX.md — supported platform/version matrix (design targets, explicitly not live-qualified claims).
  • packaging/node-vm/cloud-init/ — deterministic NoCloud seed templates (public metadata only) plus a self-contained first-boot enroll.py that generates a CSPRNG secret + Ed25519 key locally and exports only a digest-only bundle. The image and seed contain no secret, key, token, approved SPKI or fingerprint.
  • scripts/node_vm_build.py — offline build driver: deterministic seed rendering with SOURCE_DATE_EPOCH, canonical manifest, no-baked-secrets enforcement, --check determinism verification. Never calls qemu-img/xorriso/virt-customize/hypervisor.
  • scripts/node_vm_integrity.py — deterministic SHA256SUMS, CycloneDX 1.5 SBOM and environment-supplied detached signing plan (no embedded key).
  • scripts/node_vm_upgrade.py — staged upgrade (undo manifest + health recheck before promotion), verified rollback, copy-only hash-verified volume import/backup/recovery; world/backup/DB and daemon data-root preserved; UNCERTAIN blocks retry.
  • packaging/node-vm/docs/ — distinct VM isolation model and host prerequisites.
  • packaging/node-vm/qualification/ — disposable owned-VM qualification design and synthetic fixtures with an explicit fixture-vs-live evidence boundary.
  • ADR 0035 + governing knowledge/architecture/node-vm-artifact.md concept and repo-map update.

Honest boundaries

  • Raw QCOW2 bytes are not claimed byte-reproducible across unpinned qemu-img; the image is verified by checksum from a pinned toolchain. Seed/manifest/SBOM/plan are deterministic.
  • Fixtures are synthetic. No live install, enrollment, daemon, gameplay, breakout or upgrade claim is made.
  • ADR number 0035 is used under the orchestrator's central allocation: 0015–0033 are allocated to other tracks and 0034 is the already-merged MCP server distribution ADR; 0036 (node LXC template), 0037 (portable installer) and 0038 (host-native private daemon) are reserved for sibling lanes and are not used here. The single knowledge/decisions/adrs.md row remains orchestrator-owned; exact row text is supplied in the final report.

Verification (exact head 64928e47987f59af58045892e71db1fd5c49b7c7)

  • python -m py_compile on all four drivers, four test modules and the guest first-boot module — clean.
  • python -m unittest discover -s scripts -p 'test_node_vm_*.py' — 27 tests pass (identity uniqueness, digest-only bundle, secret-leak refusal, baked-secret refusal, deterministic seed/manifest, CycloneDX SBOM, key-free signing plan, staged upgrade/rollback and copy-only volume safety).
  • python scripts/node_vm_build.py --out-dir <tmp>/seed --check — deterministic, fixture_only: true, provenance fixture-placeholder.
  • python scripts/node_vm_integrity.py --out-dir <tmp>/integrity --verify — checksum manifest verifies; SBOM CycloneDX 1.5; signing plan has no baked key.
  • python scripts/node_vm_upgrade.py --from-revision 0.1.0-fixture --to-revision 0.2.0-fixture --batch-id fixture-batch-0001 — staged undo manifest emitted.
  • go run ./cmd/knowledge-lint -root . -fix then plain lint — 65 concepts, 38/38 queries, indexes current; -for-path packaging/node-vm reports the governing concept. go test ./cmd/knowledge-lint passes.
  • No command invoked qemu-img, xorriso, virt-customize, a hypervisor, a registry or a signing service. No elevation requested.

Scope exclusions

No merge, no registry push, no release/tag, no live host VM, no global host configuration, no world/backup/database mutation, no proto/generated-file change, no auth middleware change, no product UI change. Review and CI are requested before any merge decision.

…tures)

OSS-377 artifact lane under OSS-368. Adds packaging/node-vm build definition
for a dedicated per-node VM on Proxmox VE and generic KVM/libvirt:

- pinned base-image provenance (GPG key + upstream checksum URL, fixture
  digests that hard-stop apply until verified), supported platform matrix,
  deterministic NoCloud seed rendering with SOURCE_DATE_EPOCH and --check.
- no enrollment input baked into image/seed/metadata: first boot generates a
  CSPRNG secret + Ed25519 key locally and exports only a digest-only bundle
  under the SHARED ADR0019 contract; bootstrap scopes limited to challenge +
  claim. No RPC forked or mounted.
- deterministic SHA256SUMS, CycloneDX 1.5 SBOM and environment-supplied
  detached signing plan (no baked key); packaging only, no publication.
- staged upgrade with checksummed undo before promotion, verified rollback,
  copy-only hash-verified volume import/backup/recovery, world/backup/DB and
  daemon data-root preservation, UNCERTAIN blocks retry.
- isolation + host-prerequisite docs and a fixture-only disposable-VM
  qualification design. No live VM, host config, registry or release touched.

ADR 0034 (central allocation: 0015-0033 taken by other tracks) and a governing
architecture concept. Orchestrator-owned ADR index row text is supplied in the
final report rather than written here.

Verification: py_compile clean; 27 offline unittest fixtures pass; build --check
deterministic and fixture-only; integrity --verify green; upgrade planner emits
undo manifest; knowledge-lint 65 concepts / 38 queries, indexes current.
PR526 blocking correction: ADR 0034 is centrally allocated and already merged
as docs/adr/0034-mcp-server-distribution.md. Rename this lane's ADR to 0035
and update its self references and the governing knowledge concept links.
0036/0037/0038 remain reserved for sibling lanes. No other file, no
knowledge/decisions/adrs.md row (orchestrator-owned) and no code behavior
changed.

Re-verified: knowledge-lint -fix then final (65 concepts, 38/38 queries,
indexes current), py_compile clean, 27 offline fixtures pass.
Complete the renumbering: title, allocation note (0034 = MCP distribution,
0036-0038 reserved for siblings) and suggested orchestrator row now use 0035;
governing concept sources and Read next links updated to match.
@athNdev
athNdev merged commit 8561cee into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-vm branch November 18, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant