Skip to content

Add safe mode recovery for sandbox crashes#3558

Open
fangyi-zhou wants to merge 1 commit into
facebook:mainfrom
fangyi-zhou:sandbox-crash-fix
Open

Add safe mode recovery for sandbox crashes#3558
fangyi-zhou wants to merge 1 commit into
facebook:mainfrom
fangyi-zhou:sandbox-crash-fix

Conversation

@fangyi-zhou
Copy link
Copy Markdown
Contributor

@fangyi-zhou fangyi-zhou commented May 23, 2026

Summary

Quick follow up from #3539 regarding sandbox crashes, vibed coded a crash helmet called "safe mode"

  • add a sandbox-specific crash fallback with a safe-mode recovery button
  • preserve the user's sandbox files while safe mode pauses wasm-backed type checking
  • add a resume action and results-panel messaging for paused type checking

Test Plan

  • yarn test sandbox --runInBand
  • python3 test.py --no-test --no-conformance --no-jsonschema
  • built and served the production website locally with the generated wasm artifacts
Screen.Recording.2026-05-23.at.01.14.12.mov

The sandbox crash fallback could leave users trapped when the same persisted code immediately crashed wasm again after retrying. Add a sandbox-specific recovery path that keeps the user's files but pauses Pyrefly type checking so the crashing input can be edited.

The fallback stores a session-scoped safe-mode flag, the sandbox skips wasm initialization and recheck while that flag is set, and the UI offers an explicit resume action once the user is ready to type check again.
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 26, 2026

@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D106426615.

Copy link
Copy Markdown
Contributor

@kinto0 kinto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants