@@ -46,10 +46,9 @@ export function scrubManagedDeployBuildMarkers(env: NodeJS.ProcessEnv): NodeJS.P
4646 * top-level config this flow provisions + preflights. Scrubbed from every child env
4747 * and fenced in the project dotenv (see below), on top of the provisioner's transport
4848 * scrub/fence which owns the endpoint-redirect + `CLOUDFLARE_ENV` vars:
49- * - `WRANGLER_CI_OVERRIDE_NAME` — wrangler 4.131 applies it AFTER config load
50- * (`mergeSharedConfigArgs` → `getCIOverrideName()`), REPLACING the upload name, so a
51- * bare `wrangler deploy` uploads a worker whose name the generated-config check never
52- * validated.
49+ * - `WRANGLER_CI_OVERRIDE_NAME` — the Cloudflare tooling (wrangler and the `cf` CLI)
50+ * applies it AFTER config load (`getCIOverrideName()`), REPLACING the upload name, so a
51+ * bare deploy uploads a worker whose name the generated-config check never validated.
5352 * - `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — the CF Vite plugin points the build at an
5453 * ALTERNATE wrangler config, flattening a different binding set into
5554 * `dist/ssr/wrangler.json`.
@@ -60,18 +59,20 @@ const DEPLOY_CONFIG_OVERRIDE_ENV_VARS = [
6059] as const ;
6160
6261/**
63- * The dotenv files wrangler 4.131 reloads into `process.env` (`override: true`) for
64- * the orchestrator's `--env=` calls (`getDefaultEnvFiles("")`), so a repo dotenv here
65- * would resurrect `WRANGLER_CI_OVERRIDE_NAME` at the DEPLOY step after the child-env
66- * scrub removed it.
62+ * The dotenv files wrangler loads into `process.env` (`override: true`) when no
63+ * `--env` is named (`getDefaultEnvFiles("")`). Void runs its deploy steps through the
64+ * `cf` CLI, not wrangler, but this set is kept for a user who runs `wrangler deploy` on
65+ * the same config. It also covers the `.env` / `.env.local` files `cf` reads. A repo
66+ * dotenv here would bring back `WRANGLER_CI_OVERRIDE_NAME` after the child-env scrub
67+ * removed it.
6768 */
6869const DEPLOY_WRANGLER_DOTENV_FILES = [ '.env' , '.env.local' , '.env.' , '.env..local' ] ;
6970
7071/**
7172 * The dotenv files Vite's `loadEnv(mode, …)` reads for a production `vite build`
7273 * (`.env`, `.env.local`, `.env.production`, `.env.production.local`), where the CF Vite
7374 * plugin picks up `CLOUDFLARE_ENV` / `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — a set
74- * DISJOINT from wrangler's `--env=` files, so it is fenced separately for the build.
75+ * that differs from the wrangler dotenv files above , so it is fenced separately for the build.
7576 */
7677const DEPLOY_VITE_DOTENV_FILES = [ '.env' , '.env.local' , '.env.production' , '.env.production.local' ] ;
7778
@@ -133,7 +134,7 @@ export function findWranglerCiOverrideDotenvFile(
133134 * FAIL CLOSED when the project's dotenv files declare a deploy-time config-override
134135 * selector. wrangler / Vite reload dotenv on every command, so a repo dotenv would
135136 * reintroduce a scrubbed var AFTER the child-env scrub — reselecting the upload worker
136- * name (wrangler `--env=` files) or the build's wrangler config (Vite production files).
137+ * name (the wrangler dotenv files) or the build's wrangler config (Vite production files).
137138 * The provisioner's transport fence ({@link assertNoTransportRedirectInProjectDotenv})
138139 * owns `CLOUDFLARE_ENV` + the endpoint-redirect vars; this closes the deploy-specific
139140 * name/config-path selectors it does not cover, across BOTH consumers' file sets.
@@ -143,7 +144,7 @@ export function assertNoConfigOverrideInProjectDotenv(
143144 root : string ,
144145 platform : NodeJS . Platform = process . platform ,
145146) : void {
146- // WRANGLER_CI_OVERRIDE_NAME reaches the DEPLOY step via wrangler's `--env=` dotenv reload.
147+ // WRANGLER_CI_OVERRIDE_NAME reaches a deploy through the wrangler dotenv reload.
147148 const ciOverrideFile = findWranglerCiOverrideDotenvFile ( root , platform ) ;
148149 if ( ciOverrideFile ) {
149150 throw new Error (
@@ -154,7 +155,7 @@ export function assertNoConfigOverrideInProjectDotenv(
154155 ) ;
155156 }
156157 // CLOUDFLARE_ENV / CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH reach the BUILD via Vite's
157- // production `loadEnv`, whose file set is disjoint from wrangler's `--env=` files.
158+ // production `loadEnv`, whose file set differs from the wrangler dotenv files.
158159 for ( const file of DEPLOY_VITE_DOTENV_FILES ) {
159160 const offender = findDotenvDeclaration (
160161 root ,
0 commit comments