Skip to content

test(vm): boot upgrade and recovery acceptance scenarios - #77

Merged
jdx merged 3 commits into
mainfrom
codex/boot-acceptance
Sep 5, 2026
Merged

test(vm): boot upgrade and recovery acceptance scenarios#77
jdx merged 3 commits into
mainfrom
codex/boot-acceptance

Conversation

@jdx

@jdx jdx commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Container tests cannot verify boot persistence. Add a QEMU harness that boots a real Arch disk, installs with a baseline binary, upgrades with the candidate, interrupts an actual pacman transaction, checks conservative recovery, rolls back, and boots again to verify package and ledger persistence.

The baseline defaults to the latest published stable release, with origin/main as the initial fallback while no releases exist. CI retains binary hashes, baseline identity, bootstrap logs, and both boot logs. KVM is used when available, with TCG fallback.

Validation: the checked-in harness passed locally and in GitHub Actions, including both boots. Fixture repositories and keys are disposable; CI does not upload their private keys.

Stack created with GitHub Stacks CLIGive Feedback 💬


Note

Medium Risk
New mandatory CI depends on Docker, QEMU, sudo, and GitHub API for baselines, so flakes or runner gaps could block merges without changing production runtime code.

Overview
Adds a boot acceptance harness that container tests cannot cover: Docker prepares an Arch rootfs with signed fixture repos and snapshots, exports an ext4 disk, and QEMU boots it twice with a real kernel/initramfs (KVM when available, TCG otherwise).

First boot installs with a baseline pacvamp (latest stable tag or origin/main), upgrades with the candidate, kills an in-flight update after pacman mutates packages, checks conservative recover, rolls back to a signed snapshot, and records phase-one success. Second boot asserts package version, ledger, cleared journals, and snapshot pin survived shutdown.

CI gains mandatory vm-e2e (QEMU, e2fsprogs, full workspace build, bash harness/vm/run); the final fan-in gate now requires it and uploads target/vm-results (logs and binary hashes, not fixture keys). PLAN.md and harness/ docs describe the suite as separate from snapshot promotion; hk.pkl lints the new shell scripts.

Reviewed by Cursor Bugbot for commit 67ffcc9. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: baebebda-05b4-4fd9-9cdd-48914b3f92b0

📥 Commits

Reviewing files that changed from the base of the PR and between 42b8fd8 and 67ffcc9.

⛔ Files ignored due to path filters (1)
  • hk.pkl is excluded by !**/*.pkl
📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • PLAN.md
  • harness/README.md
  • harness/vm/README.md
  • harness/vm/bootstrap
  • harness/vm/guest
  • harness/vm/run

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jdx
jdx force-pushed the codex/boot-acceptance branch from a76ea20 to 2a58e21 Compare September 5, 2026 18:07

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread harness/vm/bootstrap
@jdx jdx changed the title ci: exercise package lifecycle and recovery across real VM boots test(vm): boot upgrade and recovery acceptance scenarios Sep 5, 2026
@jdx
jdx force-pushed the codex/boot-acceptance branch from 2a58e21 to c57d364 Compare September 5, 2026 18:17
@jdx
jdx force-pushed the codex/boot-acceptance branch from c57d364 to 1b6ecc8 Compare September 5, 2026 18:23
@jdx
jdx force-pushed the codex/boot-acceptance branch from 1b6ecc8 to 3e30296 Compare September 5, 2026 18:27

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3e30296. Configure here.

Comment thread harness/vm/run Outdated
@jdx
jdx force-pushed the codex/boot-acceptance branch from 3e30296 to 582e724 Compare September 5, 2026 18:36
@jdx
jdx force-pushed the codex/boot-acceptance branch from 582e724 to bd5b135 Compare September 5, 2026 18:50
@jdx
jdx force-pushed the codex/boot-acceptance branch 2 times, most recently from 1ca8063 to ce6db58 Compare September 5, 2026 18:58
@jdx
jdx force-pushed the codex/boot-acceptance branch 2 times, most recently from 2c7d69d to ef94b79 Compare September 5, 2026 19:27
@jdx
jdx force-pushed the codex/boot-acceptance branch from ef94b79 to 9756a27 Compare September 5, 2026 19:50
@jdx
jdx force-pushed the codex/boot-acceptance branch from 9756a27 to d8c7133 Compare September 5, 2026 20:02
Base automatically changed from codex/rebuild-comparison to main September 5, 2026 20:03
@jdx
jdx force-pushed the codex/boot-acceptance branch from d8c7133 to 67ffcc9 Compare September 5, 2026 20:03
@jdx
jdx merged commit 34cc036 into main Sep 5, 2026
11 checks passed
@jdx
jdx deleted the codex/boot-acceptance branch September 5, 2026 20:11
@jdx jdx mentioned this pull request Sep 5, 2026
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