Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ jobs:
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy
# --env="" tells wrangler explicitly to use the top-level config
# (the production environment in this repo's multi-env shape).
# Without it, wrangler 4.x warns about ambiguity even though
# bare `deploy` does the right thing.
command: deploy --env=""
6 changes: 5 additions & 1 deletion registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,11 @@ tools:
description: CLI for Cloudflare Workers

- name: cf
repo: cloudflare/workers-sdk
# The Tech Preview npm package ships pre-bundled and declares no
# `repository` field. `cf` is NOT in cloudflare/workers-sdk despite
# being from the same team. Until Cloudflare discloses the source
# repo, the project link points at the npm distribution page.
url: https://www.npmjs.com/package/cf
binary: cf
language: TypeScript
tier: workhorse
Expand Down
7 changes: 5 additions & 2 deletions scripts/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ bun run build
bold '==> bun test'
bun test

bold '==> bun x wrangler deploy --dry-run'
bun x wrangler deploy --dry-run
bold '==> bun x wrangler deploy --dry-run (production env)'
bun x wrangler deploy --dry-run --env=""

bold '==> bun x wrangler deploy --dry-run (staging env)'
bun x wrangler deploy --dry-run --env staging

bold '==> Pack-README drift check'
bun scripts/generate-pack-readme.mjs site --check </dev/null
Expand Down
21 changes: 21 additions & 0 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,27 @@
// `agentnative-site-sandbox`.
"name": "agentnative-site-staging",
"workers_dev": true,
// CRITICAL: explicitly override `routes` to an empty array. Per the
// wrangler config docs, `routes` is an INHERITABLE key — if absent
// here, env.staging silently inherits the top-level
// `routes: [{ pattern: "anc.dev", custom_domain: true }]`. That
// inheritance is what produced the routing-drift bug observed since
// 2026-04-30: every `wrangler deploy --env staging` was re-attaching
// anc.dev to the staging Worker because env.staging was inheriting
// the prod route. Explicit empty array breaks the inheritance.
// Removing this line will reintroduce the bug. See the CHANGELOG /
// PR description for the full investigation.
"routes": [],
// PROPHYLACTIC: same inheritance footgun as `routes` above. `triggers`
// (cron) is an INHERITABLE key. If a future change adds cron schedules
// at the top level (e.g., a daily registry refresh on the production
// Worker), env.staging would silently inherit them and double-fire
// every scheduled invocation. We don't currently have any crons, but
// setting `triggers.crons` to an empty array here makes the staging
// override explicit, so a future cron addition forces a deliberate
// decision about whether to mirror to staging. Same audit pattern
// applied to all inheritable keys at top-level.
"triggers": { "crons": [] },
"containers": [
{
"class_name": "Sandbox",
Expand Down
Loading