Skip to content

fix(docs): worker:dev keeps its remote AI and KV bindings (#367) - #370

Merged
baldurpan merged 3 commits into
mainfrom
367-workerdev-runs-wrangler-with-local-which
Nov 25, 2026
Merged

baldurpan merged 3 commits into
mainfrom
367-workerdev-runs-wrangler-with-local-which

Conversation

@baldurpan

Copy link
Copy Markdown
Contributor

Closes #367

What changed

  • docs/package.json: worker:dev no longer passes --local. In wrangler 4 that flag runs dev with remote bindings off, so remote = true on [ai] and DOX_USAGE was ignored. dev:local and dev:local:watch call worker:dev, so they get the fix too.
  • docs/worker/README.md, docs/worker/wrangler.toml: the reason given for remote = true no longer mentions --local. Both now warn against adding the flag back, and the README says what the bindings table should show.
  • context/verify.md: the line about running the Worker now points to worker:dev and no longer to wrangler dev --local.
  • context/stack.md:39 and the README's other "remote in dev" lines needed no edit. They are accurate now.

Verification

  • Gate 1: every command in context/verify.md exited 0: check, typecheck (both), build, docs:build, worker:bundle-check, docs:audit-dist, test, docs:test. The test step ran 1657 docs tests. After the review edits, which were docs only, lint was run again and passed.
  • Manual: pnpm --filter docs run worker:dev printed:
    env.DOX_USAGE (65578568775d46ca8b24fff3cf78406c)      KV Namespace      remote
    env.AI                                                AI                remote
    
  • Gate 2: reviewer subagent, PASS WITH NOTES. Nothing blocking. The notes on verify.md:94 and line wrapping are fixed in this PR. One note is not acted on: nothing fails if --local is added back. Only the comments guard against it.

Release note

None. Only docs/** and context/** change, and context/release.md says those owe no note.

`wrangler dev --local` in wrangler 4 disables remote bindings, so the
`remote = true` on `[ai]` and `DOX_USAGE` was ignored and the local Dox
chat could not reach Workers AI. Drop the flag; the bindings table now
reads `env.AI  AI  remote` and `env.DOX_USAGE  KV Namespace  remote`.
Correct the docs that gave `--local` as the reason for `remote = true`.

Closes #367

@baldurs-reviewer baldurs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-reviewer: minor issues

Drops --local from worker:dev so wrangler 4 honours remote = true on the AI and DOX_USAGE bindings, and rewrites the README, wrangler.toml comment and verify.md line to match. The fix is correct, and the docs edits are accurate. One gap remains: without --local, the dev Worker now needs Cloudflare credentials to start its remote bindings, and the Local development prerequisites still don't say so.


Reviewed 2b10605 for baldurpan · claude-opus-5-5 · 4 files · $0.17

Comment thread docs/package.json Resolved

@baldurs-reviewer baldurs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-reviewer follow-up: looks good

Since the last review, the branch documents that worker:dev (and dev:local*) now needs Cloudflare credentials, in docs/README.md, docs/worker/README.md and .env.local.example, and explains how to run without account access by removing the [ai] block and the KV block's remote = true. That answers the one open point, and the author checked the logged-out failure mode against wrangler 4.152.0. I found nothing further, and the PR looks ready to merge.

Earlier comments


Reviewed 8e5fb3a (changes since 2b10605) for baldurpan · claude-opus-5-5 · 3 files · $0.06

@baldurpan
baldurpan merged commit 3f66233 into main Nov 25, 2026
1 check passed
@baldurpan
baldurpan deleted the 367-workerdev-runs-wrangler-with-local-which branch November 25, 2026 12:00
This was referenced Nov 25, 2026
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.

worker:dev runs wrangler with --local, which disables the remote AI and KV bindings

1 participant