Skip to content

node: regenerate the bundled JavaScript on a pinned node-26.12.1 (gen-14) - #1303

Closed
bryan-minimal wants to merge 22 commits into
mainfrom
bryan/node-gen14-pin
Closed

bryan-minimal wants to merge 22 commits into
mainfrom
bryan/node-gen14-pin

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

On top of #817. Roots node the way go and the JDKs are rooted: a prebuilt pin plus a from-source build on it.

  • node-26.12.1 (new, prebuilt): node 26.12.1 from gen-14 of gominimal/bootstrap, both arches, reproduced on two machines per arch (generations/gen-14/manifest.json). Runtime deps: coreutils, icu (78.3, same as the bootstrap's), glibc, libgcc/libstdc++, ca-certificates.
  • node: build deps gain node-26.12.1 and esbuild 0.28.2 plus amaro's tag tarball. Before the build, deps/undici/undici.js, deps/amaro/dist/index.js and deps/minimatch/index.js are regenerated with esbuild the way upstream's build makes them; the steps that need a node run on the pinned one. build.sh prints whether each matches the shipped file and ships the result in /usr/share/node/BUILDINFO. In the bootstrap's build, undici's and minimatch's bundles came out byte-identical to the shipped ones; amaro's differs (upstream used an older esbuild). Still upstream's: acorn, minimatch's tsc output, npm and its node_modules, the llhttp C and the amalgamations.
  • node's configure flags, shared libraries and outputs are otherwise unchanged. node-lts and next untouched.

Not yet built in CI: the pin's runtime deps are translated from the bootstrap's gen-0 slots to pkgs' glibc/gcc/icu; the first build proves them.

🤖 Generated with Claude Code

bryan-minimal and others added 22 commits October 4, 2026 15:04
wasi-libc (wasi-sdk-21) is built with our clang; node's build recompiles the
llhttp blobs in deps/undici and npm's undici, splices them in, and fails on any
wasm it did not rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nsus

rebuild-llhttp-wasm.py census gains --allow-raw PATH=N: exactly N bare wasm
headers that do not decode as a module from offset 0, each logged with hex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same recipe change as node; undici 7.29.0 / npm undici 6.26.0. The node
24.19.0 Source moves to the staging mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
node and node-lts each carried an identical rebuild-llhttp-wasm.py (Local
files cannot reach outside the package directory). Ship it once as a
build-time package, run its selftest there, and depend on it from both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The edge runtime bundles undici 6's llhttp pair as base64 in four files.
Rebuild it from undici 6.28.0's C with our clang and wasi-libc, splice
it over the sha-pinned shipped blobs, and census the installed tree so
any wasm not on the exact-path allowlist fails the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #946 (CVE-2026-111943 eMudhra backports for node and node-lts).
Both sides kept: the two carried patches, their fail-closed greps and the
standalone tests from #946, then this branch's llhttp wasm rebuild. The
patches apply before the wasm census, which they do not touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- wasi-libc: install the bundled cloudlibc LICENSE (BSD-2-Clause) and musl
  COPYRIGHT (MIT) next to the top-level licenses, renamed to
  LICENSE-cloudlibc / COPYRIGHT-musl because cloudlibc's file is also
  called LICENSE.
- wasi-libc: comment on the Source naming the upstream tag archive and how
  to audit the mirror (sha256, and git get-tar-commit-id = the tag commit).
- node, node-lts: forward npm_undici through build_args
  (MINIMAL_ARG_NPM_UNDICI); next: forward undici (MINIMAL_ARG_UNDICI). The
  version is now written once, in build.ncl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… from source (WIP)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asm carriers

The installed script runs under python3 in node, node-lts and next, so python is a runtime dep (it
stays a build dep for the build-time selftest). next's census exception for @vercel/og was a glob;
it now names the three files that carry wasm (resvg.wasm, yoga.wasm, and yoga again as base64 in
index.node.js), so a new carrier there fails the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inding)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lag token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amaro is node's built-in TypeScript type stripper (node x.ts), on by default in 24 and 26.
packages/amaro-wasm rebuilds its swc module from the source amaro vendors (rust with -Zbuild-std
for wasm32, llvm's wasm-ld, wasm-bindgen-cli 0.2.100, each module built twice), and node and
node-lts splice it over the sha-pinned shipped blob in deps/amaro/dist/index.js instead of
configuring --without-amaro. The census admits it like the llhttp blobs, a build step and a test
run a .ts file.

rebuild-llhttp-wasm.py splice --wasm-bindgen: wasm-bindgen numbers its closure-wrapper shim after
a function index, so the rebuilt module differs from upstream's in that one import name. The flag
allows exactly that difference (same module, kind and signature), renames the identifier in the
carrier's glue (which must name it exactly once), and admits the features the shipped blob already
uses. Selftests cover both verdicts. Checked against the real carriers: 61 imports and 10 exports
match for amaro 1.1.11 (node 26) and 1.1.10 (node 24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…24.22.1, #968)

#968 moved both node lines to nodejs.org release tarballs with no carried
patches (the CVE-2026-111943 fixes and LIEF 1.x are upstream). The two
build.ncl conflicts are resolved by taking main's recipe (nodejs.org Source,
no patch Locals, no `patch` dep) and re-applying this branch's additions:
the llvm / wasi-libc / llhttp-wasm-rebuild / amaro-wasm build deps, the
mirrored npm-undici Source, the type_strip test, and the bundled-version
lets, now forwarded through build_args (undici, undici_llhttp, npm_undici,
amaro) and re-derived from the 26.12.1 / 24.22.1 trees. node-lts goes back
to nodejs.org, as review asked. build.sh merged cleanly (main's guards kept).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Versions come from build.ncl (MINIMAL_ARG_UNDICI, _UNDICI_LLHTTP,
  _NPM_UNDICI, _AMARO) instead of being typed again in build.sh.
- node: undici 8.10.2 -> 8.12.2 (llhttp 9.3.1). undici 8.12 vendors milo
  (Rust) as two base64 wasm carriers in deps/undici/src/lib/milo; node's
  bundled undici.js compiles milo out, so like the llhttp source blobs they
  are never installed and are deleted before the census.
- node-lts: undici 7.29.0 -> 7.30.1 (llhttp 9.3.0), npm undici 6.26.0 ->
  6.28.0, amaro 1.1.10 -> 1.1.11 (shipped blob 79c79a0b..., node's).
- Every decoded shipped blob is byte-identical to a pin this branch already
  carried, so only the version tripwires and amaro's pin move.
- amaro-wasm builds 1.1.11 only: both lines bundle it now.
- rebuild-llhttp-wasm.py: undici 8.12 renamed build/wasm.js to
  build/llhttp.js with the same pinned lines; check_undici_src accepts
  exactly one of the two, selftest covers the rename and both-or-neither.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tp wasm rebuild and main's SWC addon)

Both sides add independent steps to next: #817's undici source + llhttp
wasm rebuild/census, and main's prebuilt @next/swc-linux-<arch>-gnu addon
(a native .node, not wasm, so the census does not see it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge from main moved `rust` to 1.99.1, and amaro-wasm's build.sh
fails closed when the toolchain isn't the rust_version it pins ("rustc is
not 1.99.0"). Its wasm std builds from the matching rustc source tarball:
rustc-1.99.1-src.tar.xz, the same mirrored object and sha256 main's
packages/rust pins. The output wasm is not hash-pinned (node's splice pins
only the upstream blob it replaces), only built twice and compared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tp/amaro versions (review)

- The wasm census ran before the @next/swc addon and sharp were installed,
  so neither reached it. The x64 addon holds one raw `\0asm` module (it
  failed the census when run over it, per review); the build passed on amd64
  only because of step order. The census and smoke now run last, with an
  explicit allow-path naming the x64 addon as upstream's sha-pinned prebuilt.
- llhttp 8.1.0 is forwarded from build.ncl (next: undici_llhttp; node and
  node-lts: npm_undici_llhttp) instead of a literal in three build.sh files.
- amaro-wasm: `amaro` is a plain string used by the Source URL,
  upstream_version and the test; next's duplicate SRC_ROOT is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…A store, #1133)

#1133 (node, node-lts: trust the system CA store by default) conflicted
with this branch only in the import block of node{,-lts}/build.ncl: both
sides added imports after `gcc`. Kept both: this branch's llvm, wasi-libc,
llhttp-wasm-rebuild and amaro-wasm, and main's ca-certificates.

Everything else auto-merged and is kept from both sides:
- main's ca-certificates runtime dep, the --openssl-use-def-ca-store
  configure flag, the post-install `node --help` guard and the
  system_ca_store_default test;
- this branch's wasm pins, splices, both censuses, smoke and type_strip.
The CA change touches only configure flags and runtime deps, so neither
census nor any splice is affected. No node, node-lts or next version moved
on main since the last merge (fdb5524), so the undici / llhttp / amaro
pins are unchanged.

Checked: nickel format --check and bash -n on node{,-lts}; mip dump
--packages evaluates on amd64 (651 packages) and arm64 (649), with
ca-certificates and the wasm build deps both present on node and node-lts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
node-26.12.1 pins node 26.12.1 from gen-14 of gominimal/bootstrap (both
arches). node now regenerates deps/undici/undici.js,
deps/amaro/dist/index.js and deps/minimatch/index.js with esbuild 0.28.2,
running the steps that need a node on node-26.12.1, before the build, and
ships the comparison against the shipped files as
/usr/share/node/BUILDINFO. Everything else (configure flags, wasm rebuilds,
census, tests) is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@bryan-minimal

Copy link
Copy Markdown
Member Author

Superseded by #1494: this PR was stacked on #817, which was squash-merged, so it no longer merged (235 behind main). #1494 replays this branch's one commit (50adba6) on current main. It also fixes the node1 version check, which would have failed now that node is 26.13.1, and follows main's amaro lockstep and llhttp splices. The branch is left in place.

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.

1 participant