Skip to content

refactor(e2e): split cloud-experimental-e2e into 4 focused tests (#2644) - #2647

Merged
jyaunches merged 6 commits into
NVIDIA:mainfrom
jyaunches:issue-2644-split-cloud-experimental-e2e
Apr 29, 2026
Merged

jyaunches merged 6 commits into
NVIDIA:mainfrom
jyaunches:issue-2644-split-cloud-experimental-e2e

Conversation

@jyaunches

@jyaunches jyaunches commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace the 931-line cloud-experimental-e2e monolith with 4 independent, focused E2E tests. Flaky phases no longer block signal from stable phases.

Fixes #2644

New Jobs

Job What it tests Timeout Former phases
cloud-onboard-e2e Public installer, Landlock enforcement, API key leak detection, inference.local HTTPS 45 min 0, 1, 3, 5 checks, 6
cloud-inference-e2e Live chat via inference.local, skill filesystem validation 30 min 5b, 5c
skill-agent-e2e Skill injection + agent verification (with retry + fuzzy match) 30 min 5d
docs-validation-e2e CLI/docs parity (nemoclaw --help vs commands.md) 15 min 5f

Key Improvements

  • Flaky Phase 5d (skill agent) no longer blocks Landlock/security signal
  • Phase 5e (TUI smoke) dropped from nightly — timing-dependent expect with 7+ tunable sleeps is fundamentally unsuited for CI
  • Phase 5f (docs validation) re-enabled as its own job — root cause fixed by feat(cli): typed command registry as single source of truth (#2388) #2446 (typed command registry)
  • Each test installs independently — no cascade failures
  • skill-agent-e2e adds retry logic (3 attempts, 15s between) and fuzzy token matching (case-insensitive, strips quotes/backticks) to handle LLM non-determinism
  • Remote link probing disabled for docs validation (CHECK_DOC_LINKS_REMOTE=0) to avoid 429 rate-limit flakes

Deleted

  • test/e2e/test-e2e-cloud-experimental.sh (931-line monolith)
  • test/e2e/e2e-cloud-experimental/skip/ (3 dead scripts — coverage already exists in dedicated jobs: network-policy-e2e, sandbox-operations-e2e)

Kept

  • All helpers under test/e2e/e2e-cloud-experimental/ (checks/, features/, cleanup.sh, check-docs.sh) — referenced by the new scripts

Type of Change

  • Code change (refactor)

Verification

  • YAML validated locally
  • All 29 nightly jobs have selective dispatch guards (validated with script)
  • All 4 new jobs in notify-on-failure and report-to-pr needs lists
  • workflow_dispatch.inputs.jobs description updated with new job names

Summary by CodeRabbit

  • Chores

    • Replaced one monolithic nightly E2E job with four targeted nightly jobs (onboard, inference, skill-agent, docs validation); updated notification/reporting workflow dependencies and workflow inputs.
    • Shortened job timeouts and adjusted failure-artifact uploads for clearer, faster diagnostics.
    • Updated review tooling guidance to map paths to the new E2E jobs.
  • Tests

    • Added standalone E2E runners for cloud onboarding, cloud inference, skill-agent verification, and docs validation.
    • Removed legacy experimental E2E orchestration and several obsolete test scripts.

@coderabbitai

coderabbitai Bot commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR replaces the monolithic nightly cloud E2E job with four focused GitHub Actions jobs and corresponding standalone E2E scripts, removes legacy/cloud-experimental orchestrators, updates workflow inputs and job dependencies, and adjusts review-path hints and artifact behaviors.

Changes

Cohort / File(s) Summary
Workflow Job Restructuring
/.github/workflows/nightly-e2e.yaml
Removed cloud-experimental-e2e; added cloud-onboard-e2e, cloud-inference-e2e, skill-agent-e2e, docs-validation-e2e with per-job filters, shorter timeouts, job-specific sandbox names, failure-only install-log artifact uploads, and updated notify-on-failure.needs / report-to-pr.needs.
Removed Monolithic Orchestrator & Legacy Checks
test/e2e/test-e2e-cloud-experimental.sh, test/e2e/e2e-cloud-experimental/skip/01-onboard-completion.sh, test/e2e/e2e-cloud-experimental/skip/04-nemoclaw-openshell-status-parity.sh, test/e2e/e2e-cloud-experimental/skip/05-network-policy.sh
Deleted the single large orchestrator and three legacy cloud-experimental check scripts; reviewers should verify no required logic was omitted when splitting flows.
Cloud Onboard Job & Script
test/e2e/test-cloud-onboard-e2e.sh
New installer/onboard runner: enforces non-interactive install, streams install log, sources PATH/nvm, runs e2e-cloud-experimental/checks/*.sh, registers sandbox teardown (unless kept).
Cloud Inference Job & Script
test/e2e/test-cloud-inference-e2e.sh
New inference runner: installs NemoClaw, issues live-chat requests through sandbox to inference.local with retry/backoff and JSON parsing for PONG, and performs repo + sandbox skill filesystem validations.
Skill Agent Job & Script
test/e2e/test-skill-agent-e2e.sh
New skill-agent runner: non-interactive install, injects skill-smoke-fixture, retries verification with relaxed token matching (case-insensitive, strip quotes), and registers teardown; includes retry/backoff controls.
Docs Validation Job & Script
test/e2e/test-docs-validation.sh
New docs validation runner: ensures nemoclaw on PATH, runs check-docs.sh --only-cli and --only-links (supports CHECK_DOC_LINKS_REMOTE=0), reports phase results and summary.
Review Path Hints
.coderabbit.yaml
Updated reviews.path_instructions mapping to the four new jobs and added suggested gh workflow run nightly-e2e.yaml -f jobs=... commands for each path cohort.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant CI as CI Workflow
    participant Job as Job Script
    participant Installer as Installer (install.sh)
    participant Sandbox as Sandbox (nemoclaw / openshell)
    participant Cloud as Cloud Inference API
    participant Artifacts as Artifact Storage

    CI->>Job: trigger job (e.g., cloud-inference-e2e)
    Job->>Installer: run install.sh (--non-interactive) and stream logs
    Installer-->>Job: install result
    Job->>Sandbox: create/configure sandbox & fetch ssh-config
    Job->>Sandbox: forward inference request -> inference.local
    Sandbox->>Cloud: proxy request
    Cloud-->>Sandbox: inference response
    Sandbox-->>Job: return response content
    Job->>Artifacts: upload install/logs on failure
    Job-->>CI: report PASS/FAIL
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I split the big script into four tiny hops,
Installer hums, chat pings, agent fetches props.
Docs skip the wild web, logs trail like string,
Sandboxes bounce while CI learns to sing.
Carrots for devs — nightly tests that hop and spring.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% 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 accurately describes the main change: refactoring a monolithic cloud-experimental E2E test into 4 focused, independently-running tests.
Linked Issues check ✅ Passed All coding-related objectives from #2644 are met: monolithic test split into 4 jobs, independent installs to prevent cascades, skill-agent fuzzy token matching for LLM tolerance, docs validation re-enabled, and flaky TUI test removed.
Out of Scope Changes check ✅ Passed All changes are within scope: new E2E test scripts, deleted monolith/skip scripts, updated workflow YAML, and CodeRabbit config instructions directly support the split objective.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/nightly-e2e.yaml:
- Around line 94-225: Add path_instructions entries in .coderabbit.yaml mapping
each new GH Actions job to the source files they cover: add path_instructions
for cloud-onboard-e2e (include installer scripts like
test/e2e/test-cloud-onboard-e2e.sh, install.sh, any public installer
scripts/landlock policy files), cloud-inference-e2e (include
test/e2e/test-cloud-inference-e2e.sh, inference/*.js|*.py, skills filesystem
code), skill-agent-e2e (include test/e2e/test-skill-agent-e2e.sh, skill
injection code, agent verification logic), and docs-validation-e2e (include
test/e2e/test-docs-validation.sh, CLI command definitions, docs/ and markdown
link validation scripts); ensure each entry uses the path_instructions key and
references the exact job names cloud-onboard-e2e, cloud-inference-e2e,
skill-agent-e2e, docs-validation-e2e so CodeRabbit can associate changed files
with the correct job.

In `@test/e2e/test-cloud-onboard-e2e.sh`:
- Around line 122-138: The interactive-install flag validation currently only
checks prerequisites (INTERACTIVE_INSTALL or
RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL) but the actual install invocation
always runs the non-interactive curl | bash path; update the install execution
to branch on the same variable (INTERACTIVE_INSTALL or
RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL) and run the interactive expect-based
flow when set: locate the curl ... | bash invocation and replace/augment it with
an alternate branch that invokes the expect script (or an expect heredoc) to
drive the interactive installer, preserving the existing non-interactive curl |
bash behavior in the else branch so the script truly performs interactive
installs when requested.

In `@test/e2e/test-skill-agent-e2e.sh`:
- Around line 142-146: The add-sandbox-skill.sh invocation is missing the
SKILL_DESCRIPTION env var so the script (which expects SKILL_ID and
SKILL_DESCRIPTION) can fail; modify the command that calls add-sandbox-skill.sh
to also export SKILL_DESCRIPTION (in addition to SANDBOX_NAME and SKILL_ID) when
invoking the script so the fixture renderer receives both SKILL_ID and
SKILL_DESCRIPTION.
🪄 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: 28a9dc06-bfe1-436f-9303-39c4e6b64253

📥 Commits

Reviewing files that changed from the base of the PR and between 1f228a5 and 16f2b16.

📒 Files selected for processing (9)
  • .github/workflows/nightly-e2e.yaml
  • test/e2e/e2e-cloud-experimental/skip/01-onboard-completion.sh
  • test/e2e/e2e-cloud-experimental/skip/04-nemoclaw-openshell-status-parity.sh
  • test/e2e/e2e-cloud-experimental/skip/05-network-policy.sh
  • test/e2e/test-cloud-inference-e2e.sh
  • test/e2e/test-cloud-onboard-e2e.sh
  • test/e2e/test-docs-validation.sh
  • test/e2e/test-e2e-cloud-experimental.sh
  • test/e2e/test-skill-agent-e2e.sh
💤 Files with no reviewable changes (4)
  • test/e2e/test-e2e-cloud-experimental.sh
  • test/e2e/e2e-cloud-experimental/skip/01-onboard-completion.sh
  • test/e2e/e2e-cloud-experimental/skip/05-network-policy.sh
  • test/e2e/e2e-cloud-experimental/skip/04-nemoclaw-openshell-status-parity.sh

Comment thread .github/workflows/nightly-e2e.yaml Resolved
Comment on lines +122 to +138
if [ "$INTERACTIVE_INSTALL" != "1" ]; then
if [ "${NEMOCLAW_NON_INTERACTIVE:-}" != "1" ]; then
fail "NEMOCLAW_NON_INTERACTIVE=1 is required for non-interactive install"
exit 1
fi
if [ "${NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE:-}" != "1" ]; then
fail "NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1 is required for non-interactive install"
exit 1
fi
pass "Non-interactive mode configured"
else
if ! command -v expect >/dev/null 2>&1; then
fail "expect not on PATH (required for interactive install)"
exit 1
fi
pass "Interactive install mode (expect available)"
fi

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

RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL=1 is currently a no-op.

Lines 122-138 validate an interactive path with expect, but Line 166 always executes the same non-interactive curl ... | bash flow. Setting RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL=1 changes prerequisite validation only; the install mode itself never changes.

Also applies to: 166-173

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/test-cloud-onboard-e2e.sh` around lines 122 - 138, The
interactive-install flag validation currently only checks prerequisites
(INTERACTIVE_INSTALL or RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL) but the
actual install invocation always runs the non-interactive curl | bash path;
update the install execution to branch on the same variable (INTERACTIVE_INSTALL
or RUN_E2E_CLOUD_ONBOARD_INTERACTIVE_INSTALL) and run the interactive
expect-based flow when set: locate the curl ... | bash invocation and
replace/augment it with an alternate branch that invokes the expect script (or
an expect heredoc) to drive the interactive installer, preserving the existing
non-interactive curl | bash behavior in the else branch so the script truly
performs interactive installs when requested.

Comment thread test/e2e/test-skill-agent-e2e.sh Resolved

@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

🧹 Nitpick comments (1)
.coderabbit.yaml (1)

335-336: Split features/** mapping to route lib helpers to cloud-inference-e2e.

Line 335 currently routes the entire test/e2e/e2e-cloud-experimental/features/** subtree to skill-agent-e2e. However, test-cloud-inference-e2e.sh consumes helpers under features/skill/lib/ (e.g., validate_repo_skills.sh, validate_sandbox_openclaw_skills.sh), meaning changes to those files won't surface cloud-inference-e2e as a recommendation.

Consider splitting the mapping: route features/skill/lib/** to cloud-inference-e2e while keeping agent-specific features under skill-agent-e2e, or include both job recommendations in the mapped instruction text.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.coderabbit.yaml around lines 335 - 336, The mapping in .coderabbit.yaml
currently routes "test/e2e/e2e-cloud-experimental/features/**" solely to
*e2e-skill-agent, which hides changes to helpers under features/skill/lib/**;
update the mapping so that features/skill/lib/** is routed to the
cloud-inference-e2e recommendation (while keeping the remainder of features/**
routed to skill-agent-e2e), or alternatively change the instruction text for
"test/e2e/e2e-cloud-experimental/features/**" to include both job
recommendations (skill-agent-e2e and cloud-inference-e2e) so edits to
validate_repo_skills.sh and validate_sandbox_openclaw_skills.sh will surface the
cloud-inference-e2e suggestion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/e2e/test-skill-agent-e2e.sh`:
- Around line 181-190: Fuzzy-match logic can mark a failed verifier run as PASS
because the verifier's error text includes the token; update the condition that
checks collapsed/ token_lower so it only treats matches as success when the
verifier actually exited zero. Concretely, in the block using collapsed,
token_lower, agent_out and agent_rc (the fuzzy match), add an agent_rc check
(e.g., require agent_rc -eq 0) before logging PASS and setting agent_ok, or
alternatively filter out the verifier's known failure phrase, but preferred fix
is to only accept fuzzy matches when agent_rc == 0.

---

Nitpick comments:
In @.coderabbit.yaml:
- Around line 335-336: The mapping in .coderabbit.yaml currently routes
"test/e2e/e2e-cloud-experimental/features/**" solely to *e2e-skill-agent, which
hides changes to helpers under features/skill/lib/**; update the mapping so that
features/skill/lib/** is routed to the cloud-inference-e2e recommendation (while
keeping the remainder of features/** routed to skill-agent-e2e), or
alternatively change the instruction text for
"test/e2e/e2e-cloud-experimental/features/**" to include both job
recommendations (skill-agent-e2e and cloud-inference-e2e) so edits to
validate_repo_skills.sh and validate_sandbox_openclaw_skills.sh will surface the
cloud-inference-e2e suggestion.
🪄 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: 84b2a37b-46d2-4067-987e-ccf1a74a3f08

📥 Commits

Reviewing files that changed from the base of the PR and between 16f2b16 and 9d20b2b.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • test/e2e/test-cloud-onboard-e2e.sh
  • test/e2e/test-skill-agent-e2e.sh

Comment thread test/e2e/test-skill-agent-e2e.sh Outdated
Comment on lines +181 to +190
# Check if the token appears in the output even though the script exited non-zero
# (e.g., wrapped in quotes or explanation text that the strict grep missed)
collapsed=$(printf '%s' "$agent_out" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
token_lower=$(printf '%s' "$VERIFY_TOKEN" | tr '[:upper:]' '[:lower:]')
if printf '%s' "$collapsed" | grep -Fq "$token_lower"; then
info "Token found in output (fuzzy match — script exited ${agent_rc} but token present)"
pass "Agent returned ${VERIFY_TOKEN} via fuzzy match (attempt ${attempt}/${MAX_ATTEMPTS})"
agent_ok=1
break
fi

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 | 🔴 Critical

Non-zero verifier exits can be misclassified as PASS

At Line 183, the fuzzy match checks the entire agent_out after a non-zero exit. verify-sandbox-skill-via-agent.sh includes ${VERIFY_TOKEN} in its failure text (“token ... not found”), so this branch can turn genuine failures into passes.

🐛 Proposed fix
-  # Check if the token appears in the output even though the script exited non-zero
-  # (e.g., wrapped in quotes or explanation text that the strict grep missed)
-  collapsed=$(printf '%s' "$agent_out" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
-  token_lower=$(printf '%s' "$VERIFY_TOKEN" | tr '[:upper:]' '[:lower:]')
-  if printf '%s' "$collapsed" | grep -Fq "$token_lower"; then
-    info "Token found in output (fuzzy match — script exited ${agent_rc} but token present)"
-    pass "Agent returned ${VERIFY_TOKEN} via fuzzy match (attempt ${attempt}/${MAX_ATTEMPTS})"
-    agent_ok=1
-    break
-  fi
-
   last_fail="Agent verification failed (exit ${agent_rc}): ${agent_out:0:400}"
📝 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
# Check if the token appears in the output even though the script exited non-zero
# (e.g., wrapped in quotes or explanation text that the strict grep missed)
collapsed=$(printf '%s' "$agent_out" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
token_lower=$(printf '%s' "$VERIFY_TOKEN" | tr '[:upper:]' '[:lower:]')
if printf '%s' "$collapsed" | grep -Fq "$token_lower"; then
info "Token found in output (fuzzy match — script exited ${agent_rc} but token present)"
pass "Agent returned ${VERIFY_TOKEN} via fuzzy match (attempt ${attempt}/${MAX_ATTEMPTS})"
agent_ok=1
break
fi
# Check if the token appears in the output even though the script exited non-zero
# (e.g., wrapped in quotes or explanation text that the strict grep missed)
if printf '%s' "$agent_out" | grep -Fq "$VERIFY_TOKEN"; then
info "Token found in output (script exited ${agent_rc} but token present)"
pass "Agent returned ${VERIFY_TOKEN} (attempt ${attempt}/${MAX_ATTEMPTS})"
agent_ok=1
break
fi
last_fail="Agent verification failed (exit ${agent_rc}): ${agent_out:0:400}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/test-skill-agent-e2e.sh` around lines 181 - 190, Fuzzy-match logic
can mark a failed verifier run as PASS because the verifier's error text
includes the token; update the condition that checks collapsed/ token_lower so
it only treats matches as success when the verifier actually exited zero.
Concretely, in the block using collapsed, token_lower, agent_out and agent_rc
(the fuzzy match), add an agent_rc check (e.g., require agent_rc -eq 0) before
logging PASS and setting agent_ok, or alternatively filter out the verifier's
known failure phrase, but preferred fix is to only accept fuzzy matches when
agent_rc == 0.

Replace the 931-line cloud-experimental-e2e monolith with 4 independent,
focused E2E tests:

- cloud-onboard-e2e: public installer + Landlock + security checks
- cloud-inference-e2e: live chat via inference.local + skill filesystem
- skill-agent-e2e: skill injection + agent verification (with retry + fuzzy match)
- docs-validation-e2e: CLI/docs parity via check-docs.sh

Key improvements:
- Flaky Phase 5d (skill agent) no longer blocks Landlock/security signal
- Phase 5e (TUI smoke) dropped from nightly — timing-dependent expect
- Phase 5f (docs validation) re-enabled as own job (root cause fixed by #2446)
- Each test installs independently — no cascade failures
- skill-agent-e2e adds retry logic + fuzzy token matching for LLM non-determinism

Also removes dead scripts from e2e-cloud-experimental/skip/ (01-onboard-completion,
04-nemoclaw-openshell-status-parity, 05-network-policy — all covered by dedicated jobs).

Fixes #2644
Signed-off-by: Jessica Yaunches <[email protected]>
@jyaunches
jyaunches force-pushed the issue-2644-split-cloud-experimental-e2e branch from 9d20b2b to 994cca2 Compare April 28, 2026 23:27
@brandonpelfrey

Copy link
Copy Markdown
Contributor

The Bug

In test-skill-agent-e2e.sh (Phase 3, the fuzzy fallback around line 175-185):

When the helper verify-sandbox-skill-via-agent.sh fails with rc=1, the parent script captures all output (stdout+stderr) into
$agent_out, then applies fuzzy matching:

  collapsed=$(printf '%s' "$agent_out" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
  token_lower=$(printf '%s' "$VERIFY_TOKEN" | tr '[:upper:]' '[:lower:]')
  if printf '%s' "$collapsed" | grep -Fq "$token_lower"; then

The helper's own error message contains the token literally:

  verify-sandbox-skill-via-agent: FAIL: SKILL_VERIFY_PROMPT must not contain VERIFY_TOKEN ('weather')

When VERIFY_TOKEN=weather (or any value that could appear in diagnostic output), the error message echoes the token value in the
parenthetical ('weather'). The fuzzy match finds weather in that error text and reports PASS.

Why the helper rejects it

The helper has a guard (lines 55-58 of verify-sandbox-skill-via-agent.sh) that correctly rejects runs where SKILL_VERIFY_PROMPT
contains VERIFY_TOKEN — because the whole point is that the token must come from the agent reading SKILL.md, not from prompt echo. But
when this guard fires, its error message includes the token value, and the parent's fuzzy fallback matches it.

Practical impact

With the default fixture values (VERIFY_TOKEN=SKILL_SMOKE_VERIFY_K9X2), this is unlikely to trigger accidentally — that token won't
appear in random error messages. But:

  1. It's an architectural correctness issue. The fuzzy fallback should never match diagnostic/error text from a failed helper. If
    someone changes the token to something more common, or if future error messages happen to echo agent output that contains the token,
    this masks real failures.
  2. The reviewer's reproduction with VERIFY_TOKEN=weather is a valid edge case demonstrating the flaw. It's a contrived input, but it
    proves the matching logic is unsound.

Recommended fix

The fuzzy fallback in test-skill-agent-e2e.sh should only search the agent's actual output section, not the helper's error/diagnostic
lines. Two clean approaches:

  1. Have the helper emit agent output to stdout and errors to stderr separately, then capture them independently in the parent.
  2. Strip known helper diagnostic prefixes before fuzzy matching — e.g., filter out lines starting with verify-sandbox-skill-via-agent:.
  3. Require a structured success sentinel — e.g., the helper outputs a line like AGENT_RAW_OUTPUT_BEGIN / AGENT_RAW_OUTPUT_END
    delimiters, and the fuzzy match only searches within those delimiters.

Option 3 is the most robust. The helper already prints delimited agent output (--- agent stdout/stderr --- / --- end ---), so the
parent could extract just that section before applying fuzzy matching.

@jyaunches
jyaunches force-pushed the issue-2644-split-cloud-experimental-e2e branch from 994cca2 to f465bb7 Compare April 29, 2026 00:07
- Add .coderabbit.yaml path_instructions for all 4 new E2E jobs
- Fix interactive install no-op in test-cloud-onboard-e2e.sh (branch
  on INTERACTIVE_INSTALL flag to use expect vs non-interactive curl)
- Pass SKILL_DESCRIPTION to add-sandbox-skill.sh in test-skill-agent-e2e.sh

Signed-off-by: Jessica Yaunches <[email protected]>
@jyaunches
jyaunches force-pushed the issue-2644-split-cloud-experimental-e2e branch from f465bb7 to b93d195 Compare April 29, 2026 00:08
@jyaunches

Copy link
Copy Markdown
Contributor Author

Good catch @brandonpelfrey — fixed in the latest push.

The fuzzy fallback now extracts only the delimited agent output section (--- agent stdout/stderr --- / --- end ---) before matching, so helper diagnostic lines that echo the token value can't trigger a false positive. The helper already emits these delimiters (lines 95-97 of verify-sandbox-skill-via-agent.sh), so no changes needed on that side.

@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.

♻️ Duplicate comments (1)
test/e2e/test-skill-agent-e2e.sh (1)

182-191: ⚠️ Potential issue | 🔴 Critical

Restrict fuzzy matching to agent payload only (not helper diagnostics).

At Line 184, fuzzy matching still scans the full captured output, so helper failure text that includes the token can produce a false PASS and mask a real verification failure.

🔧 Proposed fix
-  collapsed=$(printf '%s' "$agent_out" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
+  # Limit fuzzy matching to the helper's delimited agent payload section only.
+  agent_payload=$(
+    printf '%s\n' "$agent_out" \
+      | sed -n '/--- agent stdout\/stderr ---/,/--- end ---/p' \
+      | sed '1d;$d'
+  )
+  collapsed=$(printf '%s' "$agent_payload" | tr -d '\n\r' | tr -d '`"'\''' | tr '[:upper:]' '[:lower:]')
   token_lower=$(printf '%s' "$VERIFY_TOKEN" | tr '[:upper:]' '[:lower:]')
-  if printf '%s' "$collapsed" | grep -Fq "$token_lower"; then
+  if [ -n "$agent_payload" ] && printf '%s' "$collapsed" | grep -Fq "$token_lower"; then
     info "Token found in output (fuzzy match — script exited ${agent_rc} but token present)"
     pass "Agent returned ${VERIFY_TOKEN} via fuzzy match (attempt ${attempt}/${MAX_ATTEMPTS})"
     agent_ok=1
     break
   fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/test-skill-agent-e2e.sh` around lines 182 - 191, The fuzzy-match
currently uses the whole captured output variable agent_out (via collapsed)
which can include helper diagnostic text; restrict fuzzy matching to only the
agent's payload by extracting the payload portion from agent_out (e.g., the
agent_stdout/agent_payload section) and run the lowercase/strip operations on
that payload instead of agent_out; then compare token_lower against the
collapsed payload and keep the existing info/pass/agent_ok/attempt logic
(variables referenced: agent_out, collapsed, token_lower, VERIFY_TOKEN,
agent_rc, info, pass, agent_ok, attempt, MAX_ATTEMPTS).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@test/e2e/test-skill-agent-e2e.sh`:
- Around line 182-191: The fuzzy-match currently uses the whole captured output
variable agent_out (via collapsed) which can include helper diagnostic text;
restrict fuzzy matching to only the agent's payload by extracting the payload
portion from agent_out (e.g., the agent_stdout/agent_payload section) and run
the lowercase/strip operations on that payload instead of agent_out; then
compare token_lower against the collapsed payload and keep the existing
info/pass/agent_ok/attempt logic (variables referenced: agent_out, collapsed,
token_lower, VERIFY_TOKEN, agent_rc, info, pass, agent_ok, attempt,
MAX_ATTEMPTS).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e4add873-3959-4018-92cb-6076509abc24

📥 Commits

Reviewing files that changed from the base of the PR and between 994cca2 and f465bb7.

📒 Files selected for processing (4)
  • .coderabbit.yaml
  • test/e2e/test-cloud-onboard-e2e.sh
  • test/e2e/test-docs-validation.sh
  • test/e2e/test-skill-agent-e2e.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/test-docs-validation.sh

@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 the current code and only fix it if needed.

Inline comments:
In `@test/e2e/test-docs-validation.sh`:
- Around line 135-140: The comment "Remote link probes can fail due to rate
limiting (429) — warn but don't block" contradicts the actual behavior because
the script calls fail and exits (uses fail and exit 1) when
CHECK_DOC_LINKS_REMOTE is enabled; update the comment to reflect that link
validation will cause a non‑zero exit (i.e., it will block CI) or alternatively
change the behavior to only warn by removing the fail/exit and relying on info;
locate the CHECK_DOC_LINKS_REMOTE check, the info call, the fail invocation and
the links_rc variable in the script and either rewrite the comment to accurately
state that remote link failures will fail the run or modify the failure path
(remove fail/exit) if you intend to truly "warn but don't block."
🪄 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: 3fb9c0e6-af17-4281-9b5f-b985083819c1

📥 Commits

Reviewing files that changed from the base of the PR and between f465bb7 and b93d195.

📒 Files selected for processing (4)
  • .coderabbit.yaml
  • test/e2e/test-cloud-onboard-e2e.sh
  • test/e2e/test-docs-validation.sh
  • test/e2e/test-skill-agent-e2e.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/test-skill-agent-e2e.sh
  • test/e2e/test-cloud-onboard-e2e.sh

Comment on lines +135 to +140
# Remote link probes can fail due to rate limiting (429) — warn but don't block
if [ "${CHECK_DOC_LINKS_REMOTE:-1}" != "0" ]; then
info "Link validation failed — may be due to remote rate limiting. Re-run with CHECK_DOC_LINKS_REMOTE=0 to check local links only."
fi
fail "Markdown link validation failed (exit ${links_rc})"
exit 1

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 | 🟡 Minor

Fix contradictory comment vs behavior in link-failure path.

Line 135 says “warn but don't block,” but Line 140 exits with failure. Please make the comment match the actual behavior to avoid future confusion.

Suggested patch
-  # Remote link probes can fail due to rate limiting (429) — warn but don't block
+  # Remote link probes can fail due to rate limiting (429); warn with remediation, then fail.
📝 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
# Remote link probes can fail due to rate limiting (429) — warn but don't block
if [ "${CHECK_DOC_LINKS_REMOTE:-1}" != "0" ]; then
info "Link validation failed — may be due to remote rate limiting. Re-run with CHECK_DOC_LINKS_REMOTE=0 to check local links only."
fi
fail "Markdown link validation failed (exit ${links_rc})"
exit 1
# Remote link probes can fail due to rate limiting (429); warn with remediation, then fail.
if [ "${CHECK_DOC_LINKS_REMOTE:-1}" != "0" ]; then
info "Link validation failed — may be due to remote rate limiting. Re-run with CHECK_DOC_LINKS_REMOTE=0 to check local links only."
fi
fail "Markdown link validation failed (exit ${links_rc})"
exit 1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/test-docs-validation.sh` around lines 135 - 140, The comment "Remote
link probes can fail due to rate limiting (429) — warn but don't block"
contradicts the actual behavior because the script calls fail and exits (uses
fail and exit 1) when CHECK_DOC_LINKS_REMOTE is enabled; update the comment to
reflect that link validation will cause a non‑zero exit (i.e., it will block CI)
or alternatively change the behavior to only warn by removing the fail/exit and
relying on info; locate the CHECK_DOC_LINKS_REMOTE check, the info call, the
fail invocation and the links_rc variable in the script and either rewrite the
comment to accurately state that remote link failures will fail the run or
modify the failure path (remove fail/exit) if you intend to truly "warn but
don't block."

@jyaunches
jyaunches force-pushed the issue-2644-split-cloud-experimental-e2e branch from 078380d to cecf7c8 Compare April 29, 2026 01:09
@jyaunches
jyaunches merged commit 9113dca into NVIDIA:main Apr 29, 2026
10 checks passed
DemianHeyGen pushed a commit to DemianHeyGen/NemoClaw that referenced this pull request Apr 30, 2026
…DIA#2644) (NVIDIA#2647)

## Summary

Replace the 931-line `cloud-experimental-e2e` monolith with 4
independent, focused E2E tests. Flaky phases no longer block signal from
stable phases.

Fixes NVIDIA#2644

## New Jobs

| Job | What it tests | Timeout | Former phases |
|-----|--------------|---------|---------------|
| `cloud-onboard-e2e` | Public installer, Landlock enforcement, API key
leak detection, inference.local HTTPS | 45 min | 0, 1, 3, 5 checks, 6 |
| `cloud-inference-e2e` | Live chat via inference.local, skill
filesystem validation | 30 min | 5b, 5c |
| `skill-agent-e2e` | Skill injection + agent verification (with retry +
fuzzy match) | 30 min | 5d |
| `docs-validation-e2e` | CLI/docs parity (nemoclaw --help vs
commands.md) | 15 min | 5f |

## Key Improvements

- **Flaky Phase 5d** (skill agent) no longer blocks Landlock/security
signal
- **Phase 5e** (TUI smoke) dropped from nightly — timing-dependent
expect with 7+ tunable sleeps is fundamentally unsuited for CI
- **Phase 5f** (docs validation) re-enabled as its own job — root cause
fixed by NVIDIA#2446 (typed command registry)
- Each test installs independently — no cascade failures
- `skill-agent-e2e` adds **retry logic** (3 attempts, 15s between) and
**fuzzy token matching** (case-insensitive, strips quotes/backticks) to
handle LLM non-determinism
- Remote link probing disabled for docs validation
(`CHECK_DOC_LINKS_REMOTE=0`) to avoid 429 rate-limit flakes

## Deleted

- `test/e2e/test-e2e-cloud-experimental.sh` (931-line monolith)
- `test/e2e/e2e-cloud-experimental/skip/` (3 dead scripts — coverage
already exists in dedicated jobs: `network-policy-e2e`,
`sandbox-operations-e2e`)

## Kept

- All helpers under `test/e2e/e2e-cloud-experimental/` (checks/,
features/, cleanup.sh, check-docs.sh) — referenced by the new scripts

## Type of Change

- Code change (refactor)

## Verification

- YAML validated locally
- All 29 nightly jobs have selective dispatch guards (validated with
script)
- All 4 new jobs in `notify-on-failure` and `report-to-pr` needs lists
- `workflow_dispatch.inputs.jobs` description updated with new job names

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Replaced one monolithic nightly E2E job with four targeted nightly
jobs (onboard, inference, skill-agent, docs validation); updated
notification/reporting workflow dependencies and workflow inputs.
* Shortened job timeouts and adjusted failure-artifact uploads for
clearer, faster diagnostics.
  * Updated review tooling guidance to map paths to the new E2E jobs.

* **Tests**
* Added standalone E2E runners for cloud onboarding, cloud inference,
skill-agent verification, and docs validation.
* Removed legacy experimental E2E orchestration and several obsolete
test scripts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jessica Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
@wscurran wscurran added the refactor PR restructures code without intended behavior change label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(e2e): split cloud-experimental-e2e into focused, independently-stable tests

4 participants