Skip to content

Restore split Workers with scoped CI identities and preserved chat state - #1394

Merged
tannerlinsley merged 13 commits into
mainfrom
taren/production-worker-split
Oct 17, 2026
Merged

tannerlinsley merged 13 commits into
mainfrom
taren/production-worker-split

Conversation

@tannerlinsley

Copy link
Copy Markdown
Member

Restore separate site, chat, OG, and starter Workers while keeping one TanStack Start app. Cloudflare Builds credentials are scoped to the matching Worker, so sibling Wrangler commands cannot inherit the main site's name override and deploy over it.

Production's active chat namespace IDs and workflow ID are preserved. The three extra namespaces created during the failed rollout now live in a private recovery Worker with their original implementations and storage. Routine deploys reject state transfers, validate all destinations and credentials before uploading, and restore the previous site version if live page checks fail.

Validation:

  • Actual Cloudflare Builds and authenticated account, isolation, CSRF, logout, and WorkspaceSync checks passed on the separate staging fleet and Neon database.
  • Production deployed with the full Builds name, tag, and account context. Homepage, Query, Router, and Start docs passed; browser navigation had no errors or chat requests.
  • Production OG/README PNGs, MCP metadata, starter discovery and in-memory compile passed. Unauthenticated chat and deployment endpoints returned their expected 401 responses.
  • All six namespace IDs and the workflow ID match the pre-rollout snapshot. A disposable transfer test preserved both its namespace ID and stored data.
  • Production build and final full test suite passed: 576 unit tests, 2,270 chat tests, and 20 desktop tests. Five deployment regression tests cover CI scoping, wrong destinations, missing credentials, missing account context, and rollback.

The saved production session was expired before rollout, so signed-in production flows were not retested. Signed-in checks used synthetic accounts and separate credentials in staging. No production schema migration or CDN purge was needed for this rollout.

@tannerlinsley
tannerlinsley requested a review from a team October 17, 2026 00:00
@changeset-bot

changeset-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4ae2494

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 344 files, which is 194 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2913de83-3e26-4653-bc5a-4bd7d9d2f29e
📥 Commits

Reviewing files that changed from the base of the PR and between 9ab080e and 4ae2494.

📒 Files selected for processing: 344
  • .gitignore
  • docs/docs-html-cache-experiment.ts.txt
  • docs/docs-performance-measurements.json
  • docs/docs-performance-spike.md
  • docs/docs-production-performance-measurements.json
  • docs/worker-cold-start-investigation.md
  • docs/worker-cold-start-measurements.json
  • docs/worker-cold-start-probes/README.md
  • docs/worker-cold-start-probes/measure.py.txt
  • docs/worker-cold-start-probes/probe.js.txt
  • docs/worker-cold-start-probes/rebundle.mjs.txt
  • docs/worker-deployment-boundaries.md
  • docs/worker-split-measurements.json
  • docs/worker-split-production-validation.json
  • docs/worker-split-validation.md
  • harness-tests/core/catalog-detail-http.test.ts
  • harness-tests/core/chat-entrypoints.test.js
  • harness-tests/core/chat-file-route.test.ts
  • harness-tests/core/chat-mcp-route.test.ts
  • harness-tests/core/chat-model-route.test.ts
  • harness-tests/core/chat-plugin-route.test.ts
  • harness-tests/core/chat-runtime-headers.test.ts
  • harness-tests/core/chat-skill-route.test.ts
  • package.json
  • scripts/build-worker-staging-baseline.mjs
  • scripts/chat-isolation-vite.ts
  • scripts/check-worker-staging-auth-browser.mjs
  • scripts/check-worker-staging-auth.mjs
  • scripts/deploy-cloudflare.mjs
  • scripts/deploy-worker-staging.mjs
  • scripts/measure-worker-staging.py
  • scripts/prepare-worker-staging.mjs
  • scripts/provision-worker-staging-db.mjs
  • scripts/seed-worker-staging.ts
  • scripts/worker-isolation-vite.ts
  • src/application-starter/api/http/compile-attributed.ts
  • src/application-starter/api/http/compile.ts
  • src/application-starter/api/http/deploy/check-name.ts
  • src/application-starter/api/http/deploy/github.ts
  • src/application-starter/api/http/download.ts
  • src/application-starter/api/http/feature-artifacts.ts
  • src/application-starter/api/http/features.ts
  • src/application-starter/api/http/load-remote-addon.ts
  • src/application-starter/api/http/load-remote-template.ts
  • src/application-starter/api/http/load-template.ts
  • src/application-starter/api/http/resolve.ts
  • src/application-starter/api/http/routes.ts
  • src/application-starter/api/http/suggest.ts
  • src/application-starter/api/http/validate.ts
  • src/application-starter/api/request-boundary.server.ts
  • src/chat/components/AppRoute.tsx
  • src/chat/components/ChatShellRoute.tsx
  • src/chat/components/projects/Loading.tsx
  • src/chat/server/entries.ts
  • src/chat/server/http/api/chat/account/composer-drafts/$accountId.$scope.ts
  • src/chat/server/http/api/chat/account/devices.ts
  • src/chat/server/http/api/chat/account/onboarding.ts
  • src/chat/server/http/api/chat/account/preferences.ts
  • src/chat/server/http/api/chat/activity.ts
  • src/chat/server/http/api/chat/app-version.ts
  • src/chat/server/http/api/chat/bootstrap.ts
  • src/chat/server/http/api/chat/bot-drafts/$id.files.$fileId.content.ts
  • src/chat/server/http/api/chat/bot-drafts/$id.files.$fileId.ts
  • src/chat/server/http/api/chat/bot-drafts/$id.files.ts
  • src/chat/server/http/api/chat/bot-drafts/$id.ts
  • src/chat/server/http/api/chat/bots.ts
  • src/chat/server/http/api/chat/bots/$id.$operation.ts
  • src/chat/server/http/api/chat/bots/$id.files.$fileId.content.ts
  • src/chat/server/http/api/chat/bots/$id.files.$fileId.ts
  • src/chat/server/http/api/chat/bots/$id.files.ts
  • src/chat/server/http/api/chat/bots/$id.ts
  • src/chat/server/http/api/chat/bots/bulk.ts
  • src/chat/server/http/api/chat/bots/move.ts
  • src/chat/server/http/api/chat/connection.ts
  • src/chat/server/http/api/chat/conversations/$id.$operation.ts
  • src/chat/server/http/api/chat/conversations/$id.execution.snapshots.$snapshotId.ts
  • src/chat/server/http/api/chat/conversations/$id.files.$fileId.content.ts
  • src/chat/server/http/api/chat/conversations/$id.files.$fileId.ts
  • src/chat/server/http/api/chat/conversations/$id.files.ts
  • src/chat/server/http/api/chat/conversations/$id.workflow-runs.$runId.cancel.ts
  • src/chat/server/http/api/chat/conversations/$id.workflow-runs.$runId.ts
  • src/chat/server/http/api/chat/conversations/$id.workflows.$workflowId.ts
  • src/chat/server/http/api/chat/conversations/$id/files/import.ts
  • src/chat/server/http/api/chat/conversations/$id/memories.ts
  • src/chat/server/http/api/chat/conversations/$id/memories/$memoryId.ts
  • src/chat/server/http/api/chat/conversations/$id/references.ts
  • src/chat/server/http/api/chat/copies/$id.ts
  • src/chat/server/http/api/chat/device-transport.ts
  • src/chat/server/http/api/chat/draft.ts
  • src/chat/server/http/api/chat/files.ts
  • src/chat/server/http/api/chat/kody/account.ts
  • src/chat/server/http/api/chat/kody/callback.ts
  • src/chat/server/http/api/chat/kody/community.ts
  • src/chat/server/http/api/chat/kody/community/$listingId.ts
  • src/chat/server/http/api/chat/kody/connect.ts
  • src/chat/server/http/api/chat/kody/jobs/$jobId/enabled.ts
  • src/chat/server/http/api/chat/kody/mail/inboxes.ts
  • src/chat/server/http/api/chat/kody/mail/messages.ts
  • src/chat/server/http/api/chat/kody/mail/messages/$messageId.ts
  • src/chat/server/http/api/chat/kody/memories.ts
  • src/chat/server/http/api/chat/kody/memories/$memoryId.ts
  • src/chat/server/http/api/chat/kody/memories/$memoryId/apply.ts
  • src/chat/server/http/api/chat/kody/memories/$memoryId/review.ts
  • src/chat/server/http/api/chat/kody/memories/create/apply.ts
  • src/chat/server/http/api/chat/kody/memories/create/review.ts
  • src/chat/server/http/api/chat/kody/packages/$packageId/document.ts
  • src/chat/server/http/api/chat/kody/resources/$kind.ts
  • src/chat/server/http/api/chat/kody/runs.ts
  • src/chat/server/http/api/chat/kody/runs/$runId.ts
  • src/chat/server/http/api/chat/kody/runs/$runId/triage.ts
  • src/chat/server/http/api/chat/kody/servers.ts
  • src/chat/server/http/api/chat/kody/servers/$serverId/check.ts
  • src/chat/server/http/api/chat/kody/servers/$serverId/enabled.ts
  • src/chat/server/http/api/chat/kody/servers/$serverId/reconnect.ts
  • src/chat/server/http/api/chat/kody/sync.ts
  • src/chat/server/http/api/chat/kody/unlink.ts
  • src/chat/server/http/api/chat/kody/usage.ts
  • src/chat/server/http/api/chat/mcp/$.ts
  • src/chat/server/http/api/chat/mcp/contract.ts
  • src/chat/server/http/api/chat/model-options.ts
  • src/chat/server/http/api/chat/models.ts
  • src/chat/server/http/api/chat/openrouter/callback.ts
  • src/chat/server/http/api/chat/plugins.ts
  • src/chat/server/http/api/chat/plugins/$id.ts
  • src/chat/server/http/api/chat/policy.ts
  • src/chat/server/http/api/chat/project-snapshots.$hash.quarantine.ts
  • src/chat/server/http/api/chat/project-snapshots.$hash.ts
  • src/chat/server/http/api/chat/project-snapshots.ts
  • src/chat/server/http/api/chat/projects.$id.sync.ts
  • src/chat/server/http/api/chat/projects.$id.ts
  • src/chat/server/http/api/chat/projects.ts
  • src/chat/server/http/api/chat/recipes.ts
  • src/chat/server/http/api/chat/recipes/$id.ts
  • src/chat/server/http/api/chat/references.ts
  • src/chat/server/http/api/chat/references/kody/inspect.ts
  • src/chat/server/http/api/chat/references/kody/refresh.ts
  • src/chat/server/http/api/chat/references/tools/refresh.ts
  • src/chat/server/http/api/chat/retries/$id.prepare.ts
  • src/chat/server/http/api/chat/retries/$id.ts
  • src/chat/server/http/api/chat/sections.ts
  • src/chat/server/http/api/chat/sections/$id.ts
  • src/chat/server/http/api/chat/skills.ts
  • src/chat/server/http/api/chat/skills/$id.ts
  • src/chat/server/http/api/chat/workspace-history.ts
  • src/chat/server/http/api/chat/workspace-index.activity.ts
  • src/chat/server/http/api/chat/workspace-index.ts
  • src/chat/server/http/api/chat/workspace-sync/$operation.ts
  • src/chat/server/http/api/chat/workspace.ts
  • src/chat/server/http/auth/mcp/callback.ts
  • src/chat/server/http/auth/mcp/client-metadata.ts
  • src/chat/server/http/routes.ts
  • src/chat/server/routes/draft.ts
  • src/chat/server/routes/files.ts
  • src/chat/server/routes/mcp/$.ts
  • src/chat/server/routes/models.ts
  • src/chat/server/routes/openrouter/callback.ts
  • src/chat/server/routes/plugins.ts
  • src/chat/server/routes/project-snapshots.$hash.quarantine.ts
  • src/chat/server/routes/project-snapshots.ts
  • src/chat/server/routes/projects.$id.sync.ts
  • src/chat/server/routes/projects.$id.ts
  • src/chat/server/routes/projects.ts
  • src/chat/server/routes/skills.ts
  • src/components/Navbar.tsx
  • src/components/Scarf.tsx
  • src/components/ds/IconographyPage.client.tsx
  • src/db/client.ts
  • src/queries/docsManifest.ts
  • src/router.tsx
  • src/routes/__root.tsx
  • src/routes/_library/$libraryId/$version.docs.$.tsx
  • src/routes/_library/$libraryId/$version.docs.framework.$framework.$.tsx
  • src/routes/admin/chat-access.tsx
  • src/routes/api/application-starter/compile-attributed.ts
  • src/routes/api/application-starter/compile.ts
  • src/routes/api/application-starter/deploy/check-name.ts
  • src/routes/api/application-starter/deploy/github.ts
  • src/routes/api/application-starter/download.ts
  • src/routes/api/application-starter/feature-artifacts.ts
  • src/routes/api/application-starter/features.ts
  • src/routes/api/application-starter/load-remote-addon.ts
  • src/routes/api/application-starter/load-remote-template.ts
  • src/routes/api/application-starter/load-template.ts
  • src/routes/api/application-starter/resolve.ts
  • src/routes/api/application-starter/suggest.ts
  • src/routes/api/application-starter/validate.ts
  • src/routes/api/chat/account/composer-drafts/$accountId.$scope.ts
  • src/routes/api/chat/account/devices.ts
  • src/routes/api/chat/account/onboarding.ts
  • src/routes/api/chat/account/preferences.ts
  • src/routes/api/chat/activity.ts
  • src/routes/api/chat/app-version.ts
  • src/routes/api/chat/bootstrap.ts
  • src/routes/api/chat/bot-drafts/$id.files.$fileId.content.ts
  • src/routes/api/chat/bot-drafts/$id.files.$fileId.ts
  • src/routes/api/chat/bot-drafts/$id.files.ts
  • src/routes/api/chat/bot-drafts/$id.ts
  • src/routes/api/chat/bots.ts
  • src/routes/api/chat/bots/$id.$operation.ts
  • src/routes/api/chat/bots/$id.files.$fileId.content.ts
  • src/routes/api/chat/bots/$id.files.$fileId.ts
  • src/routes/api/chat/bots/$id.files.ts
  • src/routes/api/chat/bots/$id.ts
  • src/routes/api/chat/bots/bulk.ts
  • src/routes/api/chat/bots/move.ts
  • src/routes/api/chat/connection.ts
  • src/routes/api/chat/conversations/$id.$operation.ts
  • src/routes/api/chat/conversations/$id.execution.snapshots.$snapshotId.ts
  • src/routes/api/chat/conversations/$id.files.$fileId.content.ts
  • src/routes/api/chat/conversations/$id.files.$fileId.ts
  • src/routes/api/chat/conversations/$id.files.ts
  • src/routes/api/chat/conversations/$id.workflow-runs.$runId.cancel.ts
  • src/routes/api/chat/conversations/$id.workflow-runs.$runId.ts
  • src/routes/api/chat/conversations/$id.workflows.$workflowId.ts
  • src/routes/api/chat/conversations/$id/files/import.ts
  • src/routes/api/chat/conversations/$id/memories.ts
  • src/routes/api/chat/conversations/$id/memories/$memoryId.ts
  • src/routes/api/chat/conversations/$id/references.ts
  • src/routes/api/chat/copies/$id.ts
  • src/routes/api/chat/device-transport.ts
  • src/routes/api/chat/draft.ts
  • src/routes/api/chat/files.ts
  • src/routes/api/chat/kody/account.ts
  • src/routes/api/chat/kody/callback.ts
  • src/routes/api/chat/kody/community.ts
  • src/routes/api/chat/kody/community/$listingId.ts
  • src/routes/api/chat/kody/connect.ts
  • src/routes/api/chat/kody/jobs/$jobId/enabled.ts
  • src/routes/api/chat/kody/mail/inboxes.ts
  • src/routes/api/chat/kody/mail/messages.ts
  • src/routes/api/chat/kody/mail/messages/$messageId.ts
  • src/routes/api/chat/kody/memories.ts
  • src/routes/api/chat/kody/memories/$memoryId.ts
  • src/routes/api/chat/kody/memories/$memoryId/apply.ts
  • src/routes/api/chat/kody/memories/$memoryId/review.ts
  • src/routes/api/chat/kody/memories/create/apply.ts
  • src/routes/api/chat/kody/memories/create/review.ts
  • src/routes/api/chat/kody/packages/$packageId/document.ts
  • src/routes/api/chat/kody/resources/$kind.ts
  • src/routes/api/chat/kody/runs.ts
  • src/routes/api/chat/kody/runs/$runId.ts
  • src/routes/api/chat/kody/runs/$runId/triage.ts
  • src/routes/api/chat/kody/servers.ts
  • src/routes/api/chat/kody/servers/$serverId/check.ts
  • src/routes/api/chat/kody/servers/$serverId/enabled.ts
  • src/routes/api/chat/kody/servers/$serverId/reconnect.ts
  • src/routes/api/chat/kody/sync.ts
  • src/routes/api/chat/kody/unlink.ts
  • src/routes/api/chat/kody/usage.ts
  • src/routes/api/chat/mcp/$.ts
  • src/routes/api/chat/mcp/contract.ts
  • src/routes/api/chat/model-options.ts
  • src/routes/api/chat/models.ts
  • src/routes/api/chat/openrouter/callback.ts
  • src/routes/api/chat/plugins.ts
  • src/routes/api/chat/plugins/$id.ts
  • src/routes/api/chat/policy.ts
  • src/routes/api/chat/project-snapshots.$hash.quarantine.ts
  • src/routes/api/chat/project-snapshots.$hash.ts
  • src/routes/api/chat/project-snapshots.ts
  • src/routes/api/chat/projects.$id.sync.ts
  • src/routes/api/chat/projects.$id.ts
  • src/routes/api/chat/projects.ts
  • src/routes/api/chat/recipes.ts
  • src/routes/api/chat/recipes/$id.ts
  • src/routes/api/chat/references.ts
  • src/routes/api/chat/references/kody/inspect.ts
  • src/routes/api/chat/references/kody/refresh.ts
  • src/routes/api/chat/references/tools/refresh.ts
  • src/routes/api/chat/retries/$id.prepare.ts
  • src/routes/api/chat/retries/$id.ts
  • src/routes/api/chat/sections.ts
  • src/routes/api/chat/sections/$id.ts
  • src/routes/api/chat/skills.ts
  • src/routes/api/chat/skills/$id.ts
  • src/routes/api/chat/workspace-history.ts
  • src/routes/api/chat/workspace-index.activity.ts
  • src/routes/api/chat/workspace-index.ts
  • src/routes/api/chat/workspace-sync/$operation.ts
  • src/routes/api/chat/workspace.ts
  • src/routes/api/og/{$}[.]png.ts
  • src/routes/api/readme/{$}[.]png.ts
  • src/routes/auth/mcp/callback.ts
  • src/routes/auth/mcp/client-metadata.ts
  • src/routes/chat.c.$conversationId.tsx
  • src/routes/chat.charts.tsx
  • src/routes/chat.new-project.tsx
  • src/routes/chat.p.$hash.tsx
  • src/routes/chat.project.$projectId.tsx
  • src/routes/chat.shared.tsx
  • src/routes/chat.tsx
  • src/routes/chat.w.$workspaceId.b.$botId.tsx
  • src/routes/chat.w.$workspaceId.tsx
  • src/routes/ds.iconography.lazy.tsx
  • src/server.ts
  • src/server/og/og-http.server.ts
  • src/server/og/readme-http.server.ts
  • src/server/runtime/http-route.server.ts
  • src/server/runtime/worker-service.server.ts
  • src/server/scheduled.server.ts
  • src/types/durable-streams.d.ts
  • src/utils/analytics/providers/google.ts
  • src/utils/analytics/scarf.ts
  • src/utils/docs-cache-headers.ts
  • src/utils/docs-html-headers.server.ts
  • src/utils/docs.functions.ts
  • src/utils/docs.ts
  • src/utils/github-content-cache.server.ts
  • src/utils/request-timing.server.ts
  • src/utils/sentry.server.ts
  • src/workers/chat-recovery.ts
  • src/workers/chat.ts
  • src/workers/og.ts
  • src/workers/starter.ts
  • staging/README.md
  • staging/auth-browser.json
  • staging/auth-flows.json
  • staging/baseline.patch
  • staging/browser.json
  • staging/cloudflare-builds.json
  • staging/cloudflare-deployments.json
  • staging/deployments.json
  • staging/measurements.json
  • staging/state-after-rollback.json
  • staging/state-authenticated-stage.json
  • staging/state-before-rollback.json
  • staging/state-final-build.json
  • staging/state-final.json
  • tests/builder-openrouter.test.ts
  • tests/builder-project-quarantine.test.ts
  • tests/chat-entrypoints.test.ts
  • tests/docs-html-headers.test.ts
  • tests/docs-manifest-cache.test.ts
  • tests/github-content-cache.test.ts
  • tests/production-worker-deployment.test.ts
  • tests/request-timing.test.ts
  • tests/worker-boundaries.test.ts
  • tests/worker-deployment.test.ts
  • vite.config.ts
  • workers/chat-recovery/wrangler.jsonc
  • workers/chat/wrangler.jsonc
  • workers/og/wrangler.jsonc
  • workers/starter/wrangler.jsonc
  • wrangler.jsonc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
tanstack-com 4ae2494 Oct 17 2026, 04:38 AM

@tannerlinsley
tannerlinsley merged commit 49219e4 into main Oct 17, 2026
7 of 8 checks passed
@tannerlinsley
tannerlinsley deleted the taren/production-worker-split branch October 17, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant