Repository navigation
Commit 021a21c
committed
fix(agentenv): review hardening, SmolVM default, managed egress
Addresses the bot review findings that verified against current code.
SmolVM is the default everywhere again; AgentENV is strictly opt-in via
PRELOOP_VM_BACKEND. Auto-selection is gone along with the PATH probe it
needed.
Debug attach: claim() resumes the guest before writing ACTIVE or spawning
the heartbeat, so a failed resume can no longer strand a ghost heartbeat;
`preloop debug --export` holds the same attach guard as verdict, REPL, and
shell instead of reaching suspended sandboxes unguarded.
Provider lifecycle: start() records the sandbox id before readiness probes
run so provisioning-error cleanup can actually delete the VM (with an
ensure_volumes helper that also closes the resume path skipping
unmaterialized volumes); fork() rejects duplicate clone names instead of
orphaning; stop() cancels the TTL keepalive only on success; the keepalive
retries transient failures before giving up; Restricted/DNS/zero-storage
specs are rejected at create time instead of silently substituted.
Pool: on-demand slots apply the packed-disabled fallback like warm slots,
and a loopback PRELOOP_RUNNER_URL with the AgentENV backend fails pool
startup with the fix (loopback is the guest itself there).
The engine manages its own egress exception (crates/preloop-cli/src/
aenv_egress.rs): with the AgentENV backend selected, pool startup reconciles
the surgical node deny-list complement and the ordered host firewall rules
from the runner URL — verify first, mutate only on drift, restart `aenv`
only on config change. Narrow sudoers scope, dry-run and opt-out modes,
ENGINE_IP/CONFIG overrides, and unit-tested complement math; operator docs
in docs/vm-substrates.md.
Also corrects a sudoless-base test to assert the best-effort chown the
wrapper actually emits (the /var/lib path it named exists nowhere in the
codebase — flagged as a follow-up, not silently "fixed").1 parent 0db191d commit 021a21c
8 files changed
Lines changed: 804 additions & 59 deletions
File tree
- crates
- preloop-cli/src
- preloop-orchestrator/src
- preloop-vm/src
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
| |||
0 commit comments