Skip to content

Fix Modal cleanup after app settings change - #3568

Merged
ymichael merged 1 commit into
mainfrom
bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs
Sep 12, 2026
Merged

Fix Modal cleanup after app settings change#3568
ymichael merged 1 commit into
mainfrom
bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

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

@ymichael
ymichael force-pushed the bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs branch from 5529f41 to 33f9654 Compare September 12, 2026 04:38
@ymichael
ymichael merged commit 6ddbfae into main Sep 12, 2026
16 checks passed
@ymichael
ymichael deleted the bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs branch September 12, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant