Skip to content

ci: trust Node 24 Brev bootstrap template - #11329

Draft
cv wants to merge 1 commit into
mainfrom
codex/trust-node24-brev-template
Draft

ci: trust Node 24 Brev bootstrap template#11329
cv wants to merge 1 commit into
mainfrom
codex/trust-node24-brev-template

Conversation

@cv

@cv cv commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Outcome

Allow the base-trusted installer checker to recognize the exact Node 24/npm 12 Brev bootstrap prepared in #11080. Existing trusted templates remain accepted; this PR does not change the bootstrap script or release pins.

Reason

The installer checker deliberately requires template approval on main before a later PR can change installer behavior. #11080 cannot authorize its own new template.

Changes

Add normalized Brev template SHA-256 ee86b418f29c48e4d4042cdb9bb5424eaaef0d89782134646c4b539e2849703e to the OpenShell 0.0.106 trust record. The proposed script installs checksum-verified Node.js 24.18.1 archives and integrity-verified npm 12.0.2, including cleanup if npm installation fails.

Verification

  • npx vitest run --project integration test/install/installer-hash-check.test.ts — all 88 tests passed.
  • The current canonical parser rejects the proposed script. The proposed parser accepts that exact script and rejects a copy with Node.js 24.18.2 substituted.
  • npm run validate:pr — passed, including repository checks, commit-message validation, secret scanning, and the CLI type check.
  • Validation ran in a credential-isolated container. The change contains no secrets, API keys, or credentials; the secret scan passed.

Review notes

GitHub CI completed for 99ec40d715a4af03db74502116289b907f21059c. The installer-hash check passed. Approval remains blocked by inherited failures: the Hermes image build has a stale probe checksum, and CLI shards 4, 6, and 11 report dashboard-forward, WeChat fixture, runtime-bundle checksum, and gateway-teardown mock failures. Those code and test files are unchanged from the recorded base bb5f1b009a6a12742ef0fadb8ec84315a4e36fec; the latter three test failures were also reproduced locally on that base. No CI waiver is claimed. CodeRabbit skipped the draft, so independent review is still pending.

This changes a security-sensitive installer trust allowlist. Local self-review compared the full Brev script change with main and tested exact acceptance and tamper rejection. Independent maintainer review remains required before merge. The proposed template is from the locally repaired #11080 candidate 7e8d60a32b066fa6919e5fa02b7f86fb2abe43f3; that candidate has not been pushed yet. The complete proposed script diff is included below so this trust change can be reviewed before that candidate is published.

Proposed Brev bootstrap diff against main
diff --git a/scripts/brev-launchable-ci-cpu.sh b/scripts/brev-launchable-ci-cpu.sh
index 8119ff96e..9d6391ce0 100755
--- a/scripts/brev-launchable-ci-cpu.sh
+++ b/scripts/brev-launchable-ci-cpu.sh
@@ -9,7 +9,7 @@
 #
 # What this installs:
 #   1. Docker (docker.io) — enabled and running
-#   2. Node.js 22 (nodesource)
+#   2. Node.js 24.18.1 and verified npm 12.0.2
 #   3. OpenShell CLI binary (pinned release)
 #   4. NemoClaw repo cloned with npm deps installed and TS plugin built
 #
@@ -251,42 +251,44 @@ sudo usermod -aG docker "$TARGET_USER" 2>/dev/null || true
 # Docker socket permissions to work around stale group membership.
 info "Docker enabled ($(docker --version 2>/dev/null | head -c 40))"
 
-# 3. Node.js 22
-node_major=""
-if command -v node >/dev/null 2>&1; then
-  node_major="$(node -p 'process.versions.node.split(".")[0]' 2>/dev/null || true)"
-fi
-
-if command -v npm >/dev/null 2>&1 && [[ -n "$node_major" ]] && ((node_major >= 22)); then
+# 3. Node.js 24.18.1
+NODE_VERSION="24.18.1"
+if command -v node >/dev/null 2>&1 && [[ "$(node --version)" == "v${NODE_VERSION}" ]]; then
   info "Node.js already installed: $(node --version)"
 else
-  info "Installing Node.js 22..."
-  # IMPORTANT: update NODESOURCE_SHA256 when changing setup_22.x URL
-  NODESOURCE_URL="https://deb.nodesource.com/setup_22.x"
-  NODESOURCE_SHA256="575583bbac2fccc0b5edd0dbc03e222d9f9dc8d724da996d22754d6411104fd1"
-  ns_tmp="$(mktemp)"
-  curl -fsSL "$NODESOURCE_URL" -o "$ns_tmp" \
-    || {
-      rm -f "$ns_tmp"
-      fail "Failed to download NodeSource installer"
-    }
+  case "$(uname -m)" in
+    x86_64)
+      node_arch="x64"
+      node_sha256="9f5eb6ac21845a66c493c91a253b1da32fd684e89e9b7202d4936982336be4ca"
+      ;;
+    aarch64 | arm64)
+      node_arch="arm64"
+      node_sha256="df224555a083b918e46260cc969838501b9f9a87140c1195e5b9597b56d5dae2"
+      ;;
+    *) fail "Unsupported Node.js architecture: $(uname -m)" ;;
+  esac
+  info "Installing Node.js ${NODE_VERSION}..."
+  node_tmp="$(mktemp)"
+  node_url="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${node_arch}.tar.gz"
+  curl -fsSL --proto '=https' --tlsv1.2 "$node_url" -o "$node_tmp" || {
+    rm -f "$node_tmp"
+    fail "Failed to download Node.js archive"
+  }
   if command -v sha256sum >/dev/null 2>&1; then
-    actual_hash="$(sha256sum "$ns_tmp" | awk '{print $1}')"
+    actual_hash="$(sha256sum "$node_tmp" | awk '{print $1}')"
   elif command -v shasum >/dev/null 2>&1; then
-    actual_hash="$(shasum -a 256 "$ns_tmp" | awk '{print $1}')"
+    actual_hash="$(shasum -a 256 "$node_tmp" | awk '{print $1}')"
   else
-    rm -f "$ns_tmp"
+    rm -f "$node_tmp"
     fail "No SHA-256 tool available (sha256sum/shasum)"
   fi
-  if [[ "$actual_hash" != "$NODESOURCE_SHA256" ]]; then
-    rm -f "$ns_tmp"
-    fail "NodeSource installer integrity check failed\n  Expected: $NODESOURCE_SHA256\n  Actual:   $actual_hash"
+  if [[ "$actual_hash" != "$node_sha256" ]]; then
+    rm -f "$node_tmp"
+    fail "Node.js archive integrity check failed\n  Expected: $node_sha256\n  Actual:   $actual_hash"
   fi
-  info "NodeSource installer integrity verified"
-  sudo -E bash "$ns_tmp" >/dev/null 2>&1
-  rm -f "$ns_tmp"
-  wait_for_apt_lock
-  retry 3 10 "install nodejs" sudo apt-get install -y -qq nodejs >/dev/null 2>&1
+  sudo tar -xzf "$node_tmp" -C /usr/local --strip-components=1 --no-same-owner
+  rm -f "$node_tmp"
+  [[ "$(node --version)" == "v${NODE_VERSION}" ]] || fail "Node.js installation did not produce v${NODE_VERSION}"
   info "Node.js $(node --version) installed"
 fi
 
@@ -321,6 +323,14 @@ fi
 
 info "Installing npm dependencies..."
 cd "$NEMOCLAW_CLONE_DIR"
+reviewed_npm_tmp="$(mktemp -d)"
+trap 'rm -rf "$reviewed_npm_tmp"' EXIT
+sudo env -u NODE_AUTH_TOKEN -u NPM_TOKEN -u NPM_CONFIG__AUTH_TOKEN \
+  RUNNER_TEMP="$reviewed_npm_tmp" \
+  bash .github/actions/setup-reviewed-npm/verify-and-install-npm.sh ci/reviewed-npm-audit.json
+rm -rf "$reviewed_npm_tmp"
+trap - EXIT
+[[ "$(npm --version)" == "12.0.2" ]] || fail "Reviewed npm 12.0.2 installation failed"
 npm install --ignore-scripts 2>&1 | tail -3
 info "Root deps installed"
 

Signed-off-by: Carlos Villela cvillela@nvidia.com

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Sep 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 9, 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

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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 99ec40d in the codex/trust-node24-b... branch remains at 96%, unchanged from commit bb5f1b0 in the main branch.

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: install Install, setup, prerequisites, or uninstall flow area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: brev Affects Brev hosted development environments labels Sep 9, 2026
@cv cv added the v0.0.123 label Sep 10, 2026
@github-actions github-actions Bot added v0.0.124 Release target and removed v0.0.123 labels Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: install Install, setup, prerequisites, or uninstall flow area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: brev Affects Brev hosted development environments v0.0.124 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants