feat: add smoke-test-aws CLI command with full lifecycle test#72
Merged
Conversation
Add `oa-vm smoke-test-aws` command that runs incremental verification stages against real AWS infrastructure: Read-only stages (default): 1. AWS credentials (STS get_caller_identity) 2. SSH public key (~/.ssh/id_rsa.pub) 3. AMI lookup (latest Ubuntu 22.04 LTS) 4. Instance type availability (find_available_size_and_region) 5. VPC infrastructure (ensure_vpc_infrastructure) Full lifecycle stages (--full): 6. Create VM (m5a.xlarge, $0.17/hr) 7. SSH connectivity (wait_for_ssh + hostname) 8. Stop/Start cycle (deallocate -> start -> verify IP refresh) 9. Cleanup (delete -> verify terminated) Also fixes two bugs in AWSVMManager discovered during testing: - deallocate_vm: now waits for 'stopped' state before returning (previously returned immediately, causing start_vm to fail with IncorrectInstanceState) - delete_vm: now waits for 'terminated' state before returning (previously returned immediately, so callers couldn't verify termination) Tested: 9/9 stages passed on real AWS (us-east-1, ~1m42s total). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Screenshots captured from m5.metal instance in us-east-1: - aws-waa-installing.png: Windows 11 installer at 42% on EC2 - aws-waa-windows-desktop.png: Full Windows 11 desktop with Start menu Proves the full WAA stack works on AWS: EC2 m5.metal → Docker → QEMU/KVM → Windows 11 with all benchmark apps (Notepad, Calculator, Settings, Edge, etc.) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents AWS workflow (smoke-test-aws, pool commands with --cloud aws), m5.metal cost breakdown per phase, and references the Windows 11 screenshot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3bbfb7e to
c1fe30c
Compare
This was referenced Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
oa-vm smoke-test-awscommand that runs incremental verification stages against real AWS infrastructureAWSVMManagerwheredeallocate_vmanddelete_vmreturned before the instance reached its target stateStages
boto3 sts get_caller_identity~/.ssh/id_rsa.pubexists_find_latest_ubuntu_ami()returns valid AMIfind_available_size_and_region()finds offering_ensure_vpc_infrastructure()(idempotent)create_vm("waa-smoke-test", ...)with cheap typewait_for_ssh()+ssh_run("hostname")deallocate_vm()→start_vm()→ verify IP refreshdelete_vm()→ verify instance terminatedStages 6-9 only run with
--full. Usesm5a.xlarge($0.17/hr) not.metal($4.60/hr).Bug fixes in
aws_vm.pydeallocate_vm(): Was returning immediately afterstop_instances()without waiting forstoppedstate. A subsequentstart_vm()would fail withIncorrectInstanceStatebecause the instance was stillstopping.delete_vm(): Was returning immediately afterterminate_instances()without waiting forterminatedstate. Callers couldn't verify the instance was actually gone.Both now use boto3 waiters (
instance_stopped/instance_terminated), matching howstart_vm()already usedinstance_running.Verified: 9/9 stages passed
Full lifecycle test output against real AWS (us-east-1), ~1m42s total:
Usage
Windows 11 running on AWS EC2
Full WAA stack verified on
m5.metalin us-east-1: EC2 → Docker → QEMU/KVM → Windows 11.Windows 11 desktop (fully booted)
Windows 11 installer (mid-install)
AWS cost analysis
Measured costs from this verification session:
m5.metal time breakdown:
For comparison, the read-only smoke test (
oa-vm smoke-test-awswithout--full) costs $0.00 — it only makes API calls, no instances created.Test plan
deallocate_vmbug fix verified (stop/start cycle now works)delete_vmbug fix verified (cleanup completes cleanly)🤖 Generated with Claude Code