feat(workspaces): Add switchable repository workspaces - #1420
Open
sentry-junior[bot] wants to merge 28 commits into
Open
feat(workspaces): Add switchable repository workspaces#1420sentry-junior[bot] wants to merge 28 commits into
sentry-junior[bot] wants to merge 28 commits into
Conversation
Co-Authored-By: David Cramer <david@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
marked this pull request as ready for review
August 11, 2026 16:48
Abort in-flight sandbox acquires on switch, roll recipe state back if the new boot fails, and store explicit checkout paths so multi-repo workspaces cannot collide.
Durability handlers were coercing null to undefined before thread-state persist, so failed workspace switches left stale sandbox/workspace ids.
Workspace profiles now hash baseHash + recipe and build by booting the cached base dependency snapshot, then running prepare. Base busts still invalidate workspace snapshots because the base hash is in the key. Co-Authored-By: immutable dcramer <david@sentry.io>
Key workspace snapshots by the resolved base snapshot id, refresh same-id recipes when their profile changes, and document the owning lifecycle rules. Co-Authored-By: immutable dcramer <david@sentry.io>
Resolve the 0025 migration collision by keeping main's MCP credential subject migration and renumbering workspaces to 0026. Co-Authored-By: immutable dcramer <david@sentry.io>
Idempotent switchWorkspace must no-op on matching recipe even when the provider session is cold, or it clears sandboxRef and boots a fresh sandbox.
The workspace migration is now 0026 after main claimed 0025, so the scheduled-task SQL adoption test expects 11 migrated core migrations.
dcramer
reviewed
Aug 11, 2026
Keep main's migration snapshot byte-identical; the trailing newline change was merge noise unrelated to workspaces.
Capture prepareWorkspace recipes by value, restore cold durable sandbox hints on failed switch, and omit isPrimary from snapshot profile hashes.
After aborting an in-flight acquire, stop any session remembered while awaiting that promise, not only the pre-await previous sandbox.
When an aborted acquire still reports a durable sandbox ref, clear that hint after stopping the late session so switch boots the target fresh.
Bare rejects.toThrow() failed lint under --deny-warnings.
Co-Authored-By: David Cramer <david@sentry.io>
Share the reserved root names with cloneRepository and fail workspace prepare before cloning into skills, data, or .junior. Co-Authored-By: David Cramer <david@sentry.io>
Defer stopping the previous session until the replacement is ready so a cancelled or failed switch can put the live sandbox back.
Member
|
alright lets rebase this agian. we've changed a bunch of the core stuff in main |
# Conflicts: # packages/junior/migrations/meta/0027_snapshot.json # packages/junior/migrations/meta/_journal.json # packages/junior/src/chat/agent/tools.ts # packages/junior/src/chat/tools/types.ts
Preserve workspaceId and profile hash on SandboxRef restore when the workspace recipe row cannot be loaded, instead of silently stripping the association on the next report.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7c65823. Configure here.
Forward the acquire AbortSignal into prepareWorkspaceSnapshot so long setup scripts stop when a workspace switch or turn is cancelled.
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.

Closes #1417.
Adds the first workspace vertical slice:
listWorkspacesandswitchWorkspacethrough the core tool registry.AGENTS.mdselection.Workspace switches replace the live sandbox. Conversation history remains intact. GitHub snapshot preparation uses a bounded installation token and does not put the token in command arguments.
Requested by David Cramer.
--
View Junior Session [Sentry]