Skip to content

[miniflare] Enable local Artifacts in development tools [3/3] - #16186

Draft
leostera wants to merge 15 commits into
cloudflare:mainfrom
leostera:lostera/artifacts-devtools-integration
Draft

leostera wants to merge 15 commits into
cloudflare:mainfrom
leostera:lostera/artifacts-devtools-integration

Conversation

@leostera

@leostera leostera commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Artifacts local-development stack — 3 of 3

Part 3/3; the native Git client (#16176) is merged. This PR depends on 2/3 — opt-in simulator (#16177). This branch is rebased onto the current 2/3 branch, which itself is based on upstream main. Until 2/3 merges, GitHub shows both remaining layers in this PR; to review only the development-tools layer, use the incremental 2/3 → 3/3 comparison. Merge 2/3 first, then restack this PR on main and revalidate its exact head. #16092 is a closed full-stack reference, not another PR to merge.

What changes in this layer

  • Switch omitted remote to local resources across development tools; remote: false stays local and remote: true explicitly selects deployed resources. This is the final default-behavior change, not part of the opt-in simulator PR. Migration guidance and the default switch require owner approval before merging.
  • Integrate and test Artifacts through Wrangler, the Cloudflare Vite plugin, and Workers Vitest, including binding presentation and remote-session routing.
  • Add local-development instructions and a release changeset. The matching public Artifacts docs PR remains draft until SDK behavior and release timing are approved.

Native Git 2.32 or newer on PATH is required only for local mode. Explicit HTTPS imports contact the requested host, including private-network destinations, without following HTTP redirects. No deployed-service parity is claimed.

Validation

  • Built dependencies for Miniflare, Wrangler, Vite, Workers Vitest, and remote bindings.
  • After incorporating review fixes from layers 1 and 2: Miniflare 109 passed, 1 platform-specific test skipped on macOS; Wrangler 42; Vite 2; Workers Vitest 2 — all passed locally. Workers-utils 20 and remote-bindings 5 also passed in the latest focused run. These are focused local results, not exact-head CI.
  • Miniflare build and typecheck, simulator-source type-aware lint and formatting passed after the latest changes. Earlier affected-package typechecks and changeset validation also passed. Exact-head CI and rereview are pending.


Devin Review

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0456450

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
miniflare Minor
wrangler Minor
@cloudflare/workers-utils Minor
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch
@cloudflare/autoconfig Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/containers-shared Patch
@cloudflare/workers-auth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Oct 9, 2026
@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team October 9, 2026 18:54
@workers-devprod

workers-devprod commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/artifacts-opt-in-simulator.md: [@cloudflare/wrangler]
  • .changeset/local-artifacts-binding.md: [@cloudflare/wrangler]
  • packages/miniflare/scripts/build.mjs: [@cloudflare/wrangler]
  • packages/miniflare/src/config/v4-convert.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/index.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/LOCAL_DEVELOPMENT.md: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/README.md: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/controller.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/git-client.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/git-sidecar.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/index.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/artifacts/storage.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/plugins/shared/index.ts: [@cloudflare/wrangler]
  • packages/miniflare/src/workers/artifacts/binding.worker.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/config/v4-convert.spec.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/contract.spec.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/contract/README.md: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/contract/scenarios.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/https-import.spec.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/index.spec.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/lifecycle.spec.ts: [@cloudflare/wrangler]
  • packages/miniflare/test/plugins/artifacts/storage.spec.ts: [@cloudflare/wrangler]
  • packages/remote-bindings/src/maybe-start-or-update-session.test.ts: [@cloudflare/wrangler]
  • packages/vite-plugin-cloudflare/src/tests/artifacts-local.spec.ts: [@cloudflare/wrangler]
  • packages/vitest-plugin/test/artifacts-local.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/binding-local-support.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/print-bindings.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/binding-local-support.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/print-bindings.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/dev/artifacts-local.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/dev/remote-bindings.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/print-bindings.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/dev/miniflare/index.ts: [@cloudflare/wrangler]
  • turbo.json: [@cloudflare/wrangler]

@pkg-pr-new

pkg-pr-new Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16186

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16186

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16186

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16186

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16186

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@16186

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@16186

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@16186

miniflare

npm i https://pkg.pr.new/miniflare@16186

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16186

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@16186

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16186

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@16186

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@16186

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16186

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@16186

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@16186

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@16186

wrangler

npm i https://pkg.pr.new/wrangler@16186

commit: 0456450

devin-ai-integration[bot]

This comment was marked as resolved.

@leostera
leostera force-pushed the lostera/artifacts-devtools-integration branch 2 times, most recently from 9d1bb74 to 1acc3ba Compare October 9, 2026 21:37
devin-ai-integration[bot]

This comment was marked as resolved.

@leostera
leostera force-pushed the lostera/artifacts-devtools-integration branch 2 times, most recently from ba77d2b to 0fd7d88 Compare October 12, 2026 12:15
devin-ai-integration[bot]

This comment was marked as resolved.

@leostera
leostera force-pushed the lostera/artifacts-devtools-integration branch from 0fd7d88 to 383dad9 Compare October 12, 2026 22:49

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

}),
adminBase.extend({
action: z.literal("log"),
ref: z.string().optional(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Empty log reference fails instead of returning no commits

For repo.log({ ref: "" }), AdminRequestSchema rejects the reference although the public log validator accepts it. The call returns an internal error instead of an empty history.

Suggested change
ref: z.string().optional(),
ref: z.string().optional(),

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@leostera

Copy link
Copy Markdown
Collaborator Author

Hey folks, here’s a small example using the local Artifacts emulator if you want to try it quickly: https://github.com/leostera/workers-sdk-playground

It uses this PR’s Wrangler preview with an Artifacts binding set to remote: false. Run npm i, then npm run dev and npm test in separate terminals.

@edmundhung

Copy link
Copy Markdown
Member

Gonna keep this as draft until #16177 is merged

@edmundhung
edmundhung marked this pull request as draft October 19, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants