test(e2e): migrate dashboard remote bind to Vitest#5133
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: None Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 4 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
|
✨ |
|
Superseded by #5186. |
## Summary Migrate the active `dashboard-remote-bind` Brev suite path to a small live Vitest test while keeping `test/e2e/test-dashboard-remote-bind.sh` in place per maintainer request. This uses Carlos's PR #5133 as the seed, but keeps only the direct dashboard remote-bind migration and drops the stale #5126-era framework/ledger/workflow noise. ## Related Issues Refs #5098 Refs #5133 ## Contract mapping - Legacy assertion: required CLIs are available before the remote-bind check runs. - Replacement: `test/e2e-scenario/live/dashboard-remote-bind.test.ts` runs `command -v nemoclaw && command -v openshell`. - Boundary preserved: real remote host shell/PATH. - Legacy assertion: dashboard forward is restarted before checking bind behavior. - Replacement: the Vitest test runs `openshell forward stop <dashboardPort>` then `nemoclaw <sandbox> connect`. - Boundary preserved: real OpenShell forward + real NemoClaw connect path. - Legacy assertion: `NEMOCLAW_DASHBOARD_BIND=0.0.0.0` is honored. - Replacement: `host.nemoclaw([...], { env: { NEMOCLAW_DASHBOARD_BIND: "0.0.0.0" } })`. - Boundary preserved: real environment-driven CLI behavior. - Legacy assertion: loopback-only binding is rejected/avoided and all-interface bind is proven. - Replacement: parse `openshell forward list`, fail on `127.0.0.1`/`localhost`, require `0.0.0.0`/`*` for the dashboard port. - Boundary preserved: real OpenShell forward-list output. ## Simplicity check - Test shape: simple live Vitest test with local helper functions. - New shared helpers: none. - New framework/registry/ledger: **none**. - Workflow changes: no workflow YAML change. The existing `dashboard-remote-bind` suite now invokes the live Vitest test from `test/e2e/brev-e2e.test.ts`. - Legacy shell status: `test/e2e/test-dashboard-remote-bind.sh` remains in place; this PR no longer deletes any `test/e2e` shell script. ## Verification - `NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/dashboard-remote-bind.test.ts --silent=false --reporter=default` (local opt-in live test is skipped unless `NEMOCLAW_E2E_DASHBOARD_REMOTE_BIND=1` is set by branch validation) - `npx vitest run --project cli test/e2e-script-workflow.test.ts --silent=false --reporter=default` - `git diff --check origin/main...HEAD` - `npm run build:cli && npm run typecheck:cli`
Summary
Migrates the dashboard remote-bind guard from a standalone bash script into the live Vitest E2E project. Branch validation now invokes the Vitest live test remotely for the existing
dashboard-remote-bindsuite name, preserving the workflow contract without adding another runner.Related Issue
Part of #5098.
Changes
test/e2e-scenario/live/dashboard-remote-bind.test.tswith opt-in coverage for CLI availability, dashboard forward restart,NEMOCLAW_DASHBOARD_BIND=0.0.0.0, forward-list capture, loopback rejection, and all-interface bind proof.test/e2e/brev-e2e.test.tsso thedashboard-remote-bindbranch-validation suite runs the live Vitest test remotely.test/e2e/test-dashboard-remote-bind.sh.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com