You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ddbfae
Browse filesBrowse the repository at this point in the historyBrowse files
Fix Modal cleanup after app settings change (#3568)
## Human comments
## What was wrong
After Modal creates a sandbox but saving its resource checkpoint fails,
cleanup has only the allocation key. Reconciliation looked in the
currently configured app, so changing App Name could make cleanup report
success while leaving the original sandbox running. This affects the
cleanup path introduced in #3274.
## What changed
Find sandboxes across apps in the current Modal environment using the
existing `bbMachineKey` tag, terminate every match, and verify removal
by sandbox ID. Enumeration and termination failures remain retryable.
The change stays inside the Modal plugin and requires no new stored
fields, migration, core changes, or protocol changes.
## How you verified
- The cross-app regression failed before the fix and passes afterward.
Tests cover duplicate matching allocations, unrelated sandboxes,
repeated cleanup, and enumeration/termination failures followed by
retry.
- `pnpm exec turbo run test typecheck prepare:bundled lint
--filter=bb-plugin-environment-modal-sandbox` passed, including 52
tests.
- A local probe exercised the actual cleanup route with migrated SQLite
and an injected checkpoint failure. An installed-SDK probe verified tag
filtering without an app filter and pagination. Both used simulated
external compute; no live Modal API calls were made.
> AGENT GENERATED
0 commit comments