Skip to content

fix(hermes): repair legacy dashboard startup - #8550

Merged
jyaunches merged 2 commits into
mainfrom
agent/fix-hermes-legacy-dashboard-startup
Aug 7, 2026
Merged

fix(hermes): repair legacy dashboard startup#8550
jyaunches merged 2 commits into
mainfrom
agent/fix-hermes-legacy-dashboard-startup

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep the managed Hermes Dashboard inside NemoClaw's prepared, privilege-separated profile by passing upstream Hermes' --isolated flag.
  • Prevent Hermes from treating profiles/dashboard-home as a request to re-exec into its unified machine-level Dashboard.
  • Extend the existing Dashboard argument contract without changing ports, credentials, migration, permissions, or retry behavior.

Affected main evidence

  • Run: https://github.com/NVIDIA/NemoClaw/actions/runs/31171807086
  • Job: sandbox-images-and-e2e / test-hermes-sandbox-image (92846562212)
  • Candidate: c31724f4e66e4d9abd0baab2ff68181830a4750a
  • Scenario: hermes root-entrypoint smoke preserves runtime layout and legacy state migration
  • Signal: after the legacy profile is migrated and seeded, the Dashboard service owner exits before binding 127.0.0.1:19119; the container exits 1.

Root cause

Hermes v2026.7.20 infers a named profile from a HERMES_HOME path under profiles/<name>. Without --isolated, hermes dashboard routes that launch to its unified machine-level Dashboard and leaves NemoClaw's prepared profile boundary. The legacy-state variant populates that profile before launch, exposing the route and causing the Dashboard owner to exit before the internal port binds.

Ownership search

  • No open PR matches the exact bind-exit text, port 19119, or start_socat_forwarder path.
  • No open PR edits agents/hermes/start.sh or test/e2e/live/hermes-root-entrypoint-smoke.test.ts.
  • fix(hermes): align dashboard WhatsApp session path #8229 concerns the Dashboard WhatsApp session path and does not touch this startup boundary.

Validation

  • npx vitest run --project integration test/hermes-start.test.ts test/hermes-dashboard-credential-launch.test.ts test/hermes-dashboard-profile-migration-security.test.ts (47 passed)
  • npm run build:cli
  • npm run validate:pr
  • The three failing cases in test/seed-hermes-dashboard-config.test.ts reproduce unchanged on main; they are outside this patch and this root cause.

Security review

  • --isolated keeps the Dashboard in the sandbox-owned profile that NemoClaw already prepares and permission-separates.
  • Loopback host/bind, gateway credential handoff, fail-closed migration, and filesystem permissions are unchanged.
  • No timeout, retry, test-coverage, or network-policy weakening; no E2E workflow was manually dispatched.

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

Summary by CodeRabbit

  • Bug Fixes

    • Improved Hermes dashboard startup reliability by running the dashboard in isolated mode.
    • Prevented unintended dashboard re-execution in unified environments.
  • Tests

    • Added coverage confirming isolated dashboard behavior.
    • Preserved the opt-in behavior of the Hermes TUI flag.

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

copy-pr-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Hermes dashboard argument construction now includes --isolated. Comments explain the dedicated dashboard profile behavior. Tests verify that --tui remains opt-in and combines with --isolated.

Changes

Hermes dashboard execution

Layer / File(s) Summary
Isolated dashboard launch
agents/hermes/start.sh, test/hermes-start.test.ts
The dashboard command adds --isolated and documents its use with HERMES_DASHBOARD_HOME. Tests verify that default arguments omit --tui, while opt-in arguments include both flags.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: apurvvkumaria, cjagwani, brandonpelfrey

🚥 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 clearly describes the main change: fixing legacy Hermes Dashboard startup.
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 agent/fix-hermes-legacy-dashboard-startup

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

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

Copy link
Copy Markdown
Collaborator Author

Maintainer security review for candidate 931fc55b8:

  • --isolated opts out of Hermes' unified machine-level Dashboard routing and keeps execution anchored in NemoClaw's already prepared, sandbox-owned profiles/dashboard-home boundary.
  • Dashboard loopback host/bind, gateway credential handoff, fail-closed profile migration, runtime ownership, and filesystem permissions are unchanged.
  • The patch adds no credential exposure, privilege expansion, external network path, timeout increase, retry, or coverage reduction.
  • Focused credential-launch and profile-migration security tests pass, and the repository's ShellCheck, gitleaks, and complete validate:pr gate pass.

No manual E2E workflow was dispatched.

@prekshivyas
prekshivyas marked this pull request as ready for review August 7, 2026 11:36
@github-code-quality

github-code-quality Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 931fc55 in the agent/fix-hermes-leg... branch remains at 96%, unchanged from commit c31724f in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 931fc55 in the agent/fix-hermes-leg... branch remains at 81%, unchanged from commit d8fbb6e in the main branch.

Show a code coverage summary of the most impacted files.
File main d8fbb6e agent/fix-hermes-leg... 931fc55 +/-
src/lib/core/pr...mpt-activity.ts 92% 67% -25%
src/lib/agent/d...e-base-image.ts 100% 86% -14%
src/lib/inferen...board-probes.ts 95% 94% -1%
src/lib/shields/index.ts 82% 83% +1%
src/lib/credentials/store.ts 55% 56% +1%
src/lib/trace.ts 90% 94% +4%
src/lib/messagi...onfig-parser.ts 93% 100% +7%
src/lib/messagi...ink-base-url.ts 90% 100% +10%
src/lib/onboard...flight-ports.ts 33% 67% +34%
src/lib/shields...-convergence.ts 0% 75% +75%

Updated August 07, 2026 11:47 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: 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 `@test/hermes-start.test.ts`:
- Around line 851-854: Update the test case “keeps the managed dashboard
isolated and its in-browser Hermes TUI opt-in” to also assert that
defaultArgs.stdout.split("\n") contains “--isolated”, while preserving the
existing status and --tui omission assertions.
🪄 Autofix

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: cc4f368c-ef6e-4335-8cfd-e6ef8ffdde3d

📥 Commits

Reviewing files that changed from the base of the PR and between c31724f and 931fc55.

📒 Files selected for processing (2)
  • agents/hermes/start.sh
  • test/hermes-start.test.ts

Comment thread test/hermes-start.test.ts
Comment on lines +851 to 854
it("keeps the managed dashboard isolated and its in-browser Hermes TUI opt-in", () => {
const defaultArgs = runHermesDashboardArgs();
expect(defaultArgs.status).toBe(0);
expect(defaultArgs.stdout.split("\n")).not.toContain("--tui");

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert --isolated for the default dashboard path.

Lines 852-854 only verify that default arguments omit --tui. A regression that removes --isolated from the default path would still pass. Add an assertion that defaultArgs.stdout.split("\n") contains --isolated.

Proposed test assertion
     const defaultArgs = runHermesDashboardArgs();
     expect(defaultArgs.status).toBe(0);
+    expect(defaultArgs.stdout.split("\n")).toContain("--isolated");
     expect(defaultArgs.stdout.split("\n")).not.toContain("--tui");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it("keeps the managed dashboard isolated and its in-browser Hermes TUI opt-in", () => {
const defaultArgs = runHermesDashboardArgs();
expect(defaultArgs.status).toBe(0);
expect(defaultArgs.stdout.split("\n")).not.toContain("--tui");
it("keeps the managed dashboard isolated and its in-browser Hermes TUI opt-in", () => {
const defaultArgs = runHermesDashboardArgs();
expect(defaultArgs.status).toBe(0);
expect(defaultArgs.stdout.split("\n")).toContain("--isolated");
expect(defaultArgs.stdout.split("\n")).not.toContain("--tui");
🤖 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/hermes-start.test.ts` around lines 851 - 854, Update the test case
“keeps the managed dashboard isolated and its in-browser Hermes TUI opt-in” to
also assert that defaultArgs.stdout.split("\n") contains “--isolated”, while
preserving the existing status and --tui omission assertions.

Source: Path instructions

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · medium confidence · 0 blockers · 1 warning · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; severity counts match.
2 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • unified machine at agents/hermes/start.sh:1447: selected only by the second-opinion lane as define.
  • isolated at agents/hermes/start.sh:1456: selected only by the second-opinion lane as established.
2 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • ubuntu-repo-cloud-openclaw: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • ubuntu-repo-docker-post-reboot-recovery: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

1 semantic terminology decision

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — unified machine dashboard at agents/hermes/start.sh:1447: Keep this modifier because it identifies why --isolated is required and does not conflict with an established repository term.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: full-e2e, hermes-e2e, hermes-inference-switch, managed-image-multiarch-startup, security-posture, bedrock-runtime-compatible-anthropic, channels-stop-start, dashboard-remote-bind, hermes-shields-config

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Cover isolation in the default dashboard launch arguments

  • Location: test/hermes-start.test.ts:852
  • Category: security
  • Problem: The dashboard argument test checks that the default launch omits --tui, but it asserts --isolated only in the HERMES_DASHBOARD_TUI=1 case.
  • Impact: A future conditional change can omit --isolated in the default dashboard launch while this test still passes, allowing Hermes to re-exec outside the prepared profile boundary.
  • Recommendation: Assert that defaultArgs includes --isolated, while retaining the existing assertion that it omits --tui.
  • Verification: Read test/hermes-start.test.ts:851-858 and confirm the default run asserts --isolated independently of the TUI-enabled run.
  • Test coverage: Extend the existing dashboard argument test so runHermesDashboardArgs() without a TUI value must include --isolated and must not include --tui.
  • Evidence: agents/hermes/start.sh:1448-1459 adds --isolated before the optional --tui argument. test/hermes-start.test.ts:852-855 exercises the default branch without asserting --isolated. test/hermes-start.test.ts:856-858 asserts --isolated only with HERMES_DASHBOARD_TUI=1.

Workflow run details

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

@jyaunches
jyaunches merged commit 20ca197 into main Aug 7, 2026
93 of 97 checks passed
@jyaunches
jyaunches deleted the agent/fix-hermes-legacy-dashboard-startup branch August 7, 2026 11:50
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants