Commit 9ac0f30
test(sandboxes): aggressive integration suite + fix TTL clamping direction
scripts/test-sandboxes.py — 33-test integration suite hitting a live server:
- wire shape (validation, 404, 400, list, snapshot, ttl clamping)
- multi-turn warmth (turn 2/3 measurably faster than cold turn 1)
- context retention across turns (proves engine memory works)
- 409 BUSY on concurrent chat, then recovery after first turn ends
- DELETE mid-chat returns in <2s without deadlock
- 3 concurrent sandboxes each retain their own private context
- idle TTL reaps when no chat for the configured window
- hard TTL fires even when idle would have kept it alive
- boot_deadline + max_concurrent_429 documented as manual checks
Result against api.clawagent.sh: 33/33 passed.
Fix in resolveSandboxTtl: previously when idle > hard, the code clamped
hard UP to idle (so idle=300s + hard=15s became hard=300s, which made
the hard-TTL test fail and was generally confusing). The correct
semantics, matching the user's intent of "dispose after X idle OR Y total,
whichever fires first": hard cap is the authority, idle clamps DOWN to it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent d4bc022 commit 9ac0f30
2 files changed
Lines changed: 406 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
464 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
465 | 468 | | |
466 | 469 | | |
467 | 470 | | |
| |||
0 commit comments