Repository navigation
Freeze organizations moving to v2 - #2337
Merged
Merged
Conversation
RhysSullivan
added this pull request to stack #2339
October 23, 2026 01:06
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 8156ec9 | Commit Preview URL Branch Preview URL |
Oct 23 2026, 02:09 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 8156ec9 | Oct 23 2026, 02:09 AM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Writes, OAuth completion and OAuth token refresh are refused for an organization whose org_moved_to_v2 row is moving or moved (423 Locked; 503 when the state cannot be read). The dashboard of a moved organization redirects to its v2 page. Toolkit connections forwarded to v2 are now named per member. The executor asks the host's write gate before a write transaction opens and carries the verdict into it, never asking from inside one: the gate reads on its own connection, which a single-session database would not serve while the transaction holds the request's. Migration 0022 adds v2_org_slug and the rolled_back state, and grants v1_import_writer its access when the role exists. For a role created after the migration has run: GRANT INSERT, UPDATE ON org_moved_to_v2 TO v1_import_writer; GRANT SELECT (org_id, state, v2_org_id, v2_org_slug) ON org_moved_to_v2 TO v1_import_writer;
RhysSullivan
force-pushed
the
rhys/v1-move-freeze
branch
from
October 23, 2026 01:58
f84e954 to
8fe46f4
Compare
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.
Summary
v1 now acts on the
org_moved_to_v2flag that v2 writes (from #2287) for every move state:movingfreezes the organization. Dashboard, API and CLI writes, connection writes, OAuth completion and OAuth token refresh fail with "This workspace is moving to Executor v2. Changes are paused until the move finishes." (423,Retry-After: 60). MCP calls keep working on the frozen state.movedrefuses writes for good, keeps the MCP forwarding from Forward MCP requests of organizations moved to v2 #2287, and redirects the organization's dashboard (for its members) to/org/<v2_org_slug>on v2.rolled_back, or no row, behaves as before.The flag is read on every guarded request and never cached. If the read fails, the write is refused with a retryable 503. Nothing falls back to "not moving".
workspaceWriteGatein the SDK executor covers every caller, including MCP sessions: connection, policy, integration and OAuth client writes,oauth.completebefore the code exchange, and token refresh before the token endpoint is called. Further guards cover account routes, domains, billing (except Autumn's read routes) and organization deletion.v2_org_slugand therolled_backstate. It grantsv1_import_writerINSERT and UPDATE on the table, plus SELECT on(org_id, state, v2_org_id, v2_org_slug), only if the role exists. If the role is created later, run:v1-+ SHA-256 of[v2OrgId, toolkitRowId, accountId], first 40 hex characters.Known gaps:
POST /executionsare not frozen.Verification
bun run format:checkbun run lintbun run typecheckvitest runfor cloud, sdk, api, execution and the MCP host. The new tests are in the PR above this one.Checklist