You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Persist, reattach, and reconcile session microVM lifecycles #532
A session owns one durable microVM environment generation that can be detached and reattached across harness restarts, and can be deleted/reconciled without leaks or accidental empty-environment recreation.
Scope
Add an internal provisioning/lifecycle manager without widening tool.Environment into a service locator.
Define and persist the environment state machine from reservation through worktree preparation, artifact verification, VM readiness, session persistence, attachment, detachment, stop, deletion, and tombstone.
Make creation idempotent and rollback provisional resources if session persistence fails.
Resolve the exact persisted ref/generation at run entry; never recreate an empty VM or fall back to local.
Define detach versus suspend/stop versus permanent delete.
Add durable cleanup/reconciliation for host or daemon crashes, PID reuse, stale sockets, stale worktrees, child environments, and partial deletion.
Apply per-user/deployment quotas for booting/active VMs, CPU, RAM, disk/inodes, execs, forks, image pulls, and boot rate.
Acceptance
Restarting mecated or microvmd reattaches the exact valid environment generation or fails with an actionable precondition error.
Unknown, foreign, stale, destroyed, incompatible, or mismatched refs never create replacement state.
CloseSession detaches and leaves the session reattachable; explicit deletion eventually removes VM resources and session worktree according to preservation rules.
Crashes at every lifecycle transition converge without leaked VMs, sockets, worktrees, quotas, or deletion of another environment.
Two daemon processes racing the same ref cannot both own it.
Cleanup paths are canonical-base-confined and never derive recursive-delete authority from model/caller text.
Activity