Skip to content

amaro: record node's and node-lts's bundled amaro once, in amaro-wasm/versions.ncl - #1389

Merged
bryan-minimal merged 2 commits into
mainfrom
amaro-lockstep
Nov 10, 2026
Merged

bryan-minimal merged 2 commits into
mainfrom
amaro-lockstep

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

node, node-lts and amaro-wasm each carried their own let amaro = "1.1.11" in. A bump meant three hand edits. pkgmgr's lockstep constraint (pkgmgr-rs#1233) held amaro-wasm, and the nightly posted a Slack warning about it every day ("amaro-wasm 1.1.11 → 1.3.0 ... bump all three recipes together by hand").

This PR records the value once, in a new file, packages/amaro-wasm/versions.ncl:

{
  bundled = { node = "1.1.11", node-lts = "1.1.11" },   # what each node line ships under deps/amaro
  tag_sha256 = { "1.1.11" = "f65b4e8a…" },              # nodejs/amaro tag tarball, per version
}
  • node / node-lts import their own entry: let amaro = (import "../amaro-wasm/versions.ncl").bundled.node in. build.sh is unchanged and still fails unless deps/amaro/package.json is that version.
  • amaro-wasm builds every distinct version listed in bundled, with one Source per version (url from the tag, sha256 from tag_sha256). A version listed in bundled with no tag_sha256 entry fails evaluation (missing field). upstream_version is node's entry.

No rebuild. I ran MINIMAL_SCIENCE_MODE=1 mip --no-fetch dump --packages --arch amd64 over pkgs main (05187c6) and over this branch. All 661 spec hashes are identical, including node, node-lts and amaro-wasm. Negative control: changing node's entry to 1.3.0 (and adding a placeholder sha) changed all three hashes. amaro-wasm's build_args then became amaro_versions = "1.3.0 1.1.11", with two amaro Sources. Removing that sha made evaluation fail.

What happens on a node bump (companion pkgmgr-rs PR): when the updater bumps node or node-lts, it reads deps/amaro/package.json from the new tarball. If the version differs from that line's bundled entry, it does three things in the same PR:

  • rewrites the entry;
  • fetches the new tag tarball through the audited download path and adds its tag_sha256 entry;
  • re-derives the shipped-blob pin on that recipe's splice deps/amaro/dist/index.js line.

amaro-wasm then rebuilds with node in that PR.

Merge order: merge gominimal/pkgmgr-rs#1246 first, then this PR. pkgmgr-rs#1246 reads both layouts, so this PR merges cleanly after it. If this PR merges first, the pkgmgr running today can't read node's new let amaro line. It fails closed: amaro-wasm stays held, and the nightly's Slack warning names the unreadable record until pkgmgr-rs#1246 deploys. Nothing gets bumped wrongly either way.

Not built locally: the spec hashes are unchanged, so there's nothing new to build.

🤖 Generated with Claude Code

…/versions.ncl

node, node-lts and amaro-wasm each carried their own `let amaro = "1.1.11"`, so a
bump meant three hand edits and pkgmgr held amaro-wasm every night. versions.ncl
now records which amaro each node line bundles plus each version's tag-tarball
sha256; node and node-lts import their entry (build.sh still checks deps/amaro),
and amaro-wasm builds every distinct version listed.

No rebuild: every package's spec hash is unchanged (mip dump, amd64, 661 packages).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 7, 2026 18:22
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 5 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 5 included reviews currently available. Your 22 included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f938675 and 05b4383.

Files selected for processing: 4

  • packages/amaro-wasm/build.ncl
  • packages/amaro-wasm/versions.ncl
  • packages/node-lts/build.ncl
  • packages/node/build.ncl
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@agent-137 agent-137 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.

Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now SUCCESS.

CI: Every check is green at head 05b4383. CodeRabbit was rate-limited and there is no review of any commit, so there is no bot coverage. The body says pkgmgr-rs#1246 should merge first. If it does not, the failure is closed: amaro-wasm stays held and the nightly warns.

Should-fix: none.

Nit

  • packages/amaro-wasm/build.ncl:9. The comment says the versions come "in versions.ncl's field order". To my knowledge, std.record.values returns fields sorted by name, not in declaration order. I did not check this with nickel, which is not installed here.
    • The result is the same today, because "node" sorts before "node-lts".
    • With a third line, or one whose name sorts differently, amaro_versions order would not follow the file. That changes no behaviour, but the comment would mislead someone hunting a spec-hash diff.
    • Fix: reword it to "sorted by field name".

Checked, clean

  • Recorded values: bundled.node = 1.1.11 and bundled.node-lts = 1.1.11 equal main's literals, as does tag_sha256["1.1.11"] = f65b4e8a…, which matches main's Source sha.
    • main has not touched node, node-lts or amaro-wasm since the merge-base.
    • Each node build.sh still fails closed unless deps/amaro/package.json is $AMARO_VERSION.
    • The shared splice pin 79c79a0b… is the same in both recipes, which is consistent with both shipping the same amaro.
  • Consumers: git grep amaro shows node/build.ncl:38 and node-lts/build.ncl:37 reading versions.ncl entries and forwarding them via include amaro.
    • amaro-wasm reads versions.ncl for its Sources, its amaro_versions build_arg (consumed by build.sh's for v in $VERSIONS, extracting v$v.tar.gz), its test loop and its upstream_version.
    • No other literal amaro version remains, and nothing in .github/ reads it.
  • Nickel: versions.tag_sha256."%{v}" is valid interpolated field access, and a missing key fails evaluation, as the body says.
  • I did not reproduce the body's "661 spec hashes identical" claim, because there is no mip here. The values are unchanged, so it is plausible.

Verdict: Mergeable once pkgmgr-rs#1246 has merged. Only a comment nit.

@agent-137 agent-137 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.

Approving at 05b4383. No should-fix findings; the nits in the earlier comment review are optional.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 93be25b Nov 10, 2026
15 checks passed
@bryan-minimal
bryan-minimal deleted the amaro-lockstep branch November 10, 2026 02:44
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.

2 participants