Skip to content

ci(installer): trust Homebrew formula transition - #7374

Merged
cv merged 5 commits into
mainfrom
fix/installer-hash-formula-trust-anchor
Jul 22, 2026
Merged

ci(installer): trust Homebrew formula transition#7374
cv merged 5 commits into
mainfrom
fix/installer-hash-formula-trust-anchor

Conversation

@sandl99

@sandl99 sandl99 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Allow the base-trusted installer verifier to accept either the current archive-only installer template with its exact eight-asset table or the reviewed formula installer template with those same eight assets plus openshell.rb. Each trusted template hash is bound to its exact asset set, so this prerequisite lets #7319 pass base-SHA verification without allowing a formula pin before its consumer or arbitrary release assets and templates.

Related Issue

Refs #6903

Prerequisite for #7319.

Changes

  • Bind the current archive-only installer template to exactly the current eight installer assets.
  • Bind the reviewed formula installer template to exactly those same eight assets plus openshell.rb until feat(gateway): manage the default gateway service #7319 lands and tightens the rule.
  • Download and verify the formula release asset directly, with regression coverage for both valid template/asset contracts, crossed contracts, duplicate pins, and digest mismatches.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This is a temporary internal CI trust boundary and does not change user-facing installation behavior.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: The trust-boundary review binds each accepted operational template hash to one exact asset set; the formula is fetched over HTTPS and checked against its pinned SHA-256. CodeRabbit follow-up added duplicate-pin and digest-mismatch coverage.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: npx vitest run --project integration test/installer-hash-check.test.ts (74 passed); the trusted checker also passed against this PR's archive-only installer, the actual feat(gateway): manage the default gateway service #7319 formula-consuming installer, and the OpenShell v0.0.85 release assets.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: npm run check completed every pre-commit gate successfully, then reached the 20-minute local timeout during the manual coverage stage.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved installer hash verification for OpenShell release assets, including the Homebrew formula (openshell.rb).
    • Updated installer pin-table validation to allow a transitional asset set and to use computed expectations instead of fixed totals.
    • Enhanced template hashing by verifying against an allowlist of trusted SHA-256 values.
  • Tests
    • Expanded installer-hash verification fixtures to cover formula hashing (success and mismatch), transitional template mappings, and duplicate-asset failure scenarios.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ab2bb909-db49-4877-b7cb-98b42a9266d0

📥 Commits

Reviewing files that changed from the base of the PR and between 72e4b38 and febfda3.

📒 Files selected for processing (2)
  • scripts/checks/extract-installer-pins.mts
  • test/installer-hash-check.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/checks/extract-installer-pins.mts

📝 Walkthrough

Walkthrough

Installer hash validation now supports the transitional openshell.rb formula asset, accepts multiple trusted template hashes, computes expected asset counts dynamically, and adds fixture coverage for successful, mismatched, policy, and duplicate-pin verification.

Changes

Installer hash transition

Layer / File(s) Summary
Pin validation and trusted template contracts
scripts/checks/extract-installer-pins.mts
Installer asset validation is coupled to the matched trusted template hash; installer and Brev template hashes are checked against allowlists.
Release asset checksum verification
scripts/check-installer-hash.sh
OpenShell verification accepts eight or nine pinned assets, hashes openshell.rb directly, and derives the expected matched-reference count.
Formula fixture and verification coverage
test/installer-hash-check.test.ts
Fixtures optionally include the formula, simulate its download and digest, and cover transition, mismatch, policy, and duplicate-pin cases.

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

Sequence Diagram(s)

sequenceDiagram
  participant InstallerPins
  participant TemplateVerifier
  participant AssetSetValidator
  participant ReleaseVerifier
  participant OpenShellRelease
  InstallerPins->>TemplateVerifier: validate installer template against trusted hashes
  TemplateVerifier-->>InstallerPins: matched template SHA
  InstallerPins->>AssetSetValidator: validate template-specific asset set
  ReleaseVerifier->>OpenShellRelease: download openshell.rb
  OpenShellRelease-->>ReleaseVerifier: formula payload
  ReleaseVerifier->>ReleaseVerifier: compare computed digest with pinned value
Loading

Suggested labels: area: security

Suggested reviewers: cv, ericksoa, apurvvkumaria

🚥 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a CI installer trust transition to include the Homebrew formula.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/installer-hash-formula-trust-anchor

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

@github-code-quality

github-code-quality Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 848dcfb in the fix/installer-hash-f... branch remains at 96%, unchanged from commit f992494 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 848dcfb in the fix/installer-hash-f... branch remains at 80%, unchanged from commit f992494 in the main branch.

Show a code coverage summary of the most impacted files.
File main f992494 fix/installer-hash-f... 848dcfb +/-
src/lib/onboard...ndbox-create.ts 83% 33% -50%
src/lib/onboard...-create-plan.ts 88% 75% -13%
src/lib/onboard...-desktop-gpu.ts 89% 77% -12%
src/lib/onboard...ndbox-create.ts 91% 83% -8%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/shields/index.ts 71% 72% +1%

Updated July 22, 2026 14:45 UTC

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/checks/extract-installer-pins.mts`:
- Around line 175-184: Reject duplicate asset names in assertInstallerAssetSet
before selecting the expected 8-or-9 asset set, rather than relying on
assertExactAssetSet’s deduplicated comparison. Add a test fixture in
test/installer-hash-check.test.ts covering a duplicate archive pin and assert
that trusted verification rejects it.

In `@test/installer-hash-check.test.ts`:
- Around line 625-652: Extend the formula-specific sha256sum stub in the
installer hash test to support a mismatching-digest mode, while preserving the
existing successful FORMULA_DIGEST behavior. Add a test case that enables this
mode, invokes the direct-hash validation path, and asserts a nonzero result
containing STALE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 10cdac1b-60b2-4cd1-9c8d-6942577cbf62

📥 Commits

Reviewing files that changed from the base of the PR and between 6e70994 and e4d4178.

📒 Files selected for processing (3)
  • scripts/check-installer-hash.sh
  • scripts/checks/extract-installer-pins.mts
  • test/installer-hash-check.test.ts

Comment thread scripts/checks/extract-installer-pins.mts Outdated
Comment thread test/installer-hash-check.test.ts
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Canonical ledger: 0 blocker(s), 1 warning(s), 0 suggestion(s).

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: None

2 optional E2E recommendations
  • openshell-version-pin
  • bootstrap-install-smoke
1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Cover formula-download failure

  • Location: test/installer-hash-check.test.ts:792
  • Category: tests
  • Problem: The changed formula tests cover a matching digest and a mismatching digest, but none makes curl fail only for `openshell.rb`. Existing download-failure fixtures use the archive-only pin set, so they do not execute the new direct formula-fetch error branch.
  • Impact: A future change can make an unavailable formula download pass, report success, or bypass the failure count without a regression test detecting it.
  • Recommendation: Add a formula-template fixture where curl fails only for `openshell.rb`. Assert that the checker exits 1 and does not print the success message.
  • Verification: Inspect `runFixture` and the curl fixture. Confirm that no formula-enabled invocation returns a curl error for `openshell.rb`.
  • Test coverage: A formula-enabled trusted-checkout fixture that makes the `openshell.rb` curl request fail and asserts exit status 1 with no `All installer hashes are current` output.
  • Evidence: `formula-mismatch` changes the SHA-256 result after the formula file is written. The `failure` and `partial-manifest-missing` fixtures do not enable the formula template and pin. `check_openshell_release_assets` now has a separate `fetch_file` failure branch for `openshell.rb`.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@sandl99 sandl99 added area: ci CI workflows, checks, release automation, or GitHub Actions area: install Install, setup, prerequisites, or uninstall flow labels Jul 22, 2026
@sandl99 sandl99 self-assigned this Jul 22, 2026
@sandl99
sandl99 requested a review from cv July 22, 2026 10:53

@cjagwani cjagwani 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.

Approved after refreshing onto the current base and completing the exact-revision trust-boundary review. The checker accepts only two exact operational templates, maps each to an exact immutable asset set, rejects duplicate or malformed pins, and fails closed on manifest, formula, hash, and count errors. I also ran the trusted parser and live verifier against the dependent formula transition: all three manifests, eight archives, openshell.rb, and both Brev assets matched their pinned SHA-256 values. All 51 current checks are green, contributor compliance passes, and the advisor has no blocker; its formula-download regression warning is non-blocking because the reviewed branch uses the same bounded fetch_file failure path and returns the accumulated failure count.

@cv
cv merged commit 05dc758 into main Jul 22, 2026
52 checks passed
@cv
cv deleted the fix/installer-hash-formula-trust-anchor branch July 22, 2026 15:17
@cv cv mentioned this pull request Jul 22, 2026
22 tasks
cv added a commit that referenced this pull request Jul 22, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the canonical `## v0.0.92` release entry to
`docs/changelog/2026-07-22.mdx` before the release plan is generated.
The entry summarizes all ten pull requests merged after v0.0.91,
including the OpenClaw security update and Jaeger runtime regression
coverage.

## Changes

- Added the canonical v0.0.92 changelog entry.
- Recorded the user-visible, security, documentation, CI, and test
changes in the release range.
- #7280 -> `docs/changelog/2026-07-22.mdx`: OpenClaw 2026.7.1 and
Node.js 22.23.1 security/runtime update.
- #7378 -> `docs/changelog/2026-07-22.mdx`: canonical macOS watcher path
validation.
- #7379 -> `docs/changelog/2026-07-22.mdx`: stabilized full WSL platform
validation.
- #7380 -> `docs/changelog/2026-07-22.mdx`: bounded swap for hosted
Hermes image exports.
- #7100 -> `docs/changelog/2026-07-22.mdx`: semantic progress phases for
live E2E tests.
- #7376 -> `docs/changelog/2026-07-22.mdx`: restored v0.0.91 changelog
history and corrected tagged guidance.
- #7374 -> `docs/changelog/2026-07-22.mdx`: reviewed Homebrew formula
transition for installer integrity checks.
- #7346 -> `docs/changelog/2026-07-22.mdx`: provider-neutral headless
server deployment guidance.
- #7381 -> `docs/changelog/2026-07-22.mdx`: stabilized Hermes guard
timing and WSL ownership fixtures.
- #7339 -> `docs/changelog/2026-07-22.mdx`: real-artifact Jaeger header
remediation regression coverage.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates the canonical dated changelog
and release heading contract.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: Not applicable

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` passed 6/6 tests.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not applicable to a
changelog-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — passed
with 0 errors and 2 pre-existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added `v0.0.92` release notes covering sandboxing updates
(OpenClaw/Node.js bumps, integrity pinning remediation, mcporter
handling, and upgrade validation).
* Updated deployment guidance for provider-neutral headless installs,
and improved live E2E test reporting plus phase-plan validation.
* Tightened installer integrity-check messaging during an OpenShell
Homebrew transition and expanded platform/image validation (including
macOS/WSL timing) and hosted image export behavior.
* Restored the previously missed `v0.0.91` changelog entry and release
validation guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants