Skip to content

Replace Tart VM infrastructure with direct macOS host testing#26

Merged
fullstackjam merged 1 commit intomainfrom
claude/review-e2e-testing-strategy-0qfh3
Apr 19, 2026
Merged

Replace Tart VM infrastructure with direct macOS host testing#26
fullstackjam merged 1 commit intomainfrom
claude/review-e2e-testing-strategy-0qfh3

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

What does this PR do?

Replaces the Tart-based VM testing infrastructure with direct execution on ephemeral macOS hosts (GitHub Actions runners). Removes 298 lines of SSH/VM orchestration code and replaces it with a simpler 126-line MacHost helper that runs commands directly on the current system.

Why?

The Tart VM approach had several limitations:

  • Required Cirrus CI for parallel VM execution (not available in GitHub Actions)
  • Added complexity with SSH key setup, IP polling, and VM lifecycle management
  • Slower feedback loop due to VM boot/clone overhead
  • Difficult to debug test failures in isolated VMs

GitHub Actions macos-latest runners are ephemeral and can be safely destroyed after tests, making them ideal for destructive E2E tests. This change:

  • Simplifies the test infrastructure significantly
  • Enables E2E tests to run in GitHub Actions on release tags
  • Removes the need for Cirrus CI entirely
  • Maintains the same test coverage with less operational complexity

The new MacHost helper provides the same API as the old TartVM (Run, RunWithEnv, RunInteractive, CopyFile, Destroy) but operates directly on the host. Tests are protected by environment checks (CI=true or OPENBOOT_E2E_DESTRUCTIVE=1) to prevent accidental execution on developer machines.

Testing

  • All E2E tests updated to use NewMacHost() instead of NewTartVM()
  • Test helpers (vmInstallHomebrew, vmCopyDevBinary, etc.) updated to work with the new interface
  • TestVM_Infra simplified to validate host readiness instead of VM infrastructure
  • GitHub Actions workflow updated with new macos-e2e job that runs on release tags
  • Cirrus CI configuration removed (no longer needed)
  • Makefile targets updated with clearer documentation about destructive nature

Notes for reviewer

  • The MacHost API is intentionally compatible with the old TartVM interface to minimize test changes
  • vmInstallHomebrew() now skips installation if Homebrew is already present (GitHub Actions runners ship with it)
  • Tests will skip gracefully on developer machines unless OPENBOOT_E2E_DESTRUCTIVE=1 is set
  • The expect(1) integration for interactive tests is preserved and works identically
  • All E2E tests maintain their original test names and structure for CI/CD compatibility

https://claude.ai/code/session_01Dg8nibLFZGKmeYgfUBQrsA

@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

Cirrus CI was gated on `only_if: $CIRRUS_CRON` and the repo has no paid
credits, so the ~900 lines of Tart-based L5 tests have never run. Replace
the VM wrapper with a MacHost helper that exec's directly against the
host, and trigger it from the free GitHub Actions macos-latest runner on
release tags / workflow_dispatch.

- testutil/tartvm.go -> testutil/machost.go: drop SSH/scp/expect-over-SSH
  and the tart clone/boot/destroy lifecycle; require CI=true or
  OPENBOOT_E2E_DESTRUCTIVE=1 to activate so local `go test -tags=e2e,vm`
  is a no-op rather than a foot-gun.
- test/e2e/: rename TartVM -> MacHost across call sites; relax bare-system
  assumptions that no longer hold on a GH runner (brew is preinstalled,
  common CLI tools may be); make vmInstallHomebrew idempotent.
- Drop .cirrus.yml; add macos-e2e workflow job gated on release tags /
  workflow_dispatch.
- Makefile: trim the test-vm-release -run regex to tests that actually
  exist; reword comments to reflect destructive-host semantics.
- CLAUDE.md / CONTRIBUTING.md: update L5 references.

https://claude.ai/code/session_01Dg8nibLFZGKmeYgfUBQrsA
@fullstackjam fullstackjam force-pushed the claude/review-e2e-testing-strategy-0qfh3 branch from 2adf8c0 to 6221b18 Compare April 19, 2026 08:35
@github-actions github-actions bot added tests Tests only ci CI/CD changes docs labels Apr 19, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit a614015 into main Apr 19, 2026
9 checks passed
@fullstackjam fullstackjam deleted the claude/review-e2e-testing-strategy-0qfh3 branch April 19, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD changes docs tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants