Fix Modal cleanup after app settings change - #3568
Merged
ymichael merged 1 commit intoSep 12, 2026
Merged
Conversation
ymichael
force-pushed
the
bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs
branch
from
September 12, 2026 04:38
5529f41 to
33f9654
Compare
ymichael
deleted the
bb/fixer-preserve-original-modal-scope-for-uncertai-thr_k3ntgtpmcs
branch
September 12, 2026 04:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
bbMachineKeytag, 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
pnpm exec turbo run test typecheck prepare:bundled lint --filter=bb-plugin-environment-modal-sandboxpassed, including 52 tests.