Repository navigation
fix(sandbox): bun run sandbox refuses in one line instead of reporting an unhandled exception (MMR-590) - #512
Conversation
…g an unhandled exception (MMR-590) Operator-facing conditions in packages/sandbox threw plain Error, so Loom reported each one as a foreign-throw defect with a code frame and a stack. They now throw SandboxError (a Loom FatalError, exit 1) or SandboxUsageError (exit 2 for malformed options and IDs). verify, upgrade, and run check that the sandbox exists before recording to it, and restore names a missing configuration, snapshot directory, or snapshot.
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 16 minutes. View limit details
Comment |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
bun run sandbox destroy <unknown-id>printed a fullUNHANDLED EXCEPTIONreport with a code frame, a stack trace, and a hint aimed at the CLI's author, all to say the sandbox doesn't exist. Every operator-facing condition inpackages/sandboxbehaved this way, because they threw plainErrorand Loom treats a foreign throw as a defect.They now throw a Loom failure class, so Loom prints the sentence and exits:
SandboxError(aFatalError, exit 1) covers refusals and failed subprocesses.InterruptedErrorand skill-eval'sSafetyErrornow extend it.SandboxUsageError(exit 2) covers malformed options, sandbox IDs, and snapshot IDs.verify,upgrade, andrunused to crash on an unknown UUID insiderecord(). They now check that the sandbox exists first, sharing the guard withdestroy.restorenames a missing.dev/sandbox.json, snapshot directory, or snapshot instead of raising a bare ENOENT.Tests:
main.test.tsspawns the real CLI and checks for a one-line refusal with noUNHANDLED EXCEPTIONand the right exit codes.workflow.test.tscovers the unknown-sandbox and missing-snapshot refusals.bun run verifypasses.Made with Claude Opus 5.5 in Claude Code.