mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-01 02:04:24 +00:00
The live Daytona tests create a provider sandbox and delete it on their last line, so any panic or failed assertion before that line leaks a running, billed sandbox. Two leaked that way on 2026-09-14 when a sandbox-driver decoder flake panicked daytona_playwright_mcp_sandbox_transport. Add fabro_sandbox::test_support::DeletedOnDrop, a guard that owns the RunSandbox (Deref keeps the tests reading unchanged), offers an explicit delete(self) for the happy path, and deletes from Drop otherwise. The drop-time delete runs on its own thread and runtime because the test's runtime may be unwinding. It reconnects the provider through the ProviderAccess the test built the sandbox with, because the sandbox's own handle pools HTTP connections whose tasks live on the test's runtime; a live check of that path timed out after 10s. Every Daytona test that creates a sandbox now holds it through the guard. Unit tests over the scripted double prove delete-on-drop runs once, an explicit delete runs once, and a panic inside catch_unwind still deletes with and without a runtime. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| apps | ||
| components | ||
| foundation | ||
| packages/fabro-api-client | ||