Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agents/hermes/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,9 @@ start_socat_forwarder() {
}

build_hermes_dashboard_args() {
# HERMES_DASHBOARD_HOME is a dedicated profile for privilege separation.
# Hermes otherwise treats a profiles/<name> launch as a request for its
# unified machine dashboard and re-execs outside this prepared profile.
HERMES_DASHBOARD_ARGS=(
dashboard
--host
Expand All @@ -1450,6 +1453,7 @@ build_hermes_dashboard_args() {
"$DASHBOARD_INTERNAL_PORT"
--skip-build
--no-open
--isolated
)
if hermes_dashboard_tui_enabled; then
HERMES_DASHBOARD_ARGS+=(--tui)
Expand Down
4 changes: 2 additions & 2 deletions test/hermes-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,14 +848,14 @@ describe("agents/hermes/start.sh port validation", () => {
expect(invalidOverride.stderr).toContain("Invalid NEMOCLAW_DASHBOARD_PORT");
});

it("keeps the in-browser Hermes TUI opt-in", () => {
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");
Comment on lines +851 to 854

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


const optInArgs = runHermesDashboardArgs("1");
expect(optInArgs.status).toBe(0);
expect(optInArgs.stdout.split("\n")).toContain("--tui");
expect(optInArgs.stdout.split("\n")).toEqual(expect.arrayContaining(["--isolated", "--tui"]));
});

it("rejects cross-collisions between API and dashboard ports", () => {
Expand Down
Loading