Skip to content

fix(test): match semver version tag in rebuild-hermes live test - #6138

Merged
apurvvkumaria merged 4 commits into
mainfrom
fix/rebuild-hermes-version-regex
Jul 1, 2026
Merged

apurvvkumaria merged 4 commits into
mainfrom
fix/rebuild-hermes-version-regex

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Jul 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

After #6089 merged (re-pinning the Hermes manifest to semver 0.17.0), the rebuild-hermes live test started failing on main. The regex at line 696 was extracting a calver version in parentheses — (2026.6.19) — but the version output now uses a semver tag format — v0.17.0. The two never match.

Related Issue

Regression introduced by #6089 (merged as 2ab9e525). The live rebuild-hermes test doesn't run on PRs so it merged green.

Changes

  • test/e2e/live/rebuild-hermes.test.ts:696 — change /\((\d+\.\d+\.\d+)\)/ to /v(\d+\.\d+\.\d+)/

Type of Change

  • Code change (feature, bug fix, or refactor)

Quality Gates

  • Tests added or updated for changed behavior
  • Docs not applicable — justification: live test fix, no user-facing change
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) — no

Verification

  • Git hooks passed during commit and push
  • No secrets, API keys, or credentials committed

Signed-off-by: Prekshi Vyas [email protected]

Summary by CodeRabbit

  • Tests
    • Updated end-to-end Hermes version parsing to match the latest CLI output format.
    • Added new test coverage for nemoclaw-start gateway preload selection and persistent gateway log mirroring, including refusal on unsafe symlinked log directories.
    • Removed overlapping preload/log hardening suites from the existing nemoclaw-start test file.
    • Introduced a helper to extract shell functions from script sources for more reliable testing.
  • Chores
    • Adjusted the nemoclaw-start test file size budget to reflect the new suite layout.

#6089 re-pinned the Hermes manifest to semver 0.17.0, but the live test
at rebuild-hermes.test.ts:696 was extracting the parenthesized calver
(2026.6.19) with /\((\d+\.\d+\.\d+)\)/. The two formats never match,
causing the rebuild-hermes nightly to fail on main after #6089 merged.

Switch to /v(\d+\.\d+\.\d+)/ to capture the semver tag.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates one Hermes e2e assertion and adds a dedicated nemoclaw-start preload and log-hardening test file, while removing the old overlapping suites and lowering the legacy test file budget.

Changes

Hermes version parsing update

Layer / File(s) Summary
Update version extraction regex
test/e2e/live/rebuild-hermes.test.ts
actualHermesVersion now matches a v<semver> string instead of extracting the version from parentheses text.

Nemoclaw-start gateway test split

Layer / File(s) Summary
Extract preload helpers
test/nemoclaw-start-preload-gateway.test.ts, test/support/shell-function-extractor.ts
Adds a Node-based embedded preload runner and a shell-function extractor used by the gateway tests.
Cover preload detection behavior
test/nemoclaw-start-preload-gateway.test.ts
Adds tests for safety-net and ciao-guard activation, launcher-path recognition, and process.title precedence.
Cover persistent log hardening
test/nemoclaw-start-preload-gateway.test.ts, ci/test-file-size-budget.json
Adds persistent log mirroring and symlink-refusal tests, and lowers the legacy line budget for test/nemoclaw-start.test.ts.

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

Suggested labels: area: e2e, bug-fix

Suggested reviewers: cv, ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the Hermes test regex change, which is the main objective of the PR.
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.
✨ 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/rebuild-hermes-version-regex

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

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: rebuild-hermes, rebuild-hermes-stale-base

Dispatch hint: rebuild-hermes,rebuild-hermes-stale-base

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No required E2E is recommended because this is a tests-only/CI-budget PR and cannot affect NemoClaw runtime user flows, installer/onboarding, sandbox lifecycle, credentials, security boundaries, network policy, inference routing, or deployment behavior.

Optional E2E

  • rebuild-hermes (high): Optional validation because the PR directly edits test/e2e/live/rebuild-hermes.test.ts; running the normal Hermes rebuild lane would confirm the updated version-output expectation works against the live job.
  • rebuild-hermes-stale-base (high): Optional companion validation for the same edited live test file under the stale-base rebuild mode, since this job also executes test/e2e/live/rebuild-hermes.test.ts with different rebuild setup.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e.yaml
  • jobs input: rebuild-hermes,rebuild-hermes-stale-base

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

Required E2E targets: rebuild-hermes, rebuild-hermes-stale-base
Optional E2E targets: None

Dispatch required E2E targets:

  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes-stale-base

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • rebuild-hermes: Focused free-standing E2E job wired for changed live test test/e2e/live/rebuild-hermes.test.ts.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes
  • rebuild-hermes-stale-base: Focused free-standing E2E job wired for changed live test test/e2e/live/rebuild-hermes.test.ts.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=rebuild-hermes-stale-base

Optional E2E targets

  • None.

Relevant changed files

  • test/e2e/live/rebuild-hermes.test.ts

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 2 suggestions · 4 test follow-ups
Since last review: 0 prior items resolved · 1 still applies · 1 new item found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Acceptance clause
  • PRA-T4 Add or justify test follow-up: Acceptance clause
  • PRA-1 In-scope improvement: Remove the unused embedded-preload helper left in the monolithic test file in test/nemoclaw-start.test.ts:221
  • PRA-2 In-scope improvement: Use the new shared shell-function extractor in the original test file in test/nemoclaw-start.test.ts:181

Findings index

ID Severity Category Location Required action
PRA-1 Improvement scope test/nemoclaw-start.test.ts:221 Delete runEmbeddedPreload from test/nemoclaw-start.test.ts. If a read-only search confirms no remaining startScriptHeredoc call in that file asks for CIAO_GUARD_EOF or SAFETY_NET_EOF, remove just those two fallback entries while preserving PYAUTOPAIR, SLACK_GUARD_EOF, and TELEGRAM_DIAGNOSTICS_EOF support.
PRA-2 Improvement scope test/nemoclaw-start.test.ts:181 Import extractShellFunctionFromSource from ./support/shell-function-extractor.ts in test/nemoclaw-start.test.ts and delete the local duplicate implementation.
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 2 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

  • None.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-1 Improvement — Remove the unused embedded-preload helper left in the monolithic test file

  • Location: test/nemoclaw-start.test.ts:221
  • Category: scope
  • Problem: After the gateway preload describe block moved into test/nemoclaw-start-preload-gateway.test.ts, test/nemoclaw-start.test.ts still defines runEmbeddedPreload even though the remaining monolithic tests do not call it. The startScriptHeredoc helper also still carries CIAO_GUARD_EOF and SAFETY_NET_EOF preload fallback entries that appear to have moved with the relocated preload tests.
  • Impact: Leaving the dead helper and now-unused preload fallback paths weakens the file-size cleanup and can mislead future edits into maintaining two preload harness locations when only the new focused file exercises that behavior.
  • Suggested action: Delete runEmbeddedPreload from test/nemoclaw-start.test.ts. If a read-only search confirms no remaining startScriptHeredoc call in that file asks for CIAO_GUARD_EOF or SAFETY_NET_EOF, remove just those two fallback entries while preserving PYAUTOPAIR, SLACK_GUARD_EOF, and TELEGRAM_DIAGNOSTICS_EOF support.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read test/nemoclaw-start.test.ts and search for runEmbeddedPreload( plus CIAO_GUARD_EOF/SAFETY_NET_EOF; after cleanup, runEmbeddedPreload should have no definition in the monolith and the only removed heredoc fallback entries should be the two preload markers with no remaining call sites.
  • Missing regression test: No new regression test is needed for this deletion: test/nemoclaw-start-preload-gateway.test.ts already contains the relocated gateway preload tests that exercise safety-net and ciao guard activation and the non-gateway negative case.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: The diff removes the gateway preload process detection describe block from test/nemoclaw-start.test.ts and adds it to test/nemoclaw-start-preload-gateway.test.ts, but test/nemoclaw-start.test.ts still defines runEmbeddedPreload and still includes the CIAO_GUARD_EOF/SAFETY_NET_EOF fallback mapping inside startScriptHeredoc.

PRA-2 Improvement — Use the new shared shell-function extractor in the original test file

  • Location: test/nemoclaw-start.test.ts:181
  • Category: scope
  • Problem: This PR adds test/support/shell-function-extractor.ts, but test/nemoclaw-start.test.ts still keeps an identical local extractShellFunctionFromSource implementation. That leaves two sources of truth for the same heredoc-aware shell-function scanner.
  • Impact: Future fixes to the extractor can drift between the shared support helper and the monolithic test copy, and the monolith remains larger than necessary despite this PR's file-size cleanup goal.
  • Suggested action: Import extractShellFunctionFromSource from ./support/shell-function-extractor.ts in test/nemoclaw-start.test.ts and delete the local duplicate implementation.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read test/nemoclaw-start.test.ts and test/support/shell-function-extractor.ts; after cleanup, the monolithic file should import extractShellFunctionFromSource and should not contain a local function with that name.
  • Missing regression test: Existing tests that call extractShellFunctionFromSource throughout test/nemoclaw-start.test.ts and the new persistent-log test in test/nemoclaw-start-preload-gateway.test.ts exercise the shared helper; no separate regression test is needed for replacing the duplicate with an import.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: test/support/shell-function-extractor.ts exports extractShellFunctionFromSource, while test/nemoclaw-start.test.ts still defines the same function body locally near the top of the file.
Simplification opportunities: 2 possible cuts, net -50 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-1 delete (test/nemoclaw-start.test.ts:221): Unused runEmbeddedPreload in test/nemoclaw-start.test.ts, plus the CIAO_GUARD_EOF and SAFETY_NET_EOF fallback entries if they have no remaining call sites in that file.
    • Replacement: Use the relocated runEmbeddedPreload and direct blueprint preload reads in test/nemoclaw-start-preload-gateway.test.ts for gateway preload coverage.
    • Net: -15 lines
    • Safety boundary: Do not remove startScriptHeredoc itself or its PYAUTOPAIR, SLACK_GUARD_EOF, and TELEGRAM_DIAGNOSTICS_EOF paths because remaining tests in test/nemoclaw-start.test.ts still depend on those sources.
  • PRA-2 shrink (test/nemoclaw-start.test.ts:181): The duplicate local extractShellFunctionFromSource implementation in test/nemoclaw-start.test.ts.
    • Replacement: A single import from ./support/shell-function-extractor.ts.
    • Net: -35 lines
    • Safety boundary: Keep the heredoc-aware scanner behavior intact by using the shared helper; do not simplify the scanner in a way that loses heredoc handling for shell functions containing nested braces.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Identify the runtime/live rebuild-Hermes validation that records `phase-7-hermes-version-after-rebuild` and demonstrates output like `Hermes Agent v0.17.0` is parsed to manifest `expected_version: 0.17.0`.. Static review shows the Hermes assertion now matches `v<semver>` output and the relocated gateway/log tests preserve existing coverage, but the live rebuild-Hermes path depends on runtime sandbox, Docker, OpenShell, and actual `hermes --version` behavior.
  • PRA-T2 Runtime validation — If avoiding a live run, add a tiny parser-level assertion or helper test showing `Hermes Agent v0.17.0` extracts `0.17.0` while stale calver-style output such as `(2026.6.19)` or `v2026.5.16` does not satisfy the current manifest semver expectation.. Static review shows the Hermes assertion now matches `v<semver>` output and the relocated gateway/log tests preserve existing coverage, but the live rebuild-Hermes path depends on runtime sandbox, Docker, OpenShell, and actual `hermes --version` behavior.
  • PRA-T3 Acceptance clause — Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) — no — add test evidence or identify existing coverage. No production sensitive path is changed, but the moved tests cover sandbox/gateway preload and persistent log hardening behavior, so those high-risk regression surfaces were still reviewed.
  • PRA-T4 Acceptance clause — Added new automated coverage for gateway preload detection and persistent gateway log mirroring, including safety protections. — add test evidence or identify existing coverage. test/nemoclaw-start-preload-gateway.test.ts contains the gateway preload and persistent log hardening tests, but the diff shows these were relocated from test/nemoclaw-start.test.ts rather than materially expanded.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Remove the unused embedded-preload helper left in the monolithic test file

  • Location: test/nemoclaw-start.test.ts:221
  • Category: scope
  • Problem: After the gateway preload describe block moved into test/nemoclaw-start-preload-gateway.test.ts, test/nemoclaw-start.test.ts still defines runEmbeddedPreload even though the remaining monolithic tests do not call it. The startScriptHeredoc helper also still carries CIAO_GUARD_EOF and SAFETY_NET_EOF preload fallback entries that appear to have moved with the relocated preload tests.
  • Impact: Leaving the dead helper and now-unused preload fallback paths weakens the file-size cleanup and can mislead future edits into maintaining two preload harness locations when only the new focused file exercises that behavior.
  • Suggested action: Delete runEmbeddedPreload from test/nemoclaw-start.test.ts. If a read-only search confirms no remaining startScriptHeredoc call in that file asks for CIAO_GUARD_EOF or SAFETY_NET_EOF, remove just those two fallback entries while preserving PYAUTOPAIR, SLACK_GUARD_EOF, and TELEGRAM_DIAGNOSTICS_EOF support.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read test/nemoclaw-start.test.ts and search for runEmbeddedPreload( plus CIAO_GUARD_EOF/SAFETY_NET_EOF; after cleanup, runEmbeddedPreload should have no definition in the monolith and the only removed heredoc fallback entries should be the two preload markers with no remaining call sites.
  • Missing regression test: No new regression test is needed for this deletion: test/nemoclaw-start-preload-gateway.test.ts already contains the relocated gateway preload tests that exercise safety-net and ciao guard activation and the non-gateway negative case.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: The diff removes the gateway preload process detection describe block from test/nemoclaw-start.test.ts and adds it to test/nemoclaw-start-preload-gateway.test.ts, but test/nemoclaw-start.test.ts still defines runEmbeddedPreload and still includes the CIAO_GUARD_EOF/SAFETY_NET_EOF fallback mapping inside startScriptHeredoc.

PRA-2 Improvement — Use the new shared shell-function extractor in the original test file

  • Location: test/nemoclaw-start.test.ts:181
  • Category: scope
  • Problem: This PR adds test/support/shell-function-extractor.ts, but test/nemoclaw-start.test.ts still keeps an identical local extractShellFunctionFromSource implementation. That leaves two sources of truth for the same heredoc-aware shell-function scanner.
  • Impact: Future fixes to the extractor can drift between the shared support helper and the monolithic test copy, and the monolith remains larger than necessary despite this PR's file-size cleanup goal.
  • Suggested action: Import extractShellFunctionFromSource from ./support/shell-function-extractor.ts in test/nemoclaw-start.test.ts and delete the local duplicate implementation.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read test/nemoclaw-start.test.ts and test/support/shell-function-extractor.ts; after cleanup, the monolithic file should import extractShellFunctionFromSource and should not contain a local function with that name.
  • Missing regression test: Existing tests that call extractShellFunctionFromSource throughout test/nemoclaw-start.test.ts and the new persistent-log test in test/nemoclaw-start-preload-gateway.test.ts exercise the shared helper; no separate regression test is needed for replacing the duplicate with an import.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: test/support/shell-function-extractor.ts exports extractShellFunctionFromSource, while test/nemoclaw-start.test.ts still defines the same function body locally near the top of the file.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-code-quality

github-code-quality Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/rebuild-hermes-v... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/rebuild-hermes-v... f171269 +/-
nemoclaw/src/se...cret-scanner.ts — 100% —
nemoclaw/src/commands/slash.ts — 100% —
nemoclaw/src/li...bprocess-env.ts — 100% —
nemoclaw/src/bl...eprint/state.ts — 98% —
nemoclaw/src/onboard/config.ts — 98% —
nemoclaw/src/bl...int/snapshot.ts — 97% —
nemoclaw/src/bl...print/runner.ts — 95% —
nemoclaw/src/co...ration-state.ts — 94% —
nemoclaw/src/bl...ate-networks.ts — 94% —
nemoclaw/src/index.ts — 94% —

TypeScript / code-coverage/cli

The overall coverage in the fix/rebuild-hermes-v... branch is 68%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/rebuild-hermes-v... f171269 +/-
src/lib/shields...nsition-lock.ts — 86% —
src/lib/actions...dbox/rebuild.ts — 80% —
src/lib/actions...all/run-plan.ts — 80% —
src/lib/state/o...oard-session.ts — 80% —
src/lib/state/sandbox.ts — 72% —
src/lib/shields/index.ts — 69% —
src/lib/onboard/preflight.ts — 69% —
src/lib/onboard...er-gpu-patch.ts — 59% —
src/lib/actions...licy-channel.ts — 58% —
src/lib/onboard.ts — 20% —

Updated July 01, 2026 20:47 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-1: Hermes version regex fixed to match v-prefixed semver output; then add or justify PRA-T1.
Open items: 1 required · 1 warning · 3 suggestions · 1 test follow-up
Since last review: 1 prior item resolved · 3 still apply · 0 new items found

Action checklist

  • PRA-1 Fix: Hermes version regex fixed to match v-prefixed semver output in test/e2e/live/rebuild-hermes.test.ts:697
  • PRA-2 Resolve or justify: Merge conflict risk with PR feat(mcp): add OpenShell-managed MCP servers #5876 on same files in ci/test-file-size-budget.json:1
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-3 In-scope improvement: New test file uses @ts-nocheck directive in test/nemoclaw-start-preload-gateway.test.ts:1
  • PRA-4 In-scope improvement: Inline script helper pattern for preload testing in test/nemoclaw-start-preload-gateway.test.ts:15
  • PRA-5 In-scope improvement: Shared shell function extractor eliminates 7+ duplicated implementations in test/support/shell-function-extractor.ts:1

Findings index

ID Severity Category Location Required action
PRA-1 Required correctness test/e2e/live/rebuild-hermes.test.ts:697 No action needed — fix is correct and already in this PR. Aligns test with actual CLI behavior and update script expectations.
PRA-2 Resolve/justify architecture ci/test-file-size-budget.json:1 Coordinate with PR #5876 author to resolve merge conflict before either lands. No code change required in this PR.
PRA-3 Improvement scope test/nemoclaw-start-preload-gateway.test.ts:1 Consider if type safety can be improved incrementally (e.g., typed helper functions, separating transpilation logic). Not a blocker for this refactor PR.
PRA-4 Improvement scope test/nemoclaw-start-preload-gateway.test.ts:15 Consider extracting a reusable test helper for preload script testing if more such tests are added. Current approach is acceptable for the two test suites moved.
PRA-5 Improvement correctness test/support/shell-function-extractor.ts:1 Consider updating the other 6 test files to import from the shared module in a follow-up PR.

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-1 Required — Hermes version regex fixed to match v-prefixed semver output

  • Location: test/e2e/live/rebuild-hermes.test.ts:697
  • Category: correctness
  • Problem: Regex changed from /\\(\\(\\d+\\.\\d+\\.\\d+\\)\\)/ to /v(\\d+\\.\\d+\\.\\d+)/ to match actual `hermes --version` CLI output format (v-prefixed semver). The update script scripts/update-hermes-agent.sh:464 validates against v${SEMVER}, and OLD_HERMES_VERSION = "v2026.5.16" constant confirms v-prefixed format. This fixes a regression from PR fix(sandbox): compare hermes agent version in its runtime scheme #6089 where Hermes versioning changed from calver to semver.
  • Impact: Without this fix, the live E2E test falsely fails on version mismatch despite successful rebuild. The test extracts version from CLI output and compares against manifest's expected_version.
  • Required action: No action needed — fix is correct and already in this PR. Aligns test with actual CLI behavior and update script expectations.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Run `hermes --version` in a Hermes sandbox; output should match v\\d+\\.\\d+\\.\\d+ pattern. Check scripts/update-hermes-agent.sh:464 expects v${SEMVER}.
  • Missing regression test: Existing live E2E test covers this; no additional test needed.
  • Done when: The required change is committed and verification passes: Run `hermes --version` in a Hermes sandbox; output should match v\\d+\\.\\d+\\.\\d+ pattern. Check scripts/update-hermes-agent.sh:464 expects v${SEMVER}.
  • Evidence: Diff shows single-line regex change at line 697. PR body confirms regression from fix(sandbox): compare hermes agent version in its runtime scheme #6089. Update script and OLD_HERMES_VERSION constant confirm v-prefixed format.
Review findings by urgency: 1 required fix, 1 item to resolve/justify, 3 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-2 Resolve/justify — Merge conflict risk with PR #5876 on same files

  • Location: ci/test-file-size-budget.json:1
  • Category: architecture
  • Problem: PR feat(mcp): add OpenShell-managed MCP servers #5876 (feat(mcp): add OpenShell-managed MCP servers) also modifies ci/test-file-size-budget.json and test/e2e/live/rebuild-hermes.test.ts. Both PRs target the same files; merge conflict likely when either lands.
  • Impact: Merge conflict will require manual resolution. Could delay one or both PRs.
  • Recommended action: Coordinate with PR feat(mcp): add OpenShell-managed MCP servers #5876 author to resolve merge conflict before either lands. No code change required in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check git merge-base and diff between this branch and PR feat(mcp): add OpenShell-managed MCP servers #5876 on test/e2e/live/rebuild-hermes.test.ts and ci/test-file-size-budget.json.
  • Missing regression test: Not applicable — merge coordination item.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check git merge-base and diff between this branch and PR feat(mcp): add OpenShell-managed MCP servers #5876 on test/e2e/live/rebuild-hermes.test.ts and ci/test-file-size-budget.json.
  • Evidence: Drift context shows PR feat(mcp): add OpenShell-managed MCP servers #5876 in openPrOverlaps with sameFiles containing both modified files.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-3 Improvement — New test file uses @ts-nocheck directive

  • Location: test/nemoclaw-start-preload-gateway.test.ts:1
  • Category: scope
  • Problem: New test file uses @ts-nocheck directive, consistent with 18 other test files in the codebase. The directive disables type checking for the entire file. The file imports typescript and uses ts.transpileModule for runtime transpilation of channel preload scripts.
  • Impact: Type safety disabled for new test file; potential for undetected type errors in test helpers.
  • Suggested action: Consider if type safety can be improved incrementally (e.g., typed helper functions, separating transpilation logic). Not a blocker for this refactor PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Review the 18 other @ts-nocheck test files in the codebase for consistency. Check if any have been incrementally typed.
  • Missing regression test: Not applicable — code quality item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: File starts with // @ts-nocheck. Grep shows 18 other test files with same directive.

PRA-4 Improvement — Inline script helper pattern for preload testing

  • Location: test/nemoclaw-start-preload-gateway.test.ts:15
  • Category: scope
  • Problem: The runEmbeddedPreload helper spawns Node with an inline script string that embeds the preload script content. This pattern was already in the original nemoclaw-start.test.ts and is now moved with the tests. The process.title and process.argv manipulation simulates the gateway process detection logic.
  • Impact: Test helper is functional but not reusable; pattern may be duplicated if more preload tests are added.
  • Suggested action: Consider extracting a reusable test helper for preload script testing if more such tests are added. Current approach is acceptable for the two test suites moved.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check if similar patterns exist in other nemoclaw-start-*.test.ts files.
  • Missing regression test: Not applicable — code quality item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: runEmbeddedPreload function at line 15 constructs inline script with process.title/argv manipulation.

PRA-5 Improvement — Shared shell function extractor eliminates 7+ duplicated implementations

  • Location: test/support/shell-function-extractor.ts:1
  • Category: correctness
  • Problem: The extractShellFunctionFromSource function was duplicated across 7+ test files (nemoclaw-start.test.ts, repro-4538-raw-doctor-perms.test.ts, hermes-runtime-api-key.test.ts, nemoclaw-start-gateway-marker.test.ts, hermes-start-config-integrity.test.ts, hermes-start.test.ts, repro-2681-group-writable.test.ts). This PR extracts it to a shared support module — excellent simplification.
  • Impact: Reduces code duplication and ensures consistent heredoc-aware parsing across all test files using it.
  • Suggested action: Consider updating the other 6 test files to import from the shared module in a follow-up PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Grep for 'function extractShellFunctionFromSource' in test/ — should only find the shared module and the 6 remaining inline copies.
  • Missing regression test: Not applicable — simplification item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: New shared module at test/support/shell-function-extractor.ts imported by nemoclaw-start-preload-gateway.test.ts. Six other test files still have inline copies.
Simplification opportunities: 2 possible cuts, net -200 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-1 shrink (test/e2e/live/rebuild-hermes.test.ts:697): /\\(\\(\\d+\\.\\d+\\.\\d+\\)\\)/
    • Replacement: /v(\\d+\\.\\d+\\.\\d+)/
    • Net: 0 lines
    • Safety boundary: Version extraction must still match manifest's expected_version (semver without prefix)
  • PRA-5 delete (test/support/shell-function-extractor.ts:1): 6 inline copies of extractShellFunctionFromSource across test files
    • Replacement: import { extractShellFunctionFromSource } from "./support/shell-function-extractor.ts"
    • Net: -200 lines
    • Safety boundary: Heredoc handling logic must remain identical; all existing tests must pass
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — CI budget check validates test-file-size-budget.json change on PR merge. Runtime/sandbox/infrastructure paths need behavioral runtime validation: ci/test-file-size-budget.json change validated by CI budget check on PR. All other test changes are unit/integration tests with good negative-path coverage.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Required — Hermes version regex fixed to match v-prefixed semver output

  • Location: test/e2e/live/rebuild-hermes.test.ts:697
  • Category: correctness
  • Problem: Regex changed from /\\(\\(\\d+\\.\\d+\\.\\d+\\)\\)/ to /v(\\d+\\.\\d+\\.\\d+)/ to match actual `hermes --version` CLI output format (v-prefixed semver). The update script scripts/update-hermes-agent.sh:464 validates against v${SEMVER}, and OLD_HERMES_VERSION = "v2026.5.16" constant confirms v-prefixed format. This fixes a regression from PR fix(sandbox): compare hermes agent version in its runtime scheme #6089 where Hermes versioning changed from calver to semver.
  • Impact: Without this fix, the live E2E test falsely fails on version mismatch despite successful rebuild. The test extracts version from CLI output and compares against manifest's expected_version.
  • Required action: No action needed — fix is correct and already in this PR. Aligns test with actual CLI behavior and update script expectations.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Run `hermes --version` in a Hermes sandbox; output should match v\\d+\\.\\d+\\.\\d+ pattern. Check scripts/update-hermes-agent.sh:464 expects v${SEMVER}.
  • Missing regression test: Existing live E2E test covers this; no additional test needed.
  • Done when: The required change is committed and verification passes: Run `hermes --version` in a Hermes sandbox; output should match v\\d+\\.\\d+\\.\\d+ pattern. Check scripts/update-hermes-agent.sh:464 expects v${SEMVER}.
  • Evidence: Diff shows single-line regex change at line 697. PR body confirms regression from fix(sandbox): compare hermes agent version in its runtime scheme #6089. Update script and OLD_HERMES_VERSION constant confirm v-prefixed format.

PRA-2 Resolve/justify — Merge conflict risk with PR #5876 on same files

  • Location: ci/test-file-size-budget.json:1
  • Category: architecture
  • Problem: PR feat(mcp): add OpenShell-managed MCP servers #5876 (feat(mcp): add OpenShell-managed MCP servers) also modifies ci/test-file-size-budget.json and test/e2e/live/rebuild-hermes.test.ts. Both PRs target the same files; merge conflict likely when either lands.
  • Impact: Merge conflict will require manual resolution. Could delay one or both PRs.
  • Recommended action: Coordinate with PR feat(mcp): add OpenShell-managed MCP servers #5876 author to resolve merge conflict before either lands. No code change required in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check git merge-base and diff between this branch and PR feat(mcp): add OpenShell-managed MCP servers #5876 on test/e2e/live/rebuild-hermes.test.ts and ci/test-file-size-budget.json.
  • Missing regression test: Not applicable — merge coordination item.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check git merge-base and diff between this branch and PR feat(mcp): add OpenShell-managed MCP servers #5876 on test/e2e/live/rebuild-hermes.test.ts and ci/test-file-size-budget.json.
  • Evidence: Drift context shows PR feat(mcp): add OpenShell-managed MCP servers #5876 in openPrOverlaps with sameFiles containing both modified files.

PRA-3 Improvement — New test file uses @ts-nocheck directive

  • Location: test/nemoclaw-start-preload-gateway.test.ts:1
  • Category: scope
  • Problem: New test file uses @ts-nocheck directive, consistent with 18 other test files in the codebase. The directive disables type checking for the entire file. The file imports typescript and uses ts.transpileModule for runtime transpilation of channel preload scripts.
  • Impact: Type safety disabled for new test file; potential for undetected type errors in test helpers.
  • Suggested action: Consider if type safety can be improved incrementally (e.g., typed helper functions, separating transpilation logic). Not a blocker for this refactor PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Review the 18 other @ts-nocheck test files in the codebase for consistency. Check if any have been incrementally typed.
  • Missing regression test: Not applicable — code quality item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: File starts with // @ts-nocheck. Grep shows 18 other test files with same directive.

PRA-4 Improvement — Inline script helper pattern for preload testing

  • Location: test/nemoclaw-start-preload-gateway.test.ts:15
  • Category: scope
  • Problem: The runEmbeddedPreload helper spawns Node with an inline script string that embeds the preload script content. This pattern was already in the original nemoclaw-start.test.ts and is now moved with the tests. The process.title and process.argv manipulation simulates the gateway process detection logic.
  • Impact: Test helper is functional but not reusable; pattern may be duplicated if more preload tests are added.
  • Suggested action: Consider extracting a reusable test helper for preload script testing if more such tests are added. Current approach is acceptable for the two test suites moved.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check if similar patterns exist in other nemoclaw-start-*.test.ts files.
  • Missing regression test: Not applicable — code quality item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: runEmbeddedPreload function at line 15 constructs inline script with process.title/argv manipulation.

PRA-5 Improvement — Shared shell function extractor eliminates 7+ duplicated implementations

  • Location: test/support/shell-function-extractor.ts:1
  • Category: correctness
  • Problem: The extractShellFunctionFromSource function was duplicated across 7+ test files (nemoclaw-start.test.ts, repro-4538-raw-doctor-perms.test.ts, hermes-runtime-api-key.test.ts, nemoclaw-start-gateway-marker.test.ts, hermes-start-config-integrity.test.ts, hermes-start.test.ts, repro-2681-group-writable.test.ts). This PR extracts it to a shared support module — excellent simplification.
  • Impact: Reduces code duplication and ensures consistent heredoc-aware parsing across all test files using it.
  • Suggested action: Consider updating the other 6 test files to import from the shared module in a follow-up PR.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Grep for 'function extractShellFunctionFromSource' in test/ — should only find the shared module and the 6 remaining inline copies.
  • Missing regression test: Not applicable — simplification item.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: New shared module at test/support/shell-function-extractor.ts imported by nemoclaw-start-preload-gateway.test.ts. Six other test files still have inline copies.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

… legacy budget

test/nemoclaw-start.test.ts had grown to 5043 lines, 96 lines above its
legacy budget of 4947. Move the self-contained "gateway preload process
detection" and "persistent gateway log hardening" describe blocks to a new
test/nemoclaw-start-preload-gateway.test.ts with their required helper
functions duplicated inline. Original file now sits at 4937 lines; budget
entry updated accordingly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

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

🧹 Nitpick comments (1)
test/nemoclaw-start-preload-gateway.test.ts (1)

48-77: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Brace-matching is line-based and only tracks heredocs, not nested { ... } blocks.

extractShellFunctionFromSource closes on the first line that is exactly }, skipping only heredoc bodies. It works for start_persistent_gateway_log_mirror (whose subshell is a single-line { ... } &, per context snippet 1), but would break if a future extracted function contains a multi-line brace block ending on its own } line. Low priority given current usage, but worth a comment noting the limitation for future maintainers.

🤖 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 `@test/nemoclaw-start-preload-gateway.test.ts` around lines 48 - 77, The brace
parsing in extractShellFunctionFromSource only detects the first standalone
closing brace and ignores nested multi-line { ... } blocks, so update the helper
to either track nested brace depth or explicitly document this limitation near
the function name. Keep the logic around heredoc handling intact, and reference
extractShellFunctionFromSource so future maintainers know the parser is
intentionally line-based and limited to the current shell patterns.
🤖 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.

Nitpick comments:
In `@test/nemoclaw-start-preload-gateway.test.ts`:
- Around line 48-77: The brace parsing in extractShellFunctionFromSource only
detects the first standalone closing brace and ignores nested multi-line { ... }
blocks, so update the helper to either track nested brace depth or explicitly
document this limitation near the function name. Keep the logic around heredoc
handling intact, and reference extractShellFunctionFromSource so future
maintainers know the parser is intentionally line-based and limited to the
current shell patterns.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5445f717-4680-4982-a1e2-3c1808140a6d

📥 Commits

Reviewing files that changed from the base of the PR and between b7116b7 and d88d4b2.

📒 Files selected for processing (3)
  • ci/test-file-size-budget.json
  • test/nemoclaw-start-preload-gateway.test.ts
  • test/nemoclaw-start.test.ts
💤 Files with no reviewable changes (1)
  • test/nemoclaw-start.test.ts
✅ Files skipped from review due to trivial changes (1)
  • ci/test-file-size-budget.json

prekshivyas and others added 2 commits July 1, 2026 13:34
…statement guardrail

The relocated test file added 8 if statements (from duplicated helpers)
which tripped the codebase-growth-guardrails "no new if statements in
test files" check. Extract extractShellFunctionFromSource into
test/support/shell-function-extractor.ts (a non-test file excluded from
the guardrail) and replace the startScriptHeredoc calls with direct
fs.readFileSync for the two preload marker constants.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

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

🧹 Nitpick comments (2)
test/support/shell-function-extractor.ts (1)

16-38: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Brace matching lacks depth tracking; <<- heredoc terminators aren't tab-stripped.

Two robustness gaps in this now-shared helper:

  1. bareLine === "}" (Line 32) terminates on the first standalone closing brace, so any nested block (subshell, trap, inner function def) with its own } on its own line would truncate extraction early.
  2. For <<- heredocs (Line 28), bash strips only leading tabs from the body and terminator line before comparison, but heredocEnd comparison (Line 23) compares the raw bareLine without stripping leading tabs — an indented <<- terminator would never match, leaving heredocEnd set and either silently corrupting the extracted body or triggering the "Expected closing brace" error.

Neither is currently triggered by start_persistent_gateway_log_mirror (no nested brace-only lines or <<- heredocs there), but as a shared utility this will silently misbehave for other functions.

🔧 Suggested fix: track brace depth and strip tabs for `<<-`
   const bodyStart = start + header.length;
   const lines = src.slice(bodyStart).split(/(?<=\n)/);
   let offset = 0;
   let heredocEnd: string | undefined;
+  let depth = 0;
+  let stripTabs = false;
   for (const line of lines) {
     const bareLine = line.replace(/\r?\n$/, "");
     if (heredocEnd) {
       offset += line.length;
-      if (bareLine === heredocEnd) {
+      const comparable = stripTabs ? bareLine.replace(/^\t+/, "") : bareLine;
+      if (comparable === heredocEnd) {
         heredocEnd = undefined;
       }
       continue;
     }
-    const heredoc = line.match(/<<-?\s*['"]?([A-Za-z_][A-Za-z0-9_]*)['"]?/);
+    const heredoc = line.match(/<<(-?)\s*['"]?([A-Za-z_][A-Za-z0-9_]*)['"]?/);
     if (heredoc) {
-      heredocEnd = heredoc[1];
+      heredocEnd = heredoc[2];
+      stripTabs = heredoc[1] === "-";
     }
-    if (bareLine === "}") {
+    if (/\{\s*$/.test(bareLine.trimEnd()) && bareLine.trim() !== "}") depth++;
+    if (bareLine.trim() === "}") {
+      if (depth > 0) {
+        depth--;
+      } else {
       return `${name}() {${src.slice(bodyStart, bodyStart + offset)}\n}`;
+      }
     }
     offset += line.length;
   }
🤖 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 `@test/support/shell-function-extractor.ts` around lines 16 - 38, The shared
shell extraction helper is too naive: it stops at the first standalone "}" and
does not handle indented `<<-` heredoc terminators correctly. Update the brace
scanning logic in `shell-function-extractor` to track nested brace depth so `}`
only ends the outer function body, and adjust the heredoc termination check to
ignore leading tabs when `heredocEnd` was opened with `<<-`. Keep the fix
localized to the helper used for functions like
`start_persistent_gateway_log_mirror` so extraction remains accurate for other
scripts.
test/nemoclaw-start-preload-gateway.test.ts (1)

85-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing symmetric ciao-guard non-activation test.

Only safetyNetScript is checked for non-installation on non-gateway commands (Line 85-89); there's no analogous assertion for ciaoGuardScript not activating under openclaw agent. Worth adding for full behavioral coverage of both guard scripts.

✅ Suggested additional test
   it("does not install the safety net for non-gateway CLI commands", () => {
     const run = runEmbeddedPreload(safetyNetScript, "/usr/local/bin/openclaw", "agent");
     expect(run.status).toBe(0);
     expect(run.stderr).not.toContain("[sandbox-safety-net] loaded");
   });
+
+  it("does not install the ciao guard for non-gateway CLI commands", () => {
+    const run = runEmbeddedPreload(ciaoGuardScript, "/usr/local/bin/openclaw", "agent");
+    expect(run.status).toBe(0);
+    expect(run.stderr).not.toContain("[guard] ciao-network-guard loaded");
+  });
 });
🤖 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 `@test/nemoclaw-start-preload-gateway.test.ts` around lines 85 - 89, The
preload gateway test only verifies that safetyNetScript stays inactive for
non-gateway commands, so add the same symmetric coverage for ciaoGuardScript
when running openclaw agent. Extend the existing non-gateway CLI test or add a
nearby test in nemoclaw-start-preload-gateway.test.ts that uses
runEmbeddedPreload with ciaoGuardScript and asserts the guard does not load,
matching the existing safety net assertion pattern.
🤖 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.

Nitpick comments:
In `@test/nemoclaw-start-preload-gateway.test.ts`:
- Around line 85-89: The preload gateway test only verifies that safetyNetScript
stays inactive for non-gateway commands, so add the same symmetric coverage for
ciaoGuardScript when running openclaw agent. Extend the existing non-gateway CLI
test or add a nearby test in nemoclaw-start-preload-gateway.test.ts that uses
runEmbeddedPreload with ciaoGuardScript and asserts the guard does not load,
matching the existing safety net assertion pattern.

In `@test/support/shell-function-extractor.ts`:
- Around line 16-38: The shared shell extraction helper is too naive: it stops
at the first standalone "}" and does not handle indented `<<-` heredoc
terminators correctly. Update the brace scanning logic in
`shell-function-extractor` to track nested brace depth so `}` only ends the
outer function body, and adjust the heredoc termination check to ignore leading
tabs when `heredocEnd` was opened with `<<-`. Keep the fix localized to the
helper used for functions like `start_persistent_gateway_log_mirror` so
extraction remains accurate for other scripts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ff39d22e-2826-4764-86cb-00e8a95ed5d5

📥 Commits

Reviewing files that changed from the base of the PR and between b06bee3 and f171269.

📒 Files selected for processing (2)
  • test/nemoclaw-start-preload-gateway.test.ts
  • test/support/shell-function-extractor.ts

@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Jul 1, 2026
@wscurran

wscurran commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@apurvvkumaria
apurvvkumaria merged commit 8d57b66 into main Jul 1, 2026
45 checks passed
@apurvvkumaria
apurvvkumaria deleted the fix/rebuild-hermes-version-regex branch July 1, 2026 21:55
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
…IA#6138)

## Summary

After NVIDIA#6089 merged (re-pinning the Hermes manifest to semver `0.17.0`),
the `rebuild-hermes` live test started failing on main. The regex at
line 696 was extracting a calver version in parentheses — `(2026.6.19)`
— but the version output now uses a semver tag format — `v0.17.0`. The
two never match.

## Related Issue

Regression introduced by NVIDIA#6089 (merged as `2ab9e525`). The live
`rebuild-hermes` test doesn't run on PRs so it merged green.

## Changes

- `test/e2e/live/rebuild-hermes.test.ts:696` — change
`/\((\d+\.\d+\.\d+)\)/` to `/v(\d+\.\d+\.\d+)/`

## Type of Change

- [x] Code change (feature, bug fix, or refactor)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [x] Docs not applicable — justification: live test fix, no user-facing
change
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging) — no

## Verification

- [x] Git hooks passed during commit and push
- [x] No secrets, API keys, or credentials committed

---
Signed-off-by: Prekshi Vyas <[email protected]>

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

* **Tests**
* Updated end-to-end Hermes version parsing to match the latest CLI
output format.
* Added new test coverage for `nemoclaw-start` gateway preload selection
and persistent gateway log mirroring, including refusal on unsafe
symlinked log directories.
* Removed overlapping preload/log hardening suites from the existing
`nemoclaw-start` test file.
* Introduced a helper to extract shell functions from script sources for
more reliable testing.
* **Chores**
* Adjusted the `nemoclaw-start` test file size budget to reflect the new
suite layout.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
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 bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants