Skip to content

refactor(e2e): remove candidate Hermes swap setup - #7460

Merged
cv merged 2 commits into
mainfrom
codex/remove-candidate-hermes-swap
Jul 24, 2026
Merged

refactor(e2e): remove candidate Hermes swap setup#7460
cv merged 2 commits into
mainfrom
codex/remove-candidate-hermes-swap

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the temporary Hermes swap setup from candidate code now that the trusted pre-checkout setup is on main. The E2E boundary rejects any future candidate helper that contains the reviewed privileged fragments.

Related Issue

Related to #7145. Follow-up to #7444.

Changes

  • Remove the candidate-side swap program and exact-head routing from the live Vitest helper.
  • Remove the temporary compatibility tests and rollout text.
  • Validate that candidate code cannot reintroduce the reviewed privileged swap fragments while the trusted workflow remains authoritative.

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: No user-facing contract changes. The internal E2E README removes the temporary rollout path and describes the final trust boundary.
  • 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 accepted ci(e2e): move heavy Docker lanes to larger GitHub-hosted runners #7145 scope and merged fix(ci): trust exact-head Hermes swap setup #7444 establish the trusted pre-checkout boundary. This follow-up removes the temporary candidate-side privileged path and adds a fail-closed source boundary.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: test/e2e/README.md removes the temporary compatibility path and states that candidate code cannot supply the privileged program or arguments. The review covered all six changed files and confirmed the trusted swapon --show=NAME and swapon --show=SIZE commands remain unchanged.
  • Agent: Codex Desktop

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

  • 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 — live-vitest-invocation 24/24; trusted Hermes swap boundary 12/12; E2E workflow contract 42/42; watch triggers 5/5; CLI typecheck, source-shape, and exact Vitest project membership passed.
  • 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; the focused workflow and source-boundary tests cover this compatibility-path removal.
  • 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)

npm run docs passed with zero errors and the two existing Fern warnings.


Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

Summary by CodeRabbit

  • Security

    • Strengthened end-to-end workflow validation to detect unauthorized privileged commands and swap-related logic in candidate test helpers.
    • Clarified that trusted fallback operations run on isolated GitHub-hosted Linux runners with controlled privilege handling.
  • Testing

    • Refocused live test coverage on argument validation, invocation behavior, and subprocess failures.
    • Added coverage confirming workflow validation remains safe when presented with malicious helper content.
  • Documentation

    • Updated guidance describing trusted fallback, swap activation observations, and cleanup behavior.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@prekshivyas prekshivyas added area: e2e End-to-end tests, nightly failures, or validation infrastructure v0.0.94 labels Jul 24, 2026
@prekshivyas prekshivyas self-assigned this Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The live Vitest runner no longer provisions Hermes swap resources. Trusted workflow validation now scans the helper source for forbidden privileged fragments, with tests covering malicious helper content and updated larger-runner routing documentation.

Changes

Hermes E2E boundary enforcement

Layer / File(s) Summary
Generic live Vitest invocation
tools/e2e/live-vitest-invocation.mts, test/e2e/support/live-vitest-invocation.test.ts
Removes Hermes swap provisioning, related exports, environment parameters, setup helpers, and Hermes-specific tests from live Vitest execution.
Trusted helper source validation
tools/e2e/trusted-hermes-swap-workflow-boundary.mts, tools/e2e/workflow-boundary.mts, test/e2e/support/trusted-hermes-swap-workflow-boundary.test.ts
Adds forbidden-fragment validation for the live helper source and verifies rejection of a malicious privileged sudo payload.
Larger-runner routing documentation
test/e2e/README.md
Documents trusted fallback runner constraints and trusted-step swap lifecycle behavior.

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

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#7391 — Extends related trusted workflow-boundary validation and larger-runner routing enforcement.
  • NVIDIA/NemoClaw#7444 — Adds complementary trusted Hermes swap workflow-boundary enforcement.

Suggested labels: area: ci, area: security, integration: hermes

Suggested reviewers: apurvvkumaria, cjagwani, laitingsheng

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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: removing the candidate-side Hermes swap setup from e2e.
✨ 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 codex/remove-candidate-hermes-swap

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

@github-code-quality

github-code-quality Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 64436ae in the codex/remove-candida... branch remains at 96%, unchanged from commit f764692 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 64436ae in the codex/remove-candida... branch remains at 80%, unchanged from commit f764692 in the main branch.

Show a code coverage summary of the most impacted files.
File main f764692 codex/remove-candida... 64436ae +/-
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/securit...ntial-filter.ts 93% 93% 0%
src/lib/trace.ts 94% 94% 0%
src/lib/platform.ts 84% 89% +5%

Updated July 24, 2026 03:04 UTC

@prekshivyas
prekshivyas requested review from apurvvkumaria and cv July 24, 2026 02:51

@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: 1

🤖 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 `@tools/e2e/trusted-hermes-swap-workflow-boundary.mts`:
- Around line 293-308: Replace the literal fragment loop in
validateTrustedHermesSwapHelperSource with enforcement that candidate code
cannot provide or override the sudo executable or arguments: use a trusted fixed
artifact/allowlist, or keep privileged execution solely in the trusted workflow.
Ensure equivalent forms such as execFileSync/spawnSync, alternate sudo paths,
constructed strings, and imported privileged modules are rejected or
unavailable, and add regression coverage for these bypasses.
🪄 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: 5cdb9371-e662-418d-92c7-742c6a4bd9c7

📥 Commits

Reviewing files that changed from the base of the PR and between caddf8b and cedae38.

📒 Files selected for processing (6)
  • test/e2e/README.md
  • test/e2e/support/live-vitest-invocation.test.ts
  • test/e2e/support/trusted-hermes-swap-workflow-boundary.test.ts
  • tools/e2e/live-vitest-invocation.mts
  • tools/e2e/trusted-hermes-swap-workflow-boundary.mts
  • tools/e2e/workflow-boundary.mts
💤 Files with no reviewable changes (1)
  • test/e2e/support/live-vitest-invocation.test.ts

Comment on lines +293 to +308
export function validateTrustedHermesSwapHelperSource(source: string): string[] {
const errors: string[] = [];
const forbidden = [
"/usr/bin/sudo",
"HERMES_E2E_SWAP_SCRIPT",
"provisionHermesE2ESwap",
"needsHermesE2ESwap",
];
for (const fragment of forbidden) {
if (source.includes(fragment)) {
errors.push(
`candidate live Vitest helper must not contain privileged swap fragment ${fragment}`,
);
}
}
return errors;

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.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Do not use literal substring matching as the privileged-boundary check.

This only rejects four exact spellings in one file. Candidate code can bypass it with execFileSync("sudo", ...), spawnSync("/usr/bin/" + "sudo", ...), another sudo path, or an imported module containing the privileged call. Enforce a trusted fixed artifact/allowlist—or keep privileged execution exclusively in the trusted workflow—and add regression tests for these bypasses.

As per path instructions, candidate code must not be able to supply or override the sudo program or its arguments.

🤖 Prompt for 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.

In `@tools/e2e/trusted-hermes-swap-workflow-boundary.mts` around lines 293 - 308,
Replace the literal fragment loop in validateTrustedHermesSwapHelperSource with
enforcement that candidate code cannot provide or override the sudo executable
or arguments: use a trusted fixed artifact/allowlist, or keep privileged
execution solely in the trusted workflow. Ensure equivalent forms such as
execFileSync/spawnSync, alternate sudo paths, constructed strings, and imported
privileged modules are rejected or unavailable, and add regression coverage for
these bypasses.

Source: Path instructions

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / medium confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · medium confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

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: cloud-onboard, credential-sanitization, security-posture

2 optional E2E recommendations
  • hermes-e2e
  • mcp-bridge

Workflow run details

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

@cv
cv merged commit cc79118 into main Jul 24, 2026
79 of 81 checks passed
@cv
cv deleted the codex/remove-candidate-hermes-swap branch July 24, 2026 03:09
prekshivyas added a commit that referenced this pull request Jul 24, 2026
<!-- markdownlint-disable MD041 -->
## Summary

This PR adds the canonical dated release entry for NemoClaw v0.0.94
before the tag is cut.
The entry reconciles all 26 commits since v0.0.93 and links each
user-visible change to its owning documentation.

## Changes

- Add `docs/changelog/2026-07-24.mdx` with the exact `## v0.0.94`
heading, parser-safe SPDX comment, release summary, and detailed
bullets.
- Record sandbox restore and update behavior, onboarding and inference
changes, network policy behavior, security evidence, Hermes build
performance, DGX Station guidance, and E2E validation changes.
- Preserve `docs/` as the source of truth without changing the AI-agent
documentation routing skill.
- Use [E2E run
30075443016](https://github.com/NVIDIA/NemoClaw/actions/runs/30075443016)
for release QA evidence at exact tested SHA
`04e6dfa883071dda9df429c66e73168e1a995cba`.

### Source summary

- [#7461](#7461) ->
`docs/changelog/2026-07-24.mdx`: Record the ownership-preserving Hermes
image layer reduction and hosted timing comparison.
- [#7460](#7460) ->
`docs/changelog/2026-07-24.mdx`: Record removal of candidate Hermes swap
setup from E2E validation.
- [#7458](#7458) ->
`docs/security/fern-5.80.1-dependency-review.md`,
`docs/changelog/2026-07-24.mdx`: Record the reviewed Fern CLI update.
- [#7457](#7457) ->
`docs/changelog/2026-07-24.mdx`: Record periodic runner-pressure
telemetry.
- [#7455](#7455) ->
`docs/changelog/2026-07-24.mdx`: Record non-blocking absent Fern
previews.
- [#7450](#7450) ->
`docs/changelog/2026-07-24.mdx`: Record stable cancellation handling for
live-test child processes.
- [#7449](#7449) ->
`docs/changelog/2026-07-24.mdx`: Record parallel plugin EXDEV coverage.
- [#7448](#7448) ->
`docs/changelog/2026-07-24.mdx`: Record isolated long-running E2E lanes.
- [#7444](#7444) ->
`docs/changelog/2026-07-24.mdx`: Record exact-head Hermes swap
validation.
- [#7437](#7437) ->
`docs/manage-sandboxes/backup-restore.mdx`,
`docs/changelog/2026-07-24.mdx`: Record gateway pairing and
authenticated verification after cross-sandbox restore.
- [#7436](#7436) ->
`docs/manage-sandboxes/backup-restore.mdx`,
`docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record
selected stale-state cleanup and Hermes virtual-environment access
repair.
- [#7385](#7385) ->
`docs/network-policy/customize-network-policy.mdx`,
`docs/changelog/2026-07-24.mdx`: Record the read-only agent-variant
route check.
- [#7371](#7371) ->
`docs/changelog/2026-07-24.mdx`: Record host-artifact verification for
session exports.
- [#7359](#7359) ->
`docs/changelog/2026-07-24.mdx`: Record platform validation for managed
vLLM model overrides.
- [#7356](#7356) ->
`docs/changelog/2026-07-24.mdx`: Record token-shaped value redaction for
`sandbox doctor --json`.
- [#7354](#7354) ->
`docs/security/advisory-early-warning.md`,
`docs/changelog/2026-07-24.mdx`: Record advisory correlation and
retained audit provenance.
- [#7352](#7352) ->
`docs/network-policy/customize-network-policy.mdx`,
`docs/network-policy/integration-policy-examples.mdx`,
`docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record
preset reapplication and bounded `tls: skip` guidance.
- [#7345](#7345) ->
`docs/security/openclaw-2026.6.10-dependency-review.md`,
`docs/security/openclaw-2026.7.1-dependency-review.md`,
`docs/changelog/2026-07-24.mdx`: Record reviewed npm audit exception
enforcement.
- [#7340](#7340) ->
`docs/network-policy/customize-network-policy.mdx`,
`docs/changelog/2026-07-24.mdx`: Record the repaired CLI-reference
route.
- [#7334](#7334) ->
`docs/get-started/dgx-station-preparation.mdx`,
`docs/changelog/2026-07-24.mdx`: Record the qualified OTA metadata
fallback and narrowed override wording.
- [#7322](#7322) ->
`docs/changelog/2026-07-24.mdx`: Reconcile the gateway source tag added
to plugin registration banners.
- [#7284](#7284) ->
`docs/manage-sandboxes/update-sandboxes.mdx`,
`docs/changelog/2026-07-24.mdx`: Record read-only `upgrade-sandboxes
--check` behavior and recorded-gateway selection.
- [#7277](#7277) ->
`docs/changelog/2026-07-24.mdx`: Reconcile deterministic gateway TCP
refusal coverage.
- [#7234](#7234) ->
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`:
Record preserved DGX Spark managed vLLM Express intent on resume.
- [#7185](#7185) ->
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`:
Record IPv4 fallback DNS selection and exact resolver probing.
- [#6820](#6820) ->
`docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record
the versioned, redacted `--events=jsonl` onboarding stream.

## 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: `npx vitest
run test/changelog-docs.test.ts` passed 6/6 tests.
- [ ] 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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/changelog/2026-07-24.mdx`; the writing rules,
documentation style, exact release range, skip terms, published routes,
and product scope were reviewed; the changelog test passed 6/6; `npm run
docs` passed with route checking OK, zero errors, and two existing
warnings.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 65368f9 -->
<!-- docs-review-agents-blob-sha: 9c9b36d -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: Not applicable. This PR does not change
`scripts/prepare-dgx-station-host.sh`.

## 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 the
dated changelog entry.
- [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). The
build passed with zero errors and two 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). Native dated changelog entries use the required parser-safe MDX
SPDX comment and no frontmatter.

---
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
  * Added the v0.0.94 release changelog.
  * Documented improvements to sandbox snapshot and restore behavior.
* Added updates for gateway selection, policy comparisons, onboarding
event output, and DGX recovery workflows.
* Documented enhanced diagnostics redaction, npm audit provenance, image
assembly performance, and validation stability improvements.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants