Skip to content

Move the build-tool contract to Rust 1.99.0 and Node 26.10.0 - #549

Merged
Antnation merged 7 commits into
mainfrom
chore/toolchain-refresh-rust-1.99-node-26.10
Oct 15, 2026
Merged

Antnation merged 7 commits into
mainfrom
chore/toolchain-refresh-rust-1.99-node-26.10

Conversation

@Antnation

@Antnation Antnation commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #545 and #525.

Folds in both Dependabot base-image bumps and moves the executable build-tool contract with them (see Executable build-tool contract), so scripts/build_tools.py check, gateway/build.rs, the npm lifecycle installer and the Dockerfile's own version assertions agree.

Merge order: this PR is stacked on #550

Merge #550 first. Do not merge this PR before it, and do not merge it with an admin bypass.

main currently fails the required audit, admin-ui, cloudflare and connections-acceptance checks: rustls 0.23.45 (RUSTSEC-2026-0346 to -0349, of which -0349 reaches the gateway's outbound TLS) and the npm advisories GHSA-68fv-2mgg-jv7q (source-map-js, both lockfiles) and GHSA-wq5f-xc86-pv6w (sharp via miniflare/wrangler, root lockfile). #550 fixes all of them, with the reviewed inventory updates. This PR's own change does not touch any of that.

#550 is not merged yet, so this branch is rebased onto #550's current head (bf3289ef3e69a42ef6a750433aed25bf2a963309) rather than onto main. Until #550 merges, this PR's diff against main therefore also shows #550's six commits. Only the top commit, Move the build-tool contract to Rust 1.99.0 and Node 26.10.0, belongs to this PR. Its content is the same as before the rebase. The rebase was conflict-free: #550 edits other hunks of package.json, admin-ui/package.json, both lockfiles and dependency-controls.md than the engines and toolchain lines this commit changes. engines.node is 26.10.0 in both manifests and both lockfiles' packages[""], and build_tools.py check passes on the combined tree.

The stacking means CI here runs Node 26.10.0 against #550's refreshed npm dependencies (Wrangler 4.149.0, Vite 8.3.2, Vitest 5.0.3, React Router 7.18.4, source-map-js 1.2.2). That combination had not been tested before. Checked with npm's own semver, every engines.node range in both lockfiles accepts 26.10.0 except one: @img/sharp-win32-ia32 (^20.9.0). That is an optional win32/ia32 binary, never installed on the Linux x64 or Windows x64 runners, and main has the same range at 0.35.4.

Once #550 merges:

  1. git fetch origin && git rebase --onto origin/main bf3289ef3e69a42ef6a750433aed25bf2a963309 chore/toolchain-refresh-rust-1.99-node-26.10. This works whether Consolidate October dependency updates and clear new npm advisories #550 lands as a merge commit or a squash. Branch protection requires the branch to be up to date anyway.
  2. Re-run CI. Merge only when every required check passes on that rebased head.

If #550's head moves before it merges, this branch must be re-stacked on the new head.

Versions and sources

Tool Before After Source
Rust production/default (rust_production, rust-toolchain.toml, Docker builder) 1.98.0 1.99.0 Dependabot #545: rust:1.99.0-slim-bookworm@sha256:2c3a22f0a5533ea2dd5a16627bc841228151faa2d4de2644ac9987e4a2f1f2fa, digest copied verbatim from gh pr diff 545. 1.99.0 is the current stable (static.rust-lang.org/dist/channel-rust-stable.toml: rustc 1.99.0 (b940084d7 2026-09-28)). No 1.99.1 exists.
Node (node, .node-version, both engines.node, both lockfiles' root engines.node, Docker node stage) 26.8.2 26.10.0 Dependabot #525: node:26.10.0-bookworm-slim@sha256:662933cf47f013bc8e4beb31a6116448427a82057ba7c42c97e4c5ba766504c2, digest copied verbatim from gh pr diff 525.
npm (npm, .npm-version, both engines.npm) 11.19.1 11.19.1 (unchanged) Node v26.10.0 bundles npm 11.19.1, according to both https://nodejs.org/dist/index.json (v26.10.0 ... "npm":"11.19.1", released 2026-09-21) and deps/npm/package.json at the v26.10.0 tag of nodejs/node. Because npm does not change, docs/deployment/npm-lifecycle-policy.md ("currently 11.19.1") stays accurate.
Rust CI (rust_ci) 1.98.1 1.98.1 (unchanged) See below.
Rust coverage (rust_coverage) nightly-2026-09-01 nightly-2026-09-01 (unchanged) Coverage floors are untouched.

Files changed by this PR's commit: build-tools.json, rust-toolchain.toml, .node-version, Dockerfile (both FROM lines and the rustc --version | grep -E '^rustc 1\.99\.0 ' assertion; the Node/npm assertions read .node-version/.npm-version), package.json, admin-ui/package.json, the root packages[""].engines entry of package-lock.json and admin-ui/package-lock.json (engines only, no resolution changes), and docs/deployment/dependency-controls.md. Cargo.lock, cargo-policy-exceptions.json, transport-ownership.json, deny.toml, npm-script-policy.json, image-scan-policy.json and all workflows are byte-identical to #550's head. The commit adds no advisory ignores, audit-level changes, license allowances, or exception scope or expiry changes.

Node image digest

The node:26.10.0-bookworm-slim tag was rebuilt on 2026-10-06 and now resolves to a newer index digest. #525 was last refreshed on 2026-10-01 and still proposes sha256:662933cf…6504c2, which remains an authentic official index for Node 26.10.0. Digests in this repository come from the Dependabot diffs, so this PR keeps #525's digest instead of re-resolving the tag by hand. The builder copies only /usr/local/bin/node and /usr/local/lib/node_modules from the node stage, so Debian-layer rebuilds of that image never reach the build or the runtime image. A digest-only Dependabot bump is expected and can follow separately.

Why rust_ci does not move

This follows the last production compiler bump. #479 moved production from Rust 1.88.0 to 1.98.0 across Docker, rust-toolchain.toml and build-tools.json, and its description says "CI Rust and coverage toolchains remain unchanged". The documented relationship (#447 and dependency-controls.md) works like this:

  • rust_production equals the Docker builder image and the rust-toolchain.toml default. build_tools.py check enforces both.
  • The required production-compiler job runs cargo check --workspace --all-targets --locked with that compiler, and the image jobs build and exercise the release binary with it.
  • rust_ci is the separately reviewed, previously passing pin for fmt, clippy and tests. Moving it changes the enforced clippy lint set and the compiler used for both sides of the microbenchmark comparison, so it gets its own reviewed change.

With this PR, ordinary CI (1.98.1) is one minor version behind production (1.99.0). Before this PR it was one patch release ahead. The doc paragraph now says so explicitly. Local developers get 1.99.0 from rust-toolchain.toml, so code using a 1.99-only std API would pass locally and fail the 1.98.1 test and clippy jobs. That fails in the safe direction. Because rust_ci is unchanged, this PR introduces no new lints. In the previous run, 1.99.0 printed the same 10 unused_must_use test warnings as 1.98.1 (see follow-ups).

Follow-ups (not in this PR)

  • Move rust_ci to 1.99.0 and fix any new clippy lints there.
  • gateway/src/app_tests.rs discards the Result of rbac_state.install_revision_snapshot(...).await in 10 tests (unused_must_use), so a failed policy install would not fail those tests. The clippy job runs without --all-targets, so nothing reports it. This predates the PR. Add .expect(...) to those calls and consider --all-targets for clippy.
  • Node 26.11.0, 26.11.1 and 26.12.0 exist. nodejs.org marks none of them as a security release. They bundle npm 11.20.0, so the next Node bump must also update .npm-version, both engines.npm fields and docs/deployment/npm-lifecycle-policy.md.
  • rust-toolchain.toml lists rustfmt and clippy, so rustup downloads two components inside the Docker builder. That network fetch is trusted through rustup's dist manifests. It predates this PR and this PR does not change it.

Local verification on the stacked tree (Windows; Python 3.12, Node 24, so not the pinned runtime)

  • python scripts/build_tools.py check: "Build-tool contract verified."
  • python -m unittest discover -s scripts -p test_build_tools.py: 23 tests OK.
  • python scripts/check-supply-chain.py: passes.
  • node scripts/npm-script-policy.mjs check (both projects): "npm lifecycle policy verified."
  • npm audit --audit-level=high in the root and in admin-ui: 0 vulnerabilities.
  • cargo audit --deny warnings (cargo-audit 0.22.2): no findings on the stacked Cargo.lock (rustls 0.23.46).
  • No local compile. gateway/build.rs asserts the exact pinned Node (26.10.0), which is not installed here, so compile, test and image verification come from CI.

CI evidence

Run 38666345068 on head 8d4cd2d3e667661f0c1b1df1f0025965502981c6, which is this PR's commit on top of #550's bf3289e.

All 27 required checks pass. That is every context in main's branch protection: fmt, clippy, test, postgres-foundation, admin-ui, cloudflare, egress-only, audit, gitleaks, connections-acceptance, dev-traffic-smoke, ha-compose-example, all 8 ha-release-gate legs, security-coverage (nightly-2026-09-01, floors unchanged), supply-chain (including dependency review), cargo-policy (ubuntu-latest), cargo-policy (windows-latest), npm-policy-windows, production-compiler and image-publication. Build image, microbench, security-corpus and operational-alerts also pass. The image-candidate, scan, verification and promotion jobs are skipped, as they are on every PR.

Before the rebase, audit, admin-ui, cloudflare and connections-acceptance failed on main's advisories. On the stacked head:

  • audit: cargo audit --deny warnings (cargo-audit 0.22.2) loaded 1329 advisories, scanned 432 crates and reported no findings. Cargo.lock selects rustls 0.23.46.
  • admin-ui: node 26.10.0, npm 11.19.1. 37 test files passed, and npm audit --audit-level=high found 0 vulnerabilities.
  • cloudflare: node 26.10.0, npm 11.19.1. 2 test files passed, and npm audit --audit-level=high found 0 vulnerabilities. That run includes Wrangler 4.149.0.
  • connections-acceptance passes, now that the jobs it aggregates pass.

Actual versions recorded in the logs:

  • production-compiler: RUSTUP_TOOLCHAIN: 1.99.0, rustc 1.99.0 (b940084d7 2026-09-28), cargo 1.99.0 (5f94df478 2026-08-27), node 26.10.0, npm 11.19.1, python 3.13.15. cargo check --workspace --all-targets --locked finished with the same 10 pre-existing unused_must_use warnings in gateway/src/app_tests.rs (lines 31171, 31427, 31494, 31589, 31997, 32252, 32339, 32562, 32692, 33394), so Consolidate October dependency updates and clear new npm advisories #550's jsonschema 0.56 and serde_json changes add none under 1.99.0.
  • clippy, test and admin-ui (gateway build): rustc 1.98.1 (48a229cea 2026-09-01), node 26.10.0, npm 11.19.1.
  • Build image: FROM docker.io/library/rust:1.99.0-slim-bookworm@sha256:2c3a22f0a5533ea2dd5a16627bc841228151faa2d4de2644ac9987e4a2f1f2fa and FROM docker.io/library/node:26.10.0-bookworm-slim@sha256:662933cf47f013bc8e4beb31a6116448427a82057ba7c42c97e4c5ba766504c2. The in-image assertion printed rustc 1.99.0 (b940084d7 2026-09-28), and the runtime image checks and the PR preview Trivy scan passed.
  • npm-policy-windows: node 26.10.0, npm 11.19.1. The lifecycle policy check passed for both projects, the clean installs passed with hooks denied, and the admin UI's 37 test files passed on Windows.

The previous run on the pre-rebase head 8d8093a was 38663200721. There, only the four checks above failed, all on advisories already on main.

Fold in the Dependabot action updates, taking every commit SHA from the
corresponding Dependabot PR diff and keeping the tag comments:

- taiki-e/install-action f7e5d7c9 (v2, 2.87.26), from #548
- actions/upload-artifact cf430e03 (v7.0.2), from #547
- actions/download-artifact 9000827c (v8.0.2), from #546
- docker/build-push-action c3c9e263 (v7.4.0), from #509

The nightly security-mutations workflow contract test pins the exact
upload-artifact SHA it expects. Dependabot did not update it, so #547 on
its own would have broken that scheduled job; update the constant to the
same reviewed SHA.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T01:02:02.670922Z 8d8093a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Fold in Dependabot #508 (jsonwebtoken 11.1.0), #510 (syn 3.0.6), #512
(rustix 1.1.5) and #513 (jsonschema 0.56.0), and refresh the reviewed
Cargo and transport inventories they invalidate.

jsonschema 0.52 turned IDN support into an optional, default-on `idna`
feature. This workspace disables default features, so without a change
the `idn-email` and `idn-hostname` formats would silently become unknown
formats, which the crate accepts. Request `idna` explicitly so they keep
the checks they had when idna was a mandatory dependency; the lockfile
edge to idna is unchanged. The upgrade also brings validation fixes,
including a stack overflow on self-referencing unevaluated* schemas.
New crates: jsonschema-value, strum, strum_macros and heck, all MIT or
MIT/Apache-2.0. No new duplicate crate name appears.

`cargo update -p rustix --precise 1.1.5` also re-pointed ten unrelated
windows-sys edges (errno, socket2, tempfile, and so on) from 0.61.2 to
0.52.0 or 0.60.2: cargo ignores existing locks that point at the updated
crate's dependencies and then picks the first locked version in range.
Those edges are restored to their main values so the only rustix change
is its own version and checksum; `cargo metadata --locked` and
`cargo update --workspace --locked` accept the lockfile unchanged.

cargo-policy-exceptions.json / deny.toml: same duplicate groups, same
owners and expiry. Parent lists follow the version renames, jsonschema
0.56 moves referencing to hashbrown 0.17 (narrowing the 0.16 group),
adds jsonschema-value as a getrandom 0.3 parent and strum_macros as a
syn 2 parent, and the hashbrown/pem reasons now name their actual
parents.

transport-ownership.json: only `graph` changes, recomputed with the
guard's own graph() from locked metadata. Build inputs and syntax
scopes are unchanged; syn 3.0.6 only changes parsing of None-delimited
groups produced by macro expansion, which source files never contain.
Fold in Dependabot #544 (vite 8.3.2), #543 (vitest 5.0.3) and #542
(react-router-dom 7.18.4), and clear the new high-severity source-map-js
advisory GHSA-68fv-2mgg-jv7q (1.0.0 - 1.2.1) with a plain `npm audit fix`
that moves it to 1.2.2. `npm audit --audit-level=high` reports no
vulnerabilities.

The lockfile was produced with `npm install --package-lock-only
--ignore-scripts --before=2026-10-09T00:00:00Z`, so no newly selected
transitive version is less than five days old: rolldown resolves to
1.2.13 rather than 1.2.14, which was published hours before this
change. No lockfile entry gained or lost hasInstallScript, so the admin
UI lifecycle inventory (fsevents only) is unchanged and
`node scripts/npm-script-policy.mjs check admin-ui` passes.
Wrangler 4.148.0 and earlier pin a Miniflare whose Sharp is older than
0.35.5, the fix for GHSA-wq5f-xc86-pv6w. 4.149.0 is the lowest release
that moves Miniflare (5.20261006.1-alpha) to Sharp 0.35.5 and its
patched libvips 1.3.4 binaries, so it supersedes Dependabot's 4.146.0
proposal (#541). Also fold in vitest 5.0.3 (#539) and move source-map-js
to 1.2.2 with a plain `npm audit fix` (GHSA-68fv-2mgg-jv7q). `npm audit
--audit-level=high` reports no vulnerabilities. Resolution used the same
`--before=2026-10-09T00:00:00Z` release-age cutoff as the admin UI.

Wrangler 4.149.0 changes two locked packages that carry install hooks,
reviewed per docs/deployment/npm-lifecycle-policy.md. Both tarballs were
fetched as data, checked against the lockfile SHA-512 and read in memory
without extracting or executing anything:

- esbuild 0.28.1 -> 0.28.2: still `postinstall: node install.js`, and
  install.js is byte-identical (sha256 612294e2...).
- workerd 1.20260930.2 -> 1.20261006.1: still `postinstall: node
  install.js`; install.js changes only the embedded release date and
  version used for its binary check and fallback download
  (sha256 ba1ebba8...).

Neither needs its hook: the locked platform optional dependencies supply
the binaries. npm-script-policy.json records the new identities and
source hashes with unchanged denials and reasons, and allowScripts
denies the new exact tarball URLs. The lifecycle docs name the reviewed
versions and the advisories.
Four rustls advisories were published on 2026-10-14, all fixed in
0.23.46, and `cargo audit --deny warnings` (the required audit job)
fails on main without this update.

RUSTSEC-2026-0349 (GHSA-w44r-93j7-qv28) reaches the gateway: its
outbound TLS clients use the default resumption store, which recorded
the key-exchange group from an unauthenticated ServerHello, so an
on-path attacker could make later connections to that upstream offer
only a classical key share. The other three need a custom
ClientSessionStore (0346), Encrypted Client Hello (0347) or the brotli
feature (0348); the gateway uses none of them.

Lock-only: rustls is transitive, its manifest is unchanged apart from
the version, and the feature set is the same. `cargo update -p rustls`
also re-pointed tempfile's getrandom edge from 0.4.3 to 0.3.4; a
follow-up `cargo update -p getrandom@0.3.4 --precise 0.3.4` returns it
to 0.4.3, so the duplicate inventory is unchanged. The transport graph
is regenerated from locked metadata; build inputs and syntax scopes are
unchanged.
Note the jsonschema 0.56 move and the explicit `idna` feature that keeps
`idn-email`/`idn-hostname` checked, the `float_roundtrip` behaviour that
jsonschema-value brings to serde_json, the lock-only Cargo patch updates,
and the npm updates with the two advisories they clear. Both advisories
are in build and test tooling and do not reach the shipped binary or
the embedded UI bundle.
Fold in the Dependabot base-image bumps rust:1.99.0-slim-bookworm (#545)
and node:26.10.0-bookworm-slim (#525), with the manifest digests taken
verbatim from those PRs, and move every consumer of the executable
build-tool contract with them so build_tools.py, gateway/build.rs, the
npm lifecycle installer and the Dockerfile assertions agree:

- build-tools.json: rust_production 1.99.0, node 26.10.0.
- rust-toolchain.toml: default channel 1.99.0 (must equal rust_production).
- .node-version and the engines fields of both package.json files and the
  root package entries of their lockfiles: node 26.10.0. No dependency
  resolution changes.
- Dockerfile: builder rustc assertion now requires 1.99.0.
- docs/deployment/dependency-controls.md states the new versions.

npm stays at 11.19.1. That is the npm Node 26.10.0 bundles according to
both nodejs.org/dist/index.json and deps/npm/package.json at the v26.10.0
tag, so .npm-version, the engines npm field and the npm lifecycle policy
document are unchanged.

rust_ci stays at 1.98.1 and coverage stays on nightly-2026-09-01. This
mirrors the 1.88.0 -> 1.98.0 production image update (#479), which moved
only the production/default compiler: the production-compiler job checks
all targets with the shipped compiler, while ordinary CI keeps its
previously passing pin, because moving it changes the enforced clippy lint
set and the microbenchmark compiler and deserves its own review.
@Antnation
Antnation force-pushed the chore/toolchain-refresh-rust-1.99-node-26.10 branch from 8d8093a to 8d4cd2d Compare October 15, 2026 01:33
@Antnation
Antnation merged commit 5d99076 into main Oct 15, 2026
35 checks passed
@Antnation
Antnation deleted the chore/toolchain-refresh-rust-1.99-node-26.10 branch October 15, 2026 01:58
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