Skip to content

feat(environments): allocate virtual machines by group or session - #246

Merged
KaiEureka merged 8 commits into
mainfrom
codex/vm-isolation-pools
Oct 24, 2026
Merged

KaiEureka merged 8 commits into
mainfrom
codex/vm-isolation-pools

Conversation

@KaiEureka

@KaiEureka KaiEureka commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Adds vm-group and vm-session providers for existing Linux guests. Stable resource IDs and SQLite transactions coordinate allocation across controllers sharing a lease database. Session allocation proceeds concurrently, capacity waiting is cancellable, and nested exhaustion produces an explicit error.

The pool reuses candidate workspaces and Git snapshot transfer, exports candidate artifacts, then performs configured guest reset before releasing its lease. Unknown execution and failed export or reset retain the resource for recovery. VM resource and connection configuration share adapters/vm_config.py and are assembled through bootstrap/vm.py.

Independent review repaired retry recovery for the candidate capture controller. Lost replies during capture or post-export cleanup now recover before the next release attempt. Active candidate commands retain cancellation semantics, while unresolved operations retain their lease.

Validation includes independent controllers competing for resources, two real Linux VMs, group and session workspaces, binary Git patches, submodules and symlinks, complete exports, reset recovery, both lost-reply stages and cancellation of an unbounded command. The VM lifecycle fixes from #245 are included. #247 exposes these providers through the SDK and CLI.

Keep cancellation type, lease ownership and subsequent acquisition checks on all supported Python versions. Match the forwarded message on Python 3.11 and later, where asyncio documents propagation to task awaiters. Native 3.10 and 3.11 control probes confirm this runtime difference.
@KaiEureka
KaiEureka marked this pull request as ready for review October 24, 2026 10:42
Base automatically changed from codex/vm-ssh-environments to main October 24, 2026 14:20
@KaiEureka
KaiEureka merged commit ce2c427 into main Oct 24, 2026
14 checks passed
@KaiEureka
KaiEureka deleted the codex/vm-isolation-pools branch October 24, 2026 14:20
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