Repository navigation
Serve every organization from the Cloudflare installation runtime - #274
Merged
Merged
Conversation
A Cloudflare installation runs one runtime Worker for all organizations, but app operations recorded an organization-level runtime. An organization without one received the release bundled with the control plane at its first operation, and later installation runtime updates never changed it. The Worker also had to bundle the full runtime release for that path. Cloudflare app operations now record the installation organization's applied runtime and fail until a deployment has installed it. Only the Node distribution passes its bundled release to the agent job service, so the Cloudflare Worker no longer contains a runtime release. A migration clears the unused organization-level selections on Cloudflare; agent-backed organizations keep their own runtime.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 34ceb9d | Nov 21 2026, 06:53 PM |
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.
A Cloudflare installation runs one runtime Worker for all of its organizations. App operations nevertheless recorded an organization-level runtime: an organization without one received the release bundled with the control plane at its first operation, and installation runtime updates never changed it afterwards. The recorded value did not affect which code served the app, because activation already checks the version the runtime Worker reports. To support that path, the Cloudflare Worker bundled the full runtime release — twice, because the SvelteKit output and the Workflow entrypoints each included a copy.
Changes:
ensureOrganizationRuntimetakes the bundled release as a parameter.runtime-node.tspassesloadBundledRuntime; the Cloudflare composition does not. Agent job claims were already rejected for Cloudflare execution, so no Worker code path imports the release any more.0036clearsruntimeandapplied_runtimefor Cloudflare organizations other than the installation organization. Agent-backed organizations and the installation organization keep their selections.docs/architecture.mdrecords the difference between agent-backed and Cloudflare runtime selection.Agent-backed installations are unchanged: each organization keeps its own selection, the first app job installs the bundled release, and
widefleet runtime updatestays the explicit upgrade path.Cloudflare Worker size, measured with
pnpm build:cloudflareandwrangler deploy --dry-run:worker.jsThis supersedes #262, which removed only the duplicate copy.
Validation:
RUN_CLOUDFLARE_TESTS=1 vitest run apps/control-plane/tests/cloudflare: 253 of 253 pass. The workerd tests now record the installation runtime in their setup, as a Hosted deployment does.runtime-errors.integration.test.ts, which fails identically onmainlocally without a built Node server.ensureOrganizationRuntimewithout a bundled release requires an explicit installation; the migration clears only Cloudflare organizations other than the installation.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Cloudflare app operations now record the installation’s applied runtime instead of selecting a separate release for each organization.
No actionable issues were found.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Node["Node composition"] --> Bundle["Bundled release loader"] Bundle --> Agent["First agent app job"] Hosted["Hosted deployment"] --> Installation["Installation applied runtime"] Installation --> Cloudflare["Cloudflare app operations for every organization"] Cloudflare --> Ready["Activation checks the serving Worker's release"]Reviews (1) · Last reviewed commit: "Serve every organization from the Cloudf..." · Reviewed by Greptile