fabro/lib/components
Bryan Helmkamp 3b8d712edb
Delete a live Daytona test's sandbox even when the test panics
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>
2026-09-14 11:01:24 -06:00
..
fabro-acp Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
fabro-automation Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-checkpoint Merge remote-tracking branch 'origin/main' into remove/run-metadata-branches 2026-09-12 16:28:01 -06:00
fabro-dump Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-environment Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-github Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
fabro-graphviz Merge pull request #686 from fabro-sh/fix/space-separated-node-classes 2026-07-29 22:31:48 -04:00
fabro-hooks Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
fabro-install Open sandbox provider identity to plugin kinds 2026-09-09 15:17:32 -06:00
fabro-interview refactor: remove duplicated review target rendering and validation 2026-07-28 15:14:23 -04:00
fabro-llm Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
fabro-manifest Contain the selected workflow file instead of pre-walking the checkout 2026-09-12 11:48:21 -06:00
fabro-mcp Take MCP servers from pebble 2026-09-11 19:26:41 -06:00
fabro-mcp-store refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-sandbox Delete a live Daytona test's sandbox even when the test panics 2026-09-14 11:01:24 -06:00
fabro-slack fix: stop a pipe in a link label from splitting Slack link markup 2026-07-28 15:31:20 -04:00
fabro-store Remove tests and fixtures tied to retired manifest fields 2026-09-13 08:55:55 -06:00
fabro-tool Simplify run creation to registered workflow versions 2026-09-12 11:04:15 -06:00
fabro-tracker refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-validate Answer catalog questions with the lithos catalog queries 2026-09-10 09:26:40 -06:00
fabro-variable refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-workflow Delete a live Daytona test's sandbox even when the test panics 2026-09-14 11:01:24 -06:00
fabro-workflow-version Share workflow packaging results and validation across callers 2026-09-12 10:15:42 -06:00