Skip to content

fix(toolchain): replace Wrangler/Miniflare GPL-family path - #540

Draft
seonghobae wants to merge 39 commits into
mainfrom
fix/cloudflare-toolchain-license-boundary
Draft

fix(toolchain): replace Wrangler/Miniflare GPL-family path#540
seonghobae wants to merge 39 commits into
mainfrom
fix/cloudflare-toolchain-license-boundary

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Purpose and owner boundary

Replace the former Wrangler/Miniflare/Sharp development path with pinned workerd@1.20260625.1 + esbuild@0.28.1, keeping Cloudflare lifecycle truth and foreign routing/security authority outside Noema.

Current protected-base repair — 2026-09-06 KST

Protected Noema is main@e26d771470a4ece873c367b40b3cd6cb03ac7de3. Because the lockfile policy requires exact PR-base equality, the post-#527 base movement made the prior baseSha=5b8e620... stale. Causal commit 7c8c26983f5628ccf6125ed3d3cb52edc9782f9d changes only .github/lockfile-change-policy.json.baseSha to e26d771..., preserving package/top-level digests, source URLs, target inventory and toolchain bytes. Ordinary two-parent/non-force restack 6b7f0a7b8c3069a815f74ee654620e59574bd4e1 then adopts merged #527 OIDC trust without weakening licensing/scanner policy.

Fresh exact-head ci 34027015120 and reviewer-ci 34027015135 are pending; required Security Scan 34027015129 and patch-validator-image 34027015123 are queued. Predecessor results do not transfer. Keep Draft until unchanged-head terminal GREEN and clear current review state.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread .github/workflows/lockfile-reproducibility.yml Fixed
Comment thread .github/workflows/lockfile-reproducibility.yml Fixed
Regenerate package-lock.json with the exact pinned toolchain
(Node.js 24.19.0 / npm 11.17.0) to remove the remaining
Wrangler/Miniflare/Sharp/Libvips (LGPL-3.0) dependency path the PR
description flagged as the last causal gap. Verified byte-identical
to the lockfile-reproducibility workflow's own fresh-directory
regeneration.

Repair three test fixtures that had drifted from already-correct
production changes on this branch, each confirmed against a
Node 24.19.0/npm 11.17.0 run:
- test/upload-artifact-node24-integrity.test.ts: add the new
  lockfile-reproducibility.yml workflow to the reviewed
  upload-artifact inventory (its two uses already pin the reviewed
  SHA).
- test/patch-validator-image-contract.test.ts: match the current
  multi-line `npm pkg delete` block, which now also strips workerd
  and esbuild (added by this PR) from the validator image, plus the
  corresponding node_modules absence checks.
- test/cloudflare-worker-config.test.mjs: move the "unsupported root
  key" fixture's new field ahead of the `[vars]` section header. TOML
  is section-scoped, so appending it after `[vars]` exercised the
  (intentionally open-ended) vars path instead of the root-key
  allowlist the test means to cover; the parser itself was already
  correct.

Confirmed via `npm run typecheck` and the full `vitest` suite on the
exact pinned toolchain. Remaining local failures (acquisition
symlink/owner-mode checks, a SIGTERM-reaping timing test) reproduce
only because this sandbox runs as root/uid 0, unlike the CI runner,
and are not touched here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4

Copy link
Copy Markdown
Contributor Author

Evidence: lockfile regenerated, 3 stale test fixtures repaired — 5c17c82

Fresh exact-head CI (ci 33772121594 / job 100734009932, and lockfile-reproducibility job 100733942817) surfaced real, non-congestion failures on c09f1cb. Diagnosed via job logs and confirmed locally on the exact pinned toolchain (downloaded Node.js 24.19.0 / npm 11.17.0 to match devEngines):

  1. package-lock.json was stale — exactly the causal gap the PR description already flagged. Regenerated with npm install --package-lock-only --ignore-scripts --no-audit --no-fund --legacy-peer-deps=false --install-links=false in a fresh directory (same recipe as lockfile-reproducibility.yml); the result is byte-identical (cmp clean) to what that workflow's own fresh-directory regeneration produces. Confirmed test/cloudflare-toolchain-license-boundary.test.ts now passes and the lockfile no longer contains node_modules/wrangler, node_modules/miniflare, node_modules/sharp, @img/sharp-libvips-*, or any LGPL-3.0 entry.
  2. test/upload-artifact-node24-integrity.test.ts — the reviewed-workflow inventory was missing the new lockfile-reproducibility.yml. Its two actions/upload-artifact@ uses already pin the reviewed SHA (043fb46d... / v7.0.1), so this is inventory-tracking only, not a new review decision.
  3. test/patch-validator-image-contract.test.ts — asserted the old single-line npm pkg delete devDependencies.@cloudflare/workers-types devDependencies.wrangler; the current workflow correctly deletes workerd/esbuild too (this PR's new devDependencies) across multiple continuation lines. Updated the assertions to match, and added the corresponding node_modules/esbuild / node_modules/@esbuild absence checks the workflow already performs.
  4. test/cloudflare-worker-config.test.mjs ("fails closed when a root field would be silently omitted") — this fixture appended the new key after the [vars] section header. TOML is section-scoped, so it was actually exercising the (intentionally open-ended) vars path, not the root-key allowlist. Moved it ahead of [vars]; the parser's root-key rejection was already correct and required no change.

Verified via npm run typecheck and the full vitest suite on the pinned toolchain. Remaining local failures (acquisition symlink/owner-only-mode checks, one SIGTERM-reaping timing test) only reproduce because this sandbox runs as root/uid 0 — untouched, and consistent with CI reporting exactly 4 failed files before this push.

Pushed non-force, fast-forward from c09f1cb5c17c82. CHANGELOG.md Unreleased updated. No security/license/deployment-boundary logic was changed — this is lockfile regeneration plus test-fixture repair only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BV96rXhqoR3tYZ9AeAVur4


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Fresh current-head authority supersedes the stale body snapshot: protected main is e1ac9d50f6c646f04be8c137c8acdc7200182fcd, exact #540 head is 190908ee21b71c062d263bd337231c3f0a1e77cc, open / Draft / mergeable. Exact-head ci 33856520016, required Security Scan 33856520006, reviewer-ci 33856520098, patch-validator-image 33856520066, and lockfile-reproducibility 33856520023 all completed cancelled; reviewer job 100971000064 ended with steps=[], runner_id=0, empty runner name, so no repository code executed. This is not a source/test RED or GREEN and predecessor evidence does not transfer. Keep Draft and preserve the toolchain/license gates; cancellation belongs to the runner/control-plane owner path rather than a leaf source change.

Comment thread .github/workflows/ci.yml

Copy link
Copy Markdown
Contributor Author

2026-09-06 KST post-#546 repair finding: protected base is now main@85b17014b8d46eacc95e096ca114568c321d0263, but this branch's .github/lockfile-change-policy.json still binds baseSha to e1ac9d50f6c646f04be8c137c8acdc7200182fcd. Because #546 did not change package.json/package-lock.json but did change protected reviewer/CodeGraph/CHANGELOG surfaces, this is not a Close condition and not a safe wholesale tree merge. Keep Draft; the next repair must semantically restack the toolchain/workflow/CHANGELOG/baseline delta on 85b17014..., rebind the lockfile policy only after re-verifying the before/after bytes against the new protected base, and generate fresh exact-head gates. No force push, predecessor GREEN transfer, or lockfile hand edit.

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.

3 participants