Skip to content

test(e2e): migrate channels stop/start to Vitest#5580

Open
cv wants to merge 17 commits into
mainfrom
e2e-phase6-channels-stop-start-linear
Open

test(e2e): migrate channels stop/start to Vitest#5580
cv wants to merge 17 commits into
mainfrom
e2e-phase6-channels-stop-start-linear

Conversation

@cv

@cv cv commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates the channels stop/start E2E lifecycle into the live Vitest system. The replacement keeps the OpenClaw and Hermes real install, channels CLI, rebuild, registry, provider, policy-list, and in-sandbox configuration boundaries.

Related Issue

Refs #5098

Changes

  • Add test/e2e-scenario/live/channels-stop-start.test.ts as Vitest coverage for test/e2e/test-channels-stop-start.sh.
  • Add test/e2e-scenario/live/channels-stop-start-helpers.ts to keep the test entrypoint linear while preserving channel lifecycle assertion logic.
  • Wire a matrixed channels-stop-start-vitest job into .github/workflows/e2e-vitest-scenarios.yaml for OpenClaw and Hermes.

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)

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • 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)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

Release Notes

  • Tests

    • Added a destructive “channels stop/start” live E2E scenario covering multiple messaging platforms, including credential preservation and runtime configuration toggling, with strict sandbox-name safeguards.
    • Added workflow-boundary tests to prevent CI configuration drift for the new live job.
  • CI/CD

    • Introduced a new matrix-based live Vitest run for “channels stop/start,” including per-agent isolated Docker authentication, artifact uploads, and cleanup.
    • Updated PR reporting so results include the new job in the PR table.
  • Chores

    • Improved reliability of live scenario execution with stronger isolation and validation.

@cv cv self-assigned this Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 08c5c9e9-57a7-45db-acae-843eaecffce7

📥 Commits

Reviewing files that changed from the base of the PR and between a7bf00c and 74709a7.

📒 Files selected for processing (1)
  • test/e2e-scenario/live/channels-stop-start-helpers.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e-scenario/live/channels-stop-start-helpers.ts

📝 Walkthrough

Walkthrough

Adds a new free-standing live Vitest e2e scenario for channels-stop-start that exercises credential preservation and runtime config toggling across telegram, discord, wechat, slack, and whatsapp channels. Includes a sandbox-name safety guard, per-channel assertion helpers, scenario orchestrator, CI matrix job definition, workflow-boundary validator, and regression tests.

Changes

channels-stop-start Live Vitest Scenario

Layer / File(s) Summary
Safety guard, constants, and foundational helpers
test/e2e-scenario/live/channels-stop-start-safety.ts, test/e2e-scenario/live/channels-stop-start-helpers.ts
Exports CHANNELS_STOP_START_SANDBOX_PREFIX and assertChannelsStopStartSandboxName to prevent destructive operations on non-prefixed sandboxes. Establishes agent selection, channel list, provider mappings, LIVE_TIMEOUT_MS, type aliases for channel state and token shapes, Phase6 token generation, env construction, and messaging registry reader utilities.
Per-channel assertion and validation helpers
test/e2e-scenario/live/channels-stop-start-helpers.ts
Implements messaging-plan channel state assertions verifying active/disabled semantics, credential binding presence/absence, plan input validation against env expectations, agent-specific config probing (openclaw JSON membership vs hermes env grep), provider existence checks, sandbox rebuild with redaction, runtime policy preset verification, and channel command runner for add/stop/start operations with output validation.
Scenario orchestrator and test entry point
test/e2e-scenario/live/channels-stop-start-helpers.ts, test/e2e-scenario/live/channels-stop-start.test.ts
runChannelsStopStartScenario orchestrates setup/cleanup, pre-clean preparation (gateway destroy, provider deletion), installation and readiness validation, conditional WhatsApp add, then executes and validates channel state transitions across add→stop→start phases. Each phase rebuilds the sandbox and asserts active/disabled messaging plan state, agent config presence/absence, and provider existence. channels-stop-start.test.ts registers the Vitest test conditionally on shouldRunLiveE2EScenarios().
Workflow-boundary validator
tools/e2e-scenarios/workflow-boundary.mts
Adds validateChannelsStopStartVitestJob enforcing matrix agents, fail-fast=false, per-matrix Docker auth isolation via DOCKER_CONFIG, secret exposure rejection at job/step env levels (differentiating Docker Hub login step), pinned checkout, required step command shapes, per-matrix fake token env values, artifact naming/path inclusion of matrix.agent, standard upload constraints, and always-on Docker auth cleanup. Wires into validateE2eVitestScenariosWorkflowBoundary. Reformats multi-line statements in validateTelegramInjectionVitestJob without logic changes.
CI job definition and regression/boundary support tests
.github/workflows/e2e-vitest-scenarios.yaml, test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
Adds channels-stop-start-vitest matrix job with Docker auth isolation, Docker Hub login with anonymous fallback, OpenShell install via scripts/install-openshell.sh, Vitest invocation with per-agent fake telegram/discord/wechat/slack/whatsapp tokens, artifact upload with agent-scoped paths, and Docker auth cleanup. Extends report-to-pr.needs. Adds sandbox-name safety boundary test, increases free-standing matrix timeout to 240_000, and adds comprehensive boundary regression test mutating the job definition and asserting expected validation errors for timeout, strategy, matrix, env isolation, secret exposure, step shapes, artifact constraints, and cleanup behavior.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5243: Adds the shared free-standing selector plumbing and report-to-pr expectations that this PR's channels-stop-start-vitest job slots into.
  • NVIDIA/NemoClaw#5335: Modifies workflow-boundary.mts to enforce per-job Docker auth isolation patterns that are directly reused by validateChannelsStopStartVitestJob.
  • NVIDIA/NemoClaw#5347: Adds another free-standing Vitest job validator (validateDiagnosticsVitestJob) using the same validateE2eVitestScenariosWorkflowBoundary aggregation point extended here.

Suggested labels

area: e2e

Suggested reviewers

  • jyaunches

🐇 A sandbox spins up with channels galore,
Stop them, start them — then check the store!
Telegram, Discord, WeChat, Slack too,
WhatsApp joins in when the test says "add you."
The boundary guard keeps the secrets clean,
The fluffiest CI pipeline you've ever seen! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test(e2e): migrate channels stop/start to Vitest' directly and clearly summarizes the main objective of the PR: migrating E2E tests from shell script to Vitest framework.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 e2e-phase6-channels-stop-start-linear

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

@github-code-quality

github-code-quality Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the branch is 96%. Coverage data for the branch is not yet available.

Show a code coverage summary of the most covered files.
File 74709a7 +/-
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 branch is 46%. Coverage data for the branch is not yet available.

Show a code coverage summary of the most covered files.
File 74709a7 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/inference/local.ts 76%
src/lib/sandbox/config.ts 72%
src/lib/actions...dbox/rebuild.ts 67%
src/lib/onboard/preflight.ts 64%
src/lib/actions...licy-channel.ts 56%
src/lib/state/sandbox.ts 55%
src/lib/policy/index.ts 49%
src/lib/onboard...er-gpu-patch.ts 44%
src/lib/onboard.ts 18%

Updated June 22, 2026 16:26 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: channels-stop-start-vitest
Optional E2E: channels-add-remove-vitest, messaging-providers-vitest

Dispatch hint: channels-stop-start-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • channels-stop-start-vitest (high; 90 minute timeout with openclaw and hermes matrix legs): This PR adds and wires the channels-stop-start live scenario itself. Run it to verify the new OpenClaw/Hermes matrix job, sandbox lifecycle, channel stop/start behavior, rebuild behavior, provider reuse, credential handling, registry state, and policy assertions actually work in the OpenShell sandbox.

Optional E2E

  • channels-add-remove-vitest (medium to high): Adjacent messaging-channel lifecycle coverage. Useful as a comparison baseline for channel add/remove behavior and shared provider/credential/policy plumbing, but the new stop/start job is the merge-blocking validation for this PR.
  • messaging-providers-vitest (medium): Optional confidence for the shared messaging provider contracts that the new stop/start scenario expects to remain stable across rebuild and channel toggling.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: channels-stop-start-vitest

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: channels-stop-start-vitest
Optional Vitest E2E scenarios: channels-add-remove-vitest

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • channels-stop-start-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/channels-stop-start.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-stop-start-vitest

Optional Vitest E2E scenarios

  • channels-add-remove-vitest: Adjacent messaging-channel lifecycle coverage for add/remove semantics and shared provider/channel workflow assumptions.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/channels-stop-start-helpers.ts
  • test/e2e-scenario/live/channels-stop-start-safety.ts
  • test/e2e-scenario/live/channels-stop-start.test.ts
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@github-actions

github-actions Bot commented Jun 22, 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 · 0 suggestions · 6 test follow-ups
Since last review: 2 prior items resolved · 0 still apply · 0 new items 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: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Acceptance clause
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 — workflow dispatch scenarios=channels-stop-start selects channels-stop-start-vitest and runs both openclaw and hermes matrix legs. Static review and support tests cover the workflow shape and migration parity well, but the changed behavior crosses workflow dispatch selection, Docker auth, OpenShell installation, live installer/onboard, provider storage, registry state, policy-list, rebuild, and in-sandbox OpenClaw/Hermes configuration boundaries.
  • PRA-T2 Runtime validation — channels-stop-start pre-clean destroys stale e2e-channels-stop-start-{agent} sandbox/provider state and the nemoclaw gateway before install. Static review and support tests cover the workflow shape and migration parity well, but the changed behavior crosses workflow dispatch selection, Docker auth, OpenShell installation, live installer/onboard, provider storage, registry state, policy-list, rebuild, and in-sandbox OpenClaw/Hermes configuration boundaries.
  • PRA-T3 Runtime validation — channels-stop-start cleanup destroys the e2e-channels-stop-start-{agent} sandbox and the nemoclaw gateway after the scenario. Static review and support tests cover the workflow shape and migration parity well, but the changed behavior crosses workflow dispatch selection, Docker auth, OpenShell installation, live installer/onboard, provider storage, registry state, policy-list, rebuild, and in-sandbox OpenClaw/Hermes configuration boundaries.
  • PRA-T4 Runtime validation — channels stop for telegram, discord, wechat, slack, and whatsapp followed by rebuild removes OpenClaw and Hermes runtime config while provider records remain. Static review and support tests cover the workflow shape and migration parity well, but the changed behavior crosses workflow dispatch selection, Docker auth, OpenShell installation, live installer/onboard, provider storage, registry state, policy-list, rebuild, and in-sandbox OpenClaw/Hermes configuration boundaries.
  • PRA-T5 Runtime validation — channels start for telegram, discord, wechat, slack, and whatsapp followed by rebuild restores OpenClaw and Hermes runtime config from cached providers without prompting. Static review and support tests cover the workflow shape and migration parity well, but the changed behavior crosses workflow dispatch selection, Docker auth, OpenShell installation, live installer/onboard, provider storage, registry state, policy-list, rebuild, and in-sandbox OpenClaw/Hermes configuration boundaries.
  • PRA-T6 Acceptance clause — Refs Epic: Migrate legacy bash E2E into the Vitest E2E system #5098 — add test evidence or identify existing coverage. The deterministic validation context returned linkedIssues: [], so no trusted issue Epic: Migrate legacy bash E2E into the Vitest E2E system #5098 body clauses or comments were available to extract literally. The PR body reference was treated as untrusted evidence only.

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.

Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
Comment thread test/e2e-scenario/live/channels-stop-start-helpers.ts Fixed
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 27959667575
Workflow ref: e2e-phase6-channels-stop-start-linear
Requested scenarios: (default — all supported)
Requested jobs: channels-stop-start-vitest
Summary: 1 passed, 1 failed, 54 skipped

Job Result
agent-turn-latency-vitest ⏭️ skipped
bedrock-runtime-compatible-anthropic-vitest ⏭️ skipped
brave-search-vitest ⏭️ skipped
channels-add-remove-vitest ⏭️ skipped
channels-stop-start-vitest ❌ failure
cloud-inference-vitest ⏭️ skipped
cloud-onboard-vitest ⏭️ skipped
common-egress-agent-vitest ⏭️ skipped
concurrent-gateway-ports-vitest ⏭️ skipped
credential-migration-vitest ⏭️ skipped
credential-sanitization-vitest ⏭️ skipped
cron-preflight-inference-local-vitest ⏭️ skipped
device-auth-health-vitest ⏭️ skipped
diagnostics-vitest ⏭️ skipped
double-onboard-vitest ⏭️ skipped
full-e2e-vitest ⏭️ skipped
gateway-drift-preflight-vitest ⏭️ skipped
gateway-guard-recovery ⏭️ skipped
gateway-health-honest-vitest ⏭️ skipped
generate-matrix ✅ success
gpu-double-onboard-vitest ⏭️ skipped
gpu-e2e-vitest ⏭️ skipped
hermes-e2e-vitest ⏭️ skipped
hermes-inference-switch-vitest ⏭️ skipped
hermes-root-entrypoint-smoke-vitest ⏭️ skipped
inference-routing-vitest ⏭️ skipped
issue-2478-crash-loop-recovery-vitest ⏭️ skipped
issue-4434-tui-unreachable-inference-vitest ⏭️ skipped
issue-4462-scope-upgrade-approval-vitest ⏭️ skipped
kimi-inference-compat-vitest ⏭️ skipped
launchable-smoke-vitest ⏭️ skipped
live-scenarios ⏭️ skipped
messaging-compatible-endpoint-vitest ⏭️ skipped
messaging-providers-vitest ⏭️ skipped
model-router-provider-routed-inference-vitest ⏭️ skipped
network-policy-vitest ⏭️ skipped
ollama-auth-proxy-vitest ⏭️ skipped
onboard-negative-paths-vitest ⏭️ skipped
onboard-repair-vitest ⏭️ skipped
onboard-resume-vitest ⏭️ skipped
openclaw-inference-switch-vitest ⏭️ skipped
openclaw-skill-cli-vitest ⏭️ skipped
openclaw-tui-chat-correlation-vitest ⏭️ skipped
openshell-version-pin-vitest ⏭️ skipped
rebuild-openclaw-vitest ⏭️ skipped
runtime-overrides-vitest ⏭️ skipped
sandbox-rebuild-vitest ⏭️ skipped
sandbox-survival-vitest ⏭️ skipped
sessions-agents-cli-vitest ⏭️ skipped
shields-config-vitest ⏭️ skipped
skill-agent-vitest ⏭️ skipped
snapshot-commands-vitest ⏭️ skipped
state-backup-restore-vitest ⏭️ skipped
telegram-injection-vitest ⏭️ skipped
token-rotation-vitest ⏭️ skipped
upgrade-stale-sandbox-vitest ⏭️ skipped

Failed jobs: channels-stop-start-vitest. Check run artifacts for logs.

Base automatically changed from e2e-phase6-telegram-injection to main June 22, 2026 15:56
Comment thread test/e2e-scenario/live/telegram-injection.test.ts Fixed
Comment thread test/e2e-scenario/live/telegram-injection.test.ts Fixed

@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/e2e-scenario/live/phase6-messaging-helpers.ts`:
- Around line 168-171: The find method on line 170 uses substring matching with
includes(sandboxName), which can cause false positives when multiple sandboxes
have similarly named identifiers. Replace the includes check with a word
boundary regex match to ensure the sandboxName is matched as a complete bounded
token rather than a substring, preventing similarly named sandboxes from
incorrectly satisfying the readiness check.
🪄 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: cd7961a0-8bdf-4663-81c5-2234cade00d7

📥 Commits

Reviewing files that changed from the base of the PR and between 60b0a00 and e0aa553.

📒 Files selected for processing (8)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/channels-stop-start-helpers.ts
  • test/e2e-scenario/live/channels-stop-start-safety.ts
  • test/e2e-scenario/live/channels-stop-start.test.ts
  • test/e2e-scenario/live/phase6-messaging-helpers.ts
  • test/e2e-scenario/live/telegram-injection.test.ts
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

Comment on lines +168 to +171
const row = stripAnsi(list.stdout)
.split(/\r?\n/)
.find((line) => line.includes(sandboxName));
expect(row, resultText(list)).toMatch(/\bReady\b/i);

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Match sandbox rows exactly when asserting readiness.

Line 170 uses substring matching (includes), so similarly named sandboxes can satisfy the check and mask readiness failures in downstream live scenarios. Match sandbox name as a bounded token instead.

Proposed fix
 export async function expectSandboxReady(
   host: HostCliClient,
   sandboxName: string,
   env: NodeJS.ProcessEnv,
   redactions: string[],
   artifactName: string,
 ): Promise<void> {
   const list = await host.command("openshell", ["sandbox", "list"], {
     artifactName,
     env,
     redactionValues: redactions,
     timeoutMs: 60_000,
   });
   expectExitZero(list, "openshell sandbox list");
+  const escapedSandboxName = sandboxName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
   const row = stripAnsi(list.stdout)
     .split(/\r?\n/)
-    .find((line) => line.includes(sandboxName));
+    .find((line) => new RegExp(`(?:^|\\s)${escapedSandboxName}(?:\\s|$)`).test(line));
   expect(row, resultText(list)).toMatch(/\bReady\b/i);
 }
📝 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
const row = stripAnsi(list.stdout)
.split(/\r?\n/)
.find((line) => line.includes(sandboxName));
expect(row, resultText(list)).toMatch(/\bReady\b/i);
const escapedSandboxName = sandboxName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const row = stripAnsi(list.stdout)
.split(/\r?\n/)
.find((line) => new RegExp(`(?:^|\\s)${escapedSandboxName}(?:\\s|$)`).test(line));
expect(row, resultText(list)).toMatch(/\bReady\b/i);
🤖 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/e2e-scenario/live/phase6-messaging-helpers.ts` around lines 168 - 171,
The find method on line 170 uses substring matching with includes(sandboxName),
which can cause false positives when multiple sandboxes have similarly named
identifiers. Replace the includes check with a word boundary regex match to
ensure the sandboxName is matched as a complete bounded token rather than a
substring, preventing similarly named sandboxes from incorrectly satisfying the
readiness check.

@cv cv added the v0.0.66 Release target label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ✅ All jobs passed

Run: 27968060310
Workflow ref: e2e-phase6-channels-stop-start-linear
Requested scenarios: (default — all supported)
Requested jobs: channels-stop-start-vitest
Summary: 2 passed, 0 failed, 54 skipped

Job Result
agent-turn-latency-vitest ⏭️ skipped
bedrock-runtime-compatible-anthropic-vitest ⏭️ skipped
brave-search-vitest ⏭️ skipped
channels-add-remove-vitest ⏭️ skipped
channels-stop-start-vitest ✅ success
cloud-inference-vitest ⏭️ skipped
cloud-onboard-vitest ⏭️ skipped
common-egress-agent-vitest ⏭️ skipped
concurrent-gateway-ports-vitest ⏭️ skipped
credential-migration-vitest ⏭️ skipped
credential-sanitization-vitest ⏭️ skipped
cron-preflight-inference-local-vitest ⏭️ skipped
device-auth-health-vitest ⏭️ skipped
diagnostics-vitest ⏭️ skipped
double-onboard-vitest ⏭️ skipped
full-e2e-vitest ⏭️ skipped
gateway-drift-preflight-vitest ⏭️ skipped
gateway-guard-recovery ⏭️ skipped
gateway-health-honest-vitest ⏭️ skipped
generate-matrix ✅ success
gpu-double-onboard-vitest ⏭️ skipped
gpu-e2e-vitest ⏭️ skipped
hermes-e2e-vitest ⏭️ skipped
hermes-inference-switch-vitest ⏭️ skipped
hermes-root-entrypoint-smoke-vitest ⏭️ skipped
inference-routing-vitest ⏭️ skipped
issue-2478-crash-loop-recovery-vitest ⏭️ skipped
issue-4434-tui-unreachable-inference-vitest ⏭️ skipped
issue-4462-scope-upgrade-approval-vitest ⏭️ skipped
kimi-inference-compat-vitest ⏭️ skipped
launchable-smoke-vitest ⏭️ skipped
live-scenarios ⏭️ skipped
messaging-compatible-endpoint-vitest ⏭️ skipped
messaging-providers-vitest ⏭️ skipped
model-router-provider-routed-inference-vitest ⏭️ skipped
network-policy-vitest ⏭️ skipped
ollama-auth-proxy-vitest ⏭️ skipped
onboard-negative-paths-vitest ⏭️ skipped
onboard-repair-vitest ⏭️ skipped
onboard-resume-vitest ⏭️ skipped
openclaw-inference-switch-vitest ⏭️ skipped
openclaw-skill-cli-vitest ⏭️ skipped
openclaw-tui-chat-correlation-vitest ⏭️ skipped
openshell-version-pin-vitest ⏭️ skipped
rebuild-openclaw-vitest ⏭️ skipped
runtime-overrides-vitest ⏭️ skipped
sandbox-rebuild-vitest ⏭️ skipped
sandbox-survival-vitest ⏭️ skipped
sessions-agents-cli-vitest ⏭️ skipped
shields-config-vitest ⏭️ skipped
skill-agent-vitest ⏭️ skipped
snapshot-commands-vitest ⏭️ skipped
state-backup-restore-vitest ⏭️ skipped
telegram-injection-vitest ⏭️ skipped
token-rotation-vitest ⏭️ skipped
upgrade-stale-sandbox-vitest ⏭️ skipped

@jyaunches

Copy link
Copy Markdown
Contributor

PRA test follow-up evidence for current head 74709a7d0365f213a819b5f4fbfbfc2b5109fd32:

  • PRA-T1PRA-T5: required live scenario channels-stop-start-vitest passed in workflow run https://github.com/NVIDIA/NemoClaw/actions/runs/27968060310 on the PR branch, covering both matrix legs (hermes and openclaw) across dispatch selection, OpenShell install, pre-clean/cleanup, channel stop/rebuild removal, channel start/rebuild restoration, provider persistence, registry state, policy-list, and runtime config assertions.
  • PRA-T6: migration acceptance evidence for Refs Epic: Migrate legacy bash E2E into the Vitest E2E system #5098 is covered by the same latest-head required scenario run plus the static/support coverage already in this PR.

Result: 2 passed, 0 failed, 54 skipped for requested job channels-stop-start-vitest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.66 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants