Skip to content

test(e2e): keep EXDEV forwards on canonical OpenShell - #11552

Merged
sandl99 merged 2 commits into
mainfrom
fix/e2e-exdev-forward-ownership
Sep 11, 2026
Merged

sandl99 merged 2 commits into
mainfrom
fix/e2e-exdev-forward-ownership

Conversation

@sandl99

@sandl99 sandl99 commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

The custom-plugin EXDEV test can verify dashboard forward ownership during onboarding and recreation. Its image and tmpfs wrapper runs only for sandbox creation; forwarding uses the canonical OpenShell executable.

Reason

Main run 34587100109 failed onboarding after #11427 added forward ownership verification. The fixture selected a wrapper as its OpenShell executable, but the listener ran the real binary. Existing wrapper tests checked arguments without exercising that executable selection.

Related issues

Refs #6108. Regression from #11427.

Changes

  • Select the canonical CLI in the shared fixture environment. The other consumer already receives its driver configuration from NemoClaw.
  • Load a fixture-only Node preload for onboarding and recreation. It sends only the canonical CLI's sandbox create spawn through the existing image and tmpfs wrapper. A global executable override cannot preserve forward identity.
  • Cover executable resolution, create argument rewriting, and direct forward/list execution in the support tests. Register the shared wrapper in the existing EXDEV mock-parity entry. Keep the EXDEV install, restart, recreation, image checks, and cleanup assertions.

Verification

  • Focused E2E-support tests: 33 passed across the trusted prebuild, driver configuration, and workflow-boundary suites.
  • Regression evidence: all three new routing cases failed when the previous wrapper executable selection was restored, then passed with the fix.
  • npm run e2e:assertions:check: passed; existing live assertion budget unchanged.
  • CLI and plugin builds passed. NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr passed on 855d5fce999acab6b21260902a580a4aa8826888, using canonical main 41c5625e8b831ed213cd5c381385973adc58659c. The larger heap is required by this host’s TypeScript check.
  • The mock/live parity checker reproduced the missing ownership entry and passed after its one-line correction. The final correction changes only that mapping; fixture source and test results are unchanged.
  • CI 34622479660: passed on 855d5fce999acab6b21260902a580a4aa8826888, including all 12 CLI shards, coverage, static checks, builds, and type checks.
  • Focused live E2E 34622865200: passed. Onboarding, production installation across distinct filesystems, restart with the installed payload, recreation with plugin v2, and cleanup all passed. Onboarding and recreation passed on their first attempts. Downloaded artifact digests, dispatch identity, target results, and aggregate pass receipt were verified against the unchanged PR.
  • E2E source: NVIDIA/NemoClaw (owner NVIDIA, organization); candidate 855d5fce999acab6b21260902a580a4aa8826888; base e6068115cc5e02e0d05abdb46ea4509138847617; trusted workflow 70cfff5f946a9bb31d1147f78ffbda914a2efaa2. Selector: jobs=openclaw-plugin-runtime-exdev, empty targets, mock inference. Correlation: e40a0daf-e1bb-4a56-bfe0-711faf7da239.
  • Advisor 34623885835: blocked before review. All nine specialists failed with /sandbox/.profile: Permission denied followed by exec relay closed before the command reported an exit status; none produced review artifacts. The same startup failure occurs in the independent PR #11212 Advisor run. Keep this fixture fix unchanged; a maintainer decision is needed for the shared runtime blocker and subsequent full Advisor rerun.
  • All paginated PR comments, reviews, and threads were collected. No code review findings were published. CodeRabbit skipped this draft; its success status does not represent a completed review.
  • No secrets, API keys, or credentials were added.

Signed-off-by: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Tests
    • Expanded end-to-end coverage for OpenShell lifecycle workflows, including onboarding, recreation, gateway restart, and sandbox listing.
    • Improved validation that command routing remains consistent across supported workflows.
    • Added coverage for trusted prebuilt image handling and cross-device rename scenarios.
    • Updated test fixtures and environment checks to reflect the canonical command configuration.

@sandl99 sandl99 self-assigned this Sep 11, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 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 Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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: c49435c4-33d5-4f80-a240-20eec2ee2e67

📥 Commits

Reviewing files that changed from the base of the PR and between e606811 and 855d5fc.

📒 Files selected for processing (6)
  • test/e2e/README.md
  • test/e2e/live/openclaw-plugin-runtime-exdev-trusted-prebuild.ts
  • test/e2e/live/openclaw-plugin-runtime-exdev.test.ts
  • test/e2e/live/openshell-driver-config-test-wrapper.ts
  • test/e2e/mock-parity.json
  • test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The EXDEV test wrapper now intercepts only sandbox create commands. Onboarding and recreation preload this interceptor. Other OpenShell commands use the canonical CLI, with updated routing tests and documentation.

Changes

EXDEV command routing

Layer / File(s) Summary
Create-only preload routing
test/e2e/live/openclaw-plugin-runtime-exdev-trusted-prebuild.ts
The trusted image wrapper exposes a preload path and redirects only canonical sandbox create calls to the fixture executable.
Live command and environment integration
test/e2e/live/openclaw-plugin-runtime-exdev.test.ts, test/e2e/live/openshell-driver-config-test-wrapper.ts, test/e2e/mock-parity.json
Onboarding and recreation preload the interceptor. Gateway restart and NEMOCLAW_OPENSHELL_BIN use the canonical CLI.
Command routing validation
test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts, test/e2e/README.md
Tests verify create, forward, and list routing. Documentation records the command-routing contract.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant OpenClawCLI
  participant NodePreloadInterceptor
  participant FixtureExecutable
  participant CanonicalOpenShellCLI
  OpenClawCLI->>NodePreloadInterceptor: run sandbox create
  NodePreloadInterceptor->>FixtureExecutable: redirect create command
  OpenClawCLI->>CanonicalOpenShellCLI: run forward or list
Loading

Suggested reviewers: apurvvkumaria, jyaunches

Merge Risk: ⚪ Minimal · up to 855d5

The EXDEV test routing change preserves canonical OpenShell handling outside sandbox creation, with the changed flows covered by focused validation.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (2 skipped: 2 … 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 clearly and concisely describes the main change: keeping EXDEV forward operations on the canonical OpenShell executable.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-exdev-forward-ownership

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

@github-code-quality

github-code-quality Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 855d5fc in the fix/e2e-exdev-forwar... branch remains at 96%, unchanged from commit 70cfff5 in the main branch.

Show a line coverage summary of the most impacted files.
File main 70cfff5 fix/e2e-exdev-forwar... 855d5fc +/-
nemoclaw/src/bl...ate-networks.ts 94% 89% -5%

TypeScript / code-coverage/cli

The overall line coverage in commit 855d5fc in the fix/e2e-exdev-forwar... branch remains at 83%, unchanged from commit e606811 in the main branch.


Updated September 11, 2026 16:45 UTC

@sandl99
sandl99 marked this pull request as ready for review September 11, 2026 16:55
@sandl99
sandl99 requested a review from rsliter September 11, 2026 16:55
@sandl99

sandl99 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Verification evidence for commit 855d5fce999acab6b21260902a580a4aa8826888:

  • CI passed: run 34622479660, including all 12 CLI shards, coverage, static checks, builds, and type checks.
  • Target E2E passed: OpenClaw EXDEV lifecycle job. Onboarding, production installation across distinct filesystems, restart with the installed payload, and recreation with plugin v2 all passed. Onboarding and recreation passed on their first attempts. All registered cleanup completed without failures.
  • Local validation passed: 33 focused E2E-support tests, the unchanged live assertion budget check, and NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr. The three new routing cases failed with the previous executable selection and passed with the fix.

The change keeps the canonical OpenShell executable for forward ownership verification. Only sandbox creation uses the fixture's image and tmpfs wrapper. Production code is unchanged.

The E2E dispatch receipt identifies the tested commit above, base e6068115cc5e02e0d05abdb46ea4509138847617, and trusted workflow 70cfff5f946a9bb31d1147f78ffbda914a2efaa2. Selection: jobs=openclaw-plugin-runtime-exdev, empty targets, mock inference. Downloaded artifact digests, lifecycle results, cleanup results, and the aggregate pass receipt were verified.

Advisor review remains pending. Attempt 1 failed before producing any of the nine specialist reviews. Each job reported /sandbox/.profile: Permission denied, followed by an OpenShell exec relay error. The same startup failure occurred in an independent PR's Advisor job. A subsequent Advisor attempt is now running; a clean review is not yet verified.

@sandl99
sandl99 requested review from cjagwani and cv September 11, 2026 17:02

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the create-only preload keeps image/tmpfs rewriting on sandbox creation while forward and list operations retain canonical OpenShell identity. Focused E2E-support validation passed 27/27, and the exact trusted EXDEV lifecycle passed onboarding, restart, recreation, canonical listener ownership, and cleanup. Required checks and commit verification are green.\n\n

@sandl99
sandl99 merged commit 95b2eee into main Sep 11, 2026
109 checks passed
@sandl99
sandl99 deleted the fix/e2e-exdev-forward-ownership branch September 11, 2026 17:31
rsliter added a commit that referenced this pull request Sep 14, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

This is the first architecture slice toward #11547. PR #11552 fixed the
then-current EXDEV forward-ownership failure, and the target passed on
`main` after that merge. This pull request does not claim another
current test failure.

The live target retains all seven behavior phases and framework cleanup.
It still proves distinct filesystems, a real `openclaw plugins install
--force`, restart persistence, recreation with the v2 fixture image,
restored inference, and complete cleanup. The target falls from 658 to
585 lines. Its target-specific live surface falls from 1,202 to 1,140
lines. Direct assertion points fall from 17 to 16, transitive assertion
points fall from 32 to 25, and generated probe blocks fall from three to
zero.

## Reason

The target was green after #11552, but it still owned deterministic
command interception, parsing, validation, and generated probes. Focused
support tests can prove those contracts faster and with less
environmental noise. The live target should own only behavior that
requires Docker, OpenShell, process, sandbox, and cross-filesystem
boundaries.

### Related issues

Refs #11547.

Follow-up to #11552. This pull request intentionally leaves #11547 open
for later reductions.

## Changes

- Replace sandbox-create interception and tmpfs rewriting with a stable
read-only host mount. Focused tests protect image-ID validation,
extraction safety, mount construction, recreation command shape, and
cleanup order.
- Use one canonical OpenShell component set throughout the EXDEV
lifecycle. The exact-main driver tests protect executable resolution and
component composition.
- Retain the proven recreation precondition. The target verifies
listener ownership, terminates only the owned process, and requires port
18789 to release.
- Remove the stale gateway-stop hook, generated probes, and incidental
terminal assertions. Update selection ownership, mock parity, the
assertion budget, and E2E documentation.
- Canonicalize temporary fixture roots so symlinked temporary-directory
aliases cannot fail source-path validation before Docker runs.

## Verification

- `NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` passed on
commit `6f449a8d6b219385c2f7c9ee6b7d627013cca85a`.
- Four focused E2E-support suites passed 134 tests. The EXDEV prebuild
suite also passed all 30 tests with `TMPDIR` set to a symlink alias.
- Mock-parity and PR risk-planning integration suites passed 226 tests.
- `npm run e2e:assertions:check` passed with 1,787 direct `expect` calls
across 85 live test files and target budget `[9,16,9,25,0]`.
- [PR CI run
34878473841](https://github.com/NVIDIA/NemoClaw/actions/runs/34878473841)
passed all 12 CLI shards, aggregate CLI tests, static checks, builds,
type checks, plugin tests, installer integration, package checks, and
audit checks.
- Exact-commit CodeRabbit review completed with no unresolved
substantive thread.
- [PR Review Advisor run
34878570389](https://github.com/NVIDIA/NemoClaw/actions/runs/34878570389)
verified all nine specialist artifacts. Every specialist reported clear,
with no P0 or P1 finding and no additional E2E recommendation.
- The required [manual PR E2E run
34879686547](https://github.com/NVIDIA/NemoClaw/actions/runs/34879686547)
tested the same commit. The [EXDEV
job](https://github.com/NVIDIA/NemoClaw/actions/runs/34879686547/job/104096644869)
passed. Cloud inference, cloud onboarding, OpenClaw security posture,
the credential window, and the OpenClaw and Deep Agents MCP jobs also
passed.
- GitHub reports all 22 branch commits as verified.
- The diff contains no secrets, API keys, or credentials.

## Review notes

The sensitive path `tools/e2e/workflow-boundary.mts` changes only job
ownership for the new helper and wrapper paths. Independent security
review found no credential, command-injection, cleanup, or selector
issue. CodeRabbit's valid canonical-temporary-path finding was fixed
before the latest review.

`npm run review:local` could not start a specialist because its
OpenShell gateway refused the configure connection. The exact-commit
remote Advisor run completed all nine independent reviews instead.

The manual E2E aggregate is red because two Hermes lanes hit inherited
gateway readiness failures. The [Hermes security
job](https://github.com/NVIDIA/NemoClaw/actions/runs/34879686547/job/104096645230)
exhausted its 90-second readiness window before any security assertion.
The exact-base [security
job](https://github.com/NVIDIA/NemoClaw/actions/runs/34875021241/job/104081009481)
passed with the same managed image. The [Hermes MCP
job](https://github.com/NVIDIA/NemoClaw/actions/runs/34879686547/job/104096644736)
quarantined gateway relaunch after planned restarts were counted as
crashes. The exact-base first attempt [failed with the same
signature](https://github.com/NVIDIA/NemoClaw/actions/runs/34875021241/job/104081001845),
and its second attempt
[passed](https://github.com/NVIDIA/NemoClaw/actions/runs/34875021241/job/104090873918).
The candidate does not change Hermes, MCP runtime, installer, gateway
supervisor, or security-posture paths. Cleanup removed every sandbox,
state volume, tunnel, relay, and Docker credential. Artifact scans found
no credential exposure. No unchanged rerun was requested because this
signature has no checked-in retry policy. Issue #10977 tracks this
timing-sensitive gateway-health family.

Removing the final listener ownership and termination boundary requires
a supported direct `ForwardTcp` stop or a separately accepted lifecycle
repair under #11547.

---

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>

---------

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants