Commit 26b4be0
fix(sandbox): set source.prebuilt:true when restoring from org snapshot
Caught during the hit-case smoke test against a real recoupable org
repo: with a snapshot found and `baseSnapshotId` plumbed in, the
sandbox boot still fell through to a fresh `git clone`, which then
failed with exit 128. Reason: I'd dropped the `prebuilt` source flag
from the port, calling it "informational." It is not.
Reading lib/sandbox/vercel/sandbox/VercelSandbox.ts, the flag switches
between two distinct boot paths:
- `source && baseSnapshotId && !source.prebuilt` → fresh clone on top
of snapshot (often fails for private repos and defeats the warm-boot
benefit)
- `source?.prebuilt && baseSnapshotId` → `git fetch` + `git reset --hard`
against the repo that's already inside the snapshot (the fast path)
Setting `prebuilt: !!orgSnapshotId` matches open-agents' behavior and
unlocks the actual ~75s warm-boot win this PR exists to enable.
Tests updated: existing assertions for hit-case extended to also
verify `source.prebuilt === true` when a snapshot is found, and
`source.prebuilt === false` when the lookup misses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 25e4b78 commit 26b4be0
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| 227 | + | |
224 | 228 | | |
| 229 | + | |
| 230 | + | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
0 commit comments