Skip to main content

Decision

The target toolchain for active Worker-backed apps and services is cf + Void. Adopt it per verified operation. Preserve existing commands and configuration until authentication, target identity, bindings and migrations, emitted artifacts and rollback parity are established. Wrangler remains for recorded gaps with an owner and removal condition. The shrink-only usage guard requires structured admission for expansion, changed Wrangler lines, or changed gap scope. This page refines the cf adoption gates in Oxc and Cloudflare adoption. A merged tooling switch is CI-verified, not production-delivered: every deploy target change still needs the gated production workflow, exact-commit evidence and the cutover checklist below.

Toolchain shape

The Void SDK is not applied to native Workers. Void’s supported app types are Void apps, meta-frameworks and static sites, so a native fetch/scheduled/Durable Object Worker would have to be rewritten into Void’s routes and crons model. For publication, Void’s own Cloudflare deploy converts the emitted config into a cf Build Output and calls cf deploy --prebuilt. Native Workers emit that format directly, so they share Void’s publication path without its runtime layer. The stable Vite plugin (1.64) already supports cloudflare.config.ts and Build Output emission; the 2.0 beta is not required. Loading cloudflare.config.ts requires Node.js (not Bun). The cf package requires Node ^22.23 || ^24.22 || ^26.12. The cf/Void Wrangler-exit lane owns the cf@1.0.0-beta.20 pin. Upgrade through a scoped dependency PR after checking upstream release notes and rerunning config/output parity, credential-free artifact checks, secret handling, settings readback fixtures and real Worker CI tests on the candidate version. DO publication remains Wrangler until a disposable migration rehearsal and a separate reviewed publisher change. Renovate holds cf prerelease pins via the cf package rule in renovate.json; update this hold only with the qualified upgrade PR. Do not float this beta pin automatically.

Operation parity matrix

Checked against installed cf 1.0.0-beta.20 source/help and @cloudflare/vite-plugin 1.64.0. Command availability below does not establish live authentication, resource identity or production acceptance for every caller. The existing native profiles qualify only their declared configuration fields.

Void emitted runtime qualification

The native cf/Vite runtime harness accepts cloudflare.config.ts or cf Build Output under .cloudflare/output/v0. It does not accept Void’s sealed dist/server/wrangler.json artifact. Mastermind retains an isolated unstable_startWorker acceptance fixture under the void-emitted-runtime gap with bundling and entrypoint processing disabled, disposable bindings, intercepted JWKS egress and denied provider authentication. Its pinned runtime dependency is covered by the same gap; cache ignores and source-audit exclusions are data-only shared-toolchain references. PR #7301 records the admission, exact usage counts and digests in the usage allowlist. Retire this gap only when a qualified cf/Void runner accepts the same sealed artifact and preserves the fixture’s host, owner, session and bilingual rendering assertions, secret isolation and egress controls without rebuilding or publishing. This qualification does not admit production publication, DNS or Access changes.

Capability limits before replacing a caller

cf workers types --no-include-runtime skips the runtime declaration generator; its default can start workerd through Miniflare. The command discovers typed config by filename, so replacing a legacy types --config <emitted-config> invocation requires config and declaration-consumer migration, including the global interface. cf dev can delegate to Wrangler’s new-config implementation. Detected Vite projects use the package manager’s Vite command; use the owning vp dev script to preserve Vite+. cf build can delegate too, and cf deploy --dry-run can build unless --prebuilt is supplied. None is a universal replacement for legacy JSONC. Treat cf d1 migrations list as potentially mutating: migration preparation can issue CREATE TABLE IF NOT EXISTS for its history table before listing it. It is unsuitable for a read-only production inventory. No replacement for every Wrangler SQL file/export operation has been qualified. R2 object and KV key API commands exist, but require explicit bucket/namespace identifiers and verification of byte output, metadata, TTL, pagination and local state. cf logs query and cf o11y telemetry query do not establish live-tail parity. Keep the existing commands until their exact caller contracts pass. The configuration normalizer compares live DO classes/storage, not historical migration tags or module bytes. Its current binding mappings cover text, JSON, secrets and DOs; assets, AI, R2, D1, KV, services and email triggers need explicit profiles. The retained publication adapter separately enforces the original v1 history and exact module inventory. Preserve both gates and unknown-field rejection.

Calendar emitted binding types

Calendar’s ASSETS-only profile uses calendar-cf-types.mjs after its existing emitted-artifact validator. The helper creates a disposable literal typed config and runs the owning pinned cf workers types --no-include-runtime on a supported Node executor. It never loads a Worker module, environment file or credential. The self-contained cloudflare-env.d.ts comes from an ASSETS-only template; cf output checks that template rather than supplying the declaration text. A new binding requires changing the template and validator together. The cf-inferred binding and template must have the exact required ASSETS key and Fetcher type, with no any. During CI qualification the existing producer remains an explicit reference oracle; the same checks apply to its declaration. Additional resources, vars, secrets and named environments remain rejected by the existing artifact profile. Only after declaration parity and unchanged hashes for the bundle, assets, emitted config and deploy pointer does the helper atomically replace cloudflare-env.d.ts. Exclusive directory custody serializes supported generators through comparison and replacement; an existing lock fails closed. Detected edits and partial, empty or symlinked producer output preserve prior declarations. This is cooperative publication custody; do not edit the destination during generation. Its disposable config is removed; the output remains self-contained when the sealed artifact is restored. The JSON receipt records source/tool versions and before/after artifact digests. Local cf:typegen requires a qualified existing build; it does not build or publish. Exact-head CI must run the real cf CLI and the retained reference producer. Fixture tests exercise failure handling and the real TypeScript proof; they do not establish supported-runtime cf execution on an older local Node. Read declaration and receipt inputs through an opened regular-file descriptor; verify its inode/device against the named file before reading. Path checks alone leave a replacement race. Keep supplier-dependent fixtures and restored copies under apps/calendar/tmp. Copying the workspace manifest into repository-level tmp does not install its dependencies there; Bun’s isolated layout resolves cf and its type imports through the owning Calendar workspace. Test that layout without a root-hoisted cf package.

Calendar Build Output qualification

Paired .js.map/.mjs.map files remain hashed in the source seal and listed in excludedServerMetadata; they are not executable modules or copied upload files. Orphan maps remain rejected. Source-map upload semantics remain unqualified. calendar-cf-output.mjs copies the sealed Calendar ESM bundle and client assets into an isolated cf Build Output tree, retaining relative paths and exact bytes. The native build also emits hashed CSS and Noto Sans fonts under dist/server/assets. The Vite manifest must list each server static file, and its name must have an approved .css or .woff2 extension and build hash. These files go to the static assets output, never the executable module manifest. Their bytes must match the source seal; a file also present under dist/client must have identical bytes. Orphan, unhashed and unknown server files still stop emission. It validates the output with the config and reader suppliers resolved from the owning pinned cf installation. The complete module manifest is checked against all copied files; supplier schema acceptance alone does not prove coverage. Qualification is mostly self-referential: cf’s side is only schema parsing and readBuildOutput, rather than an independently emitted upload comparison. .assetsignore, _headers and _redirects are copied as plain assets; their control-file semantics remain unqualified and are identified in parity.json. Vite metadata and the source configuration remain covered by the source seal, while unqualified server maps or non-ESM files stop emission. The existing exact-source CI runs this comparison before Worker runtime checks, verifies unchanged source bytes afterward, and verifies a same-run restored copy. Transport the comparison as a tar archive: direct artifact upload drops empty directories, which remain part of the verified inventory. List and validate archive members before extraction; reject absolute paths, .. components and links, and extract with --no-same-owner. Its receipt records source/config supplier identity, all output hashes, excluded metadata and the unqualified account/publication state. This helper never invokes the deployment CLI or loads a Worker, environment file or credential. Keep existing publishers and validation commands. cf adds ./ to secondary upload module names where the current publisher uses bare relative names. Byte-preserving emission does not establish upload-name equivalence, routing/asset semantics or hosted runtime parity. A separate isolated, network-denied cf dry-run and module resolution rehearsal must close those gaps before a publisher switch; cf dry-run has no emitted-upload output flag. Do not treat it as an upload byte comparison.

Native Worker template

Applied to Cron Control, Devbox Control and Coordination. Each migrated Worker has:
  • cloudflare.config.ts, generated by cf migrate --no-install and reviewed. Durable Object migrations become exports: { Class: exports.durableObject({ storage: 'sqlite' }) } for every live class.
  • vite.config.ts with cloudflare({ experimental: { newConfig: { cfBuildOutput: true } } }), no configPath, explicit preview URL and observability/log settings, loopback dev server settings, persistState under a disposable directory for runtime tests (normal dev uses .cloudflare/state), and the Worker environment’s build.sourcemap: false (Wrangler did not upload source maps).
  • Scripts: dev: vp dev (host/port in vite.config.ts), build: vp build, type-check: cf workers types && tsc. cf is an exact devDependency; the app-level wrangler devDependency is removed.
  • A parity baseline in scripts/ci/fixtures/cf-worker-parity/<app>.json, normalized from the final wrangler.jsonc. scripts/ci/cf-worker-parity.test.mjs compares cloudflare.config.ts with it, and CI compares the emitted Build Output after the build with node scripts/ci/cf-worker-parity.mjs apps/<app> scripts/ci/fixtures/cf-worker-parity/<app>.json.
  • The workflow validates, runs the runtime checks on source and on the emitted Build Output, dry-runs cf deploy --prebuilt, then uploads .cloudflare/output as the exact-commit artifact. The gated deploy job downloads that artifact and publishes it without rebuilding. For DO Workers, cf-wrangler-publication.mjs validates the same emitted bundle against wrangler.publish.jsonc, retains its original v1 history and emits a Wrangler no_bundle publication config. Both credential-free publisher checks run in CI. Production has no cf deploy branch; enabling one needs a separate reviewed change with the disposable migration/data-retention rehearsal receipt.
@cloudflare/vite-plugin 1.x still depends on the Wrangler library internally. That is a library dependency, not CLI usage; it disappears with plugin 2.x. The DO publication adapter excludes exactly bundle/.vite/manifest.json from module inventory. This Vite metadata is not a Worker module. Other undeclared files and symlinked metadata still fail qualification. After building in CI, run CF_PUBLICATION_TEST_APP=coordination node --test scripts/ci/cf-wrangler-publication.runtime.mjs (and select devbox-control for that app) against the real emitted output. The test requires Vite’s manifest, preserves module bytes and applied v1 migrations, and rejects unexpected metadata and symlinks. CF_PUBLICATION_TEST_ROOT can select an extracted exact-commit CI artifact tree; never commit the built bundles.

Rollback

Rollback cannot cross a Durable Object lifecycle change. Secret changes can block rollback; inspect the error before using --bypass-deployment-checks. Retained CI artifacts (<app>-worker-<sha>) allow re-publishing an exact earlier build. The local harness rejects .dev.vars* and .env* files in both the app root and working directory (template .example files are allowed). Every declared secret needs a nonempty disposable fixture. Undeclared/control-key fixtures are rejected, and declared text vars are masked from the shell before process-env loading. It restores the first prior environment value after startup failure or close. cf-vite-worker.test.mjs covers both source and artifact modes using a disposable Vite fixture; real Worker runtime acceptance remains a CI gate. Each run allocates a private temporary persistence directory, keeps it through Worker restarts and deletes it on close or startup failure. The app Vite configs consume only the harness-owned CF_VITE_TEST_PERSIST_PATH override; ordinary development retains its usual state.

Wrangler usage guard

node scripts/ci/wrangler-usage.js prints the inventory. The guard scans tracked files, including executables under plugins/, .agents/ and tmp/; Markdown, text, lockfiles and binary assets are excluded. Ignored/untracked tmp/ files are not an inventory: executable files there enter the guard only when tracked. .md, .mdx and .txt are documentation exclusions in every directory; commands embedded in those files need normal review, since the guard does not parse executable documentation examples. It counts mention lines and all Wrangler token occurrences conservatively, including comments and strings. A SHA-256 digest also covers each file’s Wrangler lines (all content for config files), so same-count substitutions require admission. Lower or remove counts when usage falls. An admitted record must be { "decision": "https://github.com/tutur3u/platform/pull/<id>", "reason": "<specific reviewed change>" }. New entries, growth, changed digests and changed gap scope need a fresh record; reverting a migration follows the same rule. Compatibility references need admission too: cache policies must still recognize legacy declaration producers and scratch directories, and cleanup exclusions must retain local state until its owning toolchain is retired. These references do not invoke the CLI; replacing their names with cf would change their safety coverage. Use the existing shared-toolchain gap for scratch/state policy references and producer-inventory for declaration-producer detection, with exact counts, digests and the admitting PR decision. Remove each reference only with its covered usage. CI compares the allowlist with its base commit (HEAD^1 of the pull request merge ref) and fails if that commit is unavailable. Current gaps: cf-config-internals (installed cf API names), deployment-source-compatibility (historical Worker snapshot provenance), paused-runtime (retained paused runtimes), opennext-adapter, void-wave1-publication, pending-migration (services awaiting their parity PR), shared-toolchain (root CLI provider, trusted-dependency and policy files), parity-tooling (the migration parity checker, which reads former Wrangler configs), do-publication-rehearsal (Wrangler publication of existing DO migration tags), and producer-inventory (native-check declaration-producer detection and its data-only fixture; no CLI invocation). The latter recognizes both legacy and cf types producers and is removed when legacy recognition is no longer needed.

Service inventory

Colab local Worker preview

Run bun run --cwd apps/colab preview to serve the Worker and source UI on 127.0.0.1:8795. The UI’s separate 7835 dev proxy remains available. vite.worker.config.ts reuses the UI’s React/Tailwind plugins and source alias, replaces its proxy with the local Worker, and reads the existing service configuration through the Cloudflare Vite plugin. It preserves the plugin’s default local persistence path, disables remote bindings and leaves the UI build and production publisher intact. HMR stays disabled so React cannot inject an inline refresh preamble rejected by the Worker’s production CSP. Cloud AI calls are outside this local-only scope. The Colab workflow exercises the actual preview config after its UI build: health and session responses, signed-out workshop denial and foreign-origin rejection. It also requests HTML, transformed client imports and compiled Tailwind CSS so an API-only pass cannot hide a broken UI. It uses disposable signing/persistence fixtures, refuses local credential files, and restores the process environment and removes only its own state on close. Types, release Build Output, DO migration history and publisher cutover remain separate gates; do not rename those commands based on this development change.

Settings preflight token permissions

The deploy token must cover the pinned account and every zone in that account. The settings snapshots require these Cloudflare API token permissions in addition to the publication permissions: Grant zone visibility for all zones in the target account. Limiting visibility to the expected hostname’s zone can hide unexpected routes and cannot establish route parity. Do not grant unrelated accounts. These requirements apply to COLAB_CLOUDFLARE_API_TOKEN and to COORDINATION_CLOUDFLARE_API_TOKEN when supplied instead of the fallback. Keep values in GitHub secrets; never attach token values to receipts. Actual token scope remains unverified until the bounded read-only preflight succeeds. Missing access, truncated lists and unsupported account size fail before publication; do not bypass that gate to deploy. Drift-relevant list snapshots (secrets, domains, zones and routes) follow locally constructed page URLs for at most eight pages of at most 50 entries each, sharing the unchanged 28-request snapshot budget. They reject repeated pages, inconsistent pagination metadata and incomplete reported totals. The 20-zone account limit still applies. Settings-object endpoints retain their full object even if the envelope includes list metadata; result_info.total_pages alone does not imply that an object was truncated. Pagination failures name the same safe request display path as HTTP failures. Regression coverage lives in scripts/ci/cf-worker-settings.test.mjs. Deployment history is an explicit exception to list completeness. The deployment API defines the first deployment as the one currently serving traffic. Read only the first page and retain that deployment’s id and complete version/percentage split for rollback. Historical deployments and their pagination totals do not describe current settings and are not captured. A missing first deployment, non-first page, missing versions, duplicate version ids or traffic percentages that do not total 100 fail closed; never substitute an older deployment. This uses one request inside the same 28-request budget. Domain, route and secret completeness and exact schedule comparison remain required. The twenty-page history and missing-active regressions cover this exception. Recovery requires a production commit containing the fixed script. Planner deploy jobs check out the triggering production SHA; re-running an older failed run retains its old script even after a fix merges into main. Promote the approved fix, then inspect the new planner run and its gated production migration result. Each snapshot phase first logs Cloudflare API token fp:<12 hex> status <status> from /user/tokens/verify (or the account-owned token endpoint); this diagnostic cannot fail the job. The fingerprint is the first 12 hex of sha256(id), computed only for a well-formed 32-hex token id (otherwise fp:<invalid>); the raw id is never printed because it is response-derived. A failed read prints its HTTP status, numeric Cloudflare error codes and a request path built only from the pinned account, the Worker name and zone ordinals (/zones/<zone #n>/workers/routes), so a 403 shows which token and zone lack access. Diagnostics never print response-derived text (error messages, bodies, zone names or IDs, JSON parse errors or assertion diffs of live values). The status prints only when it is a known value, and binding names only when the baseline already declares them (others print as <undeclared binding #n>). Undeclared text or Durable Object bindings fail before they are recorded; undeclared secret bindings are tolerated because their values are never read. The CLI prints only its own assertion messages and the name of any other error. To identify the token, hash each candidate id from the Cloudflare dashboard token list (printf %s <id> | shasum -a 256 | cut -c1-12) and compare before changing the GitHub secret. Cloudflare documents the accepted permissions for Worker secrets, deployments, custom domains, zones and routes.

Secret inventory from settings snapshots

Coordination’s existing before/after settings capture verifies the required COORDINATION_TOKEN name against its recorded identity. Each snapshot already performs one bounded secret-name GET on the pinned account and Worker. Reuse its secrets array for the workflow’s explicit token gates instead of issuing a second CLI request. Require array shape and membership; keep both checks fatal, keep the after check after publication, and retain the private settings receipts. No secret values are captured. The original migration-tag publisher stays in place. cf-worker-settings.test.mjs exercises the actual Coordination profile, one read per phase, and missing-token rejection before and after publication.

Deployment account variable

Set the non-secret Actions repository variable CLOUDFLARE_ACCOUNT_ID in tutur3u/platform (Settings → Secrets and variables → Actions → Variables). Use the account ID recorded in the service’s cloudflare.config.ts and parity baseline; the deploy job checks it against the emitted artifact. One repository variable supplies cron-control-production, devbox-control-production and coordination-production. If any of those environments defines the same variable, it must have the same value because the environment value takes precedence. Missing or mismatched configuration blocks deployment. Source publication does not provision this variable; the release owner must set it before promotion.

Cached Build Output

The root Turbo build.outputs includes .cloudflare/output/**, including hidden Vite metadata. Cache hits must restore the complete emitted tree before parity, runtime and publication checks. .cloudflare/state remains outside the output scope. cf-build-output-cache.test.mjs runs a disposable emit-only task through an actual cache miss and hit, verifies restored bytes and execution count, and checks the old output list as a negative control. It never compiles an app or uses shared/remote cache credentials.

Production cutover checklist

For each service, the orchestrator verifies before promotion:
  1. Exact-commit CI on the promoted SHA is green for the service workflow, including: source runtime checks, emitted Build Output parity (cf-worker-parity.mjs prints matches <worker> deployment identity), emitted runtime checks, the cf deploy --prebuilt --dry-run --no-provision step, and the uploaded <app>-worker-<sha> artifact.
  2. The production job publishes that artifact with cf deploy --prebuilt (no rebuild) and the same --message SHA.
  3. The deploy job runs cf-worker-settings.mjs before before any publication or secret mutation, then after before recording success. It checks the pinned account, compatibility, preview URLs, observability/logs, cron schedules and declared secret names; snapshots routes/custom domains and hashes remaining settings without persisting text bindings. It captures the active deployment and version IDs (cf workers deployments list) as the rollback target. Also capture cf workers get <name>, cf workers secrets list and, with the Cloudflare API, the script’s cron schedules (/workers/scripts/<name>/schedules), routes or custom domains, and workers.dev/preview URL state. The job captures them again after deployment and compares; unexplained changes fail the job before its success marker. Evidence is retained even on failure. This route-free pilot supports at most 20 account zones and one API list page, uses at most 28 GET requests per snapshot, and fails closed on missing read permissions, truncated results or unsupported scope. It never retries writes. The expected preview setting is explicitly true; this is unverified against current production until the preflight runs. A mismatch stops before mutation. To change crons, text vars or Durable Objects, the parity baseline records a reviewed transition (decision ID and fields, limited to crons, vars, durableObjects and durableObjectClasses) from previousIdentity (live) to identity (the emitted artifact). Every other identity field must be equal and every declared field must change. before reads once and must match exactly one stage, verifying text values (digest only, differing names in errors) and Durable Object bindings; unreviewed binding attributes such as environment or dispatch_namespace fail. A Worker matching neither stage fails closed. after must match the target. On the first publication only the settings hash, bindings and schedules may change; once live already matches the target, settings must stay unchanged. Storage classes are verified on the artifact, not read back live. Remove the transition in a follow-up change after production matches the target.
  4. Production publication for Devbox Control and Coordination remains Wrangler with their applied v1 migration metadata. A separate reviewed change must carry the rehearsal receipt before enabling cf publication. For these Workers, rehearse the first cf deploy on a disposable Worker created with the same Wrangler migration history and data, and confirm object data survives the switch to exports. Do not promote until that rehearsal passes.
  5. Health checks pass on the canonical host, and the deployment marker records the SHA.
  6. If a check fails, roll back with cf workers deployments create to the captured version, then reconcile before retrying.