Skip to content

[miniflare] Add isolated native Git client for Artifacts [1/3] - #16176

Merged
edmundhung merged 12 commits into
cloudflare:mainfrom
leostera:lostera/artifacts-native-git-client
Oct 9, 2026
Merged

edmundhung merged 12 commits into
cloudflare:mainfrom
leostera:lostera/artifacts-native-git-client

Conversation

@leostera

@leostera leostera commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Artifacts local-development stack — 1 of 3

Order Review PR Merge destination
1/3 — Native Git client cloudflare/workers-sdk#16176 (this PR) Upstream main
2/3 — Opt-in Miniflare simulator cloudflare/workers-sdk#16177 (incremental diff) Upstream main after 1/3
3/3 — Development tools and local default cloudflare/workers-sdk#16186 (incremental diff) Upstream main after 2/3

Review and merge in order: 1/3, 2/3, then 3/3. The fork-only review PRs were closed. #16092 is now closed as an unchanged full-stack reference; do not merge it in addition to the stack.

Scope

  • Add the internal GitClient for repository initialization, import, fork, reads, and first-parent history.
  • Isolate native Git subprocesses from host credentials and configuration. Require Git 2.32 or newer before using the client, and give actionable install/upgrade errors.
  • Keep import credentials out of retained Git config and disable HTTP redirects on explicit Git imports.
  • Add independent Git-client tests; no binding or simulator is exposed by this PR. The Miniflare simulator is the next layer, followed by development-tool integration.

Validation

  • pnpm -r --filter miniflare... build
  • pnpm --filter miniflare exec vitest run test/plugins/artifacts/git-client.spec.ts — 23 passed, 1 Windows-only test skipped locally
  • pnpm --filter miniflare check:type; type-aware lint and formatting on changed files

An internal-only module does not need a release changeset yet; ci:no-changeset-required is applied. The opt-in simulator in part 2 carries the Miniflare changeset.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is an internal Git client with no user-facing binding; the later stack layers carry internal and public development documentation.

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9f9764e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@leostera
leostera marked this pull request as ready for review October 9, 2026 11:54
@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team October 9, 2026 11: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

@leostera leostera changed the title [miniflare] Add isolated native Git client for Artifacts [miniflare] Add isolated native Git client for Artifacts [1/3] Oct 9, 2026
@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@16176

@cloudflare/build-output-utils

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

@cloudflare/codemods

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

@cloudflare/config

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

@cloudflare/containers-shared

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

create-cloudflare

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

@cloudflare/deploy-helpers

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

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

@cloudflare/pages-shared

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

@cloudflare/runtime-types

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

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

@cloudflare/workers-auth

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 9f9764e

devin-ai-integration[bot]

This comment was marked as resolved.

@leostera

leostera commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

The PR description check is failing solely because this internal-only Git client layer has no changeset. PR #16177 carries the release changeset for the simulator. Could a maintainer apply ci:no-changeset-required to #16176? My fork account cannot apply upstream labels. I am preparing a tested follow-up for the Devin findings.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@edmundhung edmundhung added the ci:no-changeset-required Skip pull request checks for a valid changeset label Oct 9, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@leostera
leostera force-pushed the lostera/artifacts-native-git-client branch from 7f12244 to 0cc04a3 Compare October 9, 2026 14:39
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts Outdated
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts Outdated
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts Outdated
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts
Comment thread packages/miniflare/src/plugins/artifacts/git-client.ts Outdated
Comment thread packages/miniflare/test/plugins/artifacts/git-client.spec.ts
Comment thread packages/miniflare/test/plugins/artifacts/git-client.spec.ts
devin-ai-integration[bot]

This comment was marked as resolved.

@edmundhung edmundhung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Windows CI error seems legit. But otherwise LGTM.

@workers-devprod workers-devprod 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.

Codeowners reviews satisfied

@leostera

leostera commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review, @edmundhung! The Windows failure was in the new test fixture: Windows cannot create :README. I now run that filename case on platforms that support it and keep the [README literal-path check on Windows. I also addressed the new drive-relative Windows import finding. The fixes are in 9f9764e47 (propagated through #16177 and #16186); exact-head Windows CI is still pending.

@leostera

leostera commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Current-head CI at 9f9764e47 has two root test-partition failures, both outside this Git-client change: Windows fixtures partition 2 timed out on @fixture/entrypoints-rpc (UND_ERR_HEADERS_TIMEOUT), and macOS runtime partition 1 timed out in the Wrangler D1 test setup hook. The six downstream Tests (...) jobs fail only because they require all partitions to pass. The Git-client Windows filename failure from the previous head is no longer reported. I cannot rerun upstream jobs from this fork account; could a maintainer rerun the two failed partitions (or this workflow) so we can confirm exact-head green CI without rewriting the approved PR?

@leostera

leostera commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

@edmundhung seems green now! Feel free to merge whenever you're ready! :)

@edmundhung
edmundhung merged commit 5b693e8 into cloudflare:main Oct 9, 2026
103 of 112 checks passed
@leostera
leostera deleted the lostera/artifacts-native-git-client branch October 9, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants