Skip to content

ci: trust bootstrap diagnostics policy - #12480

Merged
rsliter merged 19 commits into
mainfrom
codex/12192-trust-bootstrap-diagnostics-policy
Oct 5, 2026
Merged

rsliter merged 19 commits into
mainfrom
codex/12192-trust-bootstrap-diagnostics-policy

Conversation

@rsliter

@rsliter rsliter commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The protected installer-hash allowlist accepts the exact normalized Brev template produced by PR #12239 after its npm diagnostic sanitizer normalizes terminal controls before credential redaction. The OpenClaw runtime also pins undici to 8.10.2. Shipped bootstrap behavior and release pins remain unchanged.

Reason

Exact-head automated review found that control bytes could split credential-shaped values before redaction. The scope-local repair changes the normalized template digest, so the protected base must authorize that exact repaired content independently before #12239 can proceed.

The trust rollout is intentionally two-step because candidate validation executes the parser from the protected base. PR #12239 remains the sole source owner for the bootstrap implementation; this prerequisite records only its exact normalized digest.

Related issues

Refs #12192

Changes

  • Add normalized template digest cfd709a9e481145a4e8ade4054d77ea487011f49458af0f995ec89733d762cb2 to the protected allowlist.
  • Pin the OpenClaw runtime override to [email protected] and update its lockfile fixture.
  • Leave all shipped scripts and release pins unchanged.
  • Remove the duplicate test-only prospective script generator and helper-based trust test identified by PR Review Advisor. The candidate bootstrap implementation remains owned only by fix(bootstrap): replace stale npm before installing Node #12239.

Verification

  • npx vitest run --project integration test/install/installer-hash-check.test.ts — passed, 81 tests.
  • Base-trusted parser validation against repaired fix(bootstrap): replace stale npm before installing Node #12239 candidate commit 6facc734933fcae2c5da81f17ea5db0cc331a3fc — passed and returned the exact approved digest.
  • Repaired fix(bootstrap): replace stale npm before installing Node #12239 focused bootstrap suite — passed, 20 tests.
  • npm run test:changed — passed.
  • npm run validate:pr — passed.
  • Pre-commit, commit-msg, and pre-push hooks — passed.
  • Diff inspection — confirmed one allowlist entry, the runtime dependency pin, and its lockfile fixture; no shipped bootstrap behavior or release pins changed.

Review notes

This is a security trust-boundary change. The user explicitly approved authorizing only the exact normalized digest above. The candidate source remains independently reviewable in #12239. The Advisor repair removes the competing test-only reconstruction so the production script in #12239 is the single implementation owner.

Review evidence follow-up

No #12480 code changed for this evidence follow-up.


Signed-off-by: Rebecca Sliter [email protected]

@rsliter rsliter self-assigned this Sep 29, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 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 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2b4b581a-0059-4095-a1fb-523adb722ade

📥 Commits

Reviewing files that changed from the base of the PR and between e138623 and f1677fe.

📒 Files selected for processing (6)
  • agents/openclaw/openclaw-runtime/package.json
  • ci/source-shape-test-budget.json
  • scripts/checks/extract-installer-pins.mts
  • test/fixtures/openclaw-2026.9.1-package-lock.json.gz.base64
  • test/helpers/issue-12192-brev-template.ts
  • test/install/installer-hash-check.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The runtime package pins undici to version 8.10.2. A prospective Brev template adds sanitized npm install diagnostics. The pin extractor allowlist and installer hash-check test validate the template digest.

Changes

Runtime Dependency Pin

Layer / File(s) Summary
Pin undici version
agents/openclaw/openclaw-runtime/package.json
The runtime package overrides add an undici pin at version 8.10.2. The existing fast-uri pin remains unchanged.

Brev npm Diagnostics Template

Layer / File(s) Summary
Add npm install diagnostics
test/helpers/issue-12192-brev-template.ts
The prospective template adds sanitized, bounded npm diagnostic capture and routes the reviewed, root, and plugin npm install stages through the wrapper. It also removes bundled npm files before extracting Node and updates selected comments and dividers.
Pin and test the prospective template digest
scripts/checks/extract-installer-pins.mts, test/install/installer-hash-check.test.ts, ci/source-shape-test-budget.json
The pin allowlist adds the prospective template digest. The test checks digest extraction and verifies that changing an npm command triggers the untrusted-template diagnostic. The source-shape budget classifies the test as a security exception.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: prekshivyas, cv

Merge Risk: ⚪ Minimal · up to f1677

The change adds one trusted template digest, a regression test for it, and an undici pin compatible with the supported Node.js versions. No merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: trusting the bootstrap diagnostics policy through the installer-hash allowlist.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@github-code-quality

github-code-quality Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 93c87c6 in the codex/12192-trust-bo... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/12192-trust-bo... 93c87c6 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit 93c87c6 in the codex/12192-trust-bo... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/12192-trust-bo... 93c87c6 +/-
src/lib/state/s...tory-restore.ts 86% 0% -86%
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/state/sandbox.ts 92% 83% -9%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/policy/index.ts 71% 79% +8%
src/lib/state/p...l-retirement.ts 79% 92% +13%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 94% +94%
src/lib/securit...ig-structure.ts 0% 98% +98%

Updated October 03, 2026 23:17 UTC

@github-actions

Copy link
Copy Markdown
Contributor

@rsliter
rsliter marked this pull request as ready for review October 1, 2026 14:16
@rsliter
rsliter marked this pull request as draft October 1, 2026 14:58
@rsliter
rsliter marked this pull request as ready for review October 2, 2026 14:52
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 93c87c6. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@rsliter
rsliter requested review from deepujain and ericksoa October 4, 2026 16:24

@deepujain deepujain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval blocked on evidence for 93c87c6.

  1. [Blocking evidence] scripts/checks/extract-installer-pins.mts:523: GitHub cannot resolve the template commit cited in the PR body. Provide a reachable immutable source reference and parser evidence proving that source matches the added digest and that an operational mutation is rejected. The shipped-template tests do not verify this new entry.
  2. [Blocking evidence] agents/openclaw/openclaw-runtime/package.json:15: Advisor requires managed-image-multiarch-startup for this change. Retained OpenClaw, Hermes, and Deep Agents Code contracts cover amd64; provide passing amd64 and arm64 qualification for this commit or a recorded maintainer disposition.

Validation: 95 installer/locked-install tests, 7 growth tests, validate:pr, parser extraction, diff checks, and trusted gates passed. Audit suite: 37 passed, 9 failed identically on the base. Template-source verification unavailable; live qualification not dispatched under read-only authorization.

@rsliter

rsliter commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

The two blocking evidence requests are now addressed without changing #12480 code. The exact #12239 source commit is published and GitHub-verified, the base-trusted parser accepts its expected digest and rejects an operational URL mutation, and trusted run https://github.com/NVIDIA/NemoClaw/actions/runs/37218801998 passed managed-image-multiarch-startup on both amd64 and arm64 with exact candidate/base/workflow binding and clean retained cleanup evidence. The immutable identities, job links, artifact names, and parser results are recorded under “Review evidence follow-up” in the PR body.

@rsliter
rsliter requested a review from deepujain October 4, 2026 23:00

@deepujain deepujain left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both earlier findings are fixed; no new blocker found at 93c87c6.

Earlier findings:

  • Template provenance - fixed at 93c87c6: published source 6facc73 matches the added digest; the parser rejects an operational URL mutation.
  • Multiarchitecture qualification - fixed at 93c87c6: run 37218801998 passes amd64 and arm64 with matching candidate identities, three-agent contracts, and clean cleanup.

New findings: None.

Validation: 141 focused tests, 7 growth tests, validate:pr, SDK imports, trusted gates, and diff checks passed. Parser admission fails on the base and passes on this head; shipped output is unchanged. Retained E2E inspected; no live run dispatched.

@rsliter
rsliter merged commit 1812d69 into main Oct 5, 2026
90 checks passed
@rsliter
rsliter deleted the codex/12192-trust-bootstrap-diagnostics-policy branch October 5, 2026 18:09
@wscurran wscurran added area: install Install, setup, prerequisites, or uninstall flow area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior platform: brev Affects Brev hosted development environments labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: install Install, setup, prerequisites, or uninstall flow area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior platform: brev Affects Brev hosted development environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants