Skip to content

fix(e2e): align double-onboard stale-registry test with non-destructive status (#4578)#4672

Merged
cv merged 4 commits into
mainfrom
sdang/reopen-4635-double-onboard
Jun 3, 2026
Merged

fix(e2e): align double-onboard stale-registry test with non-destructive status (#4578)#4672
cv merged 4 commits into
mainfrom
sdang/reopen-4635-double-onboard

Conversation

@sandl99

@sandl99 sandl99 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces #4635 with the same diff on an upstream NVIDIA/NemoClaw branch so maintainers can dispatch E2E from the replacement PR. The double-onboard-e2e nightly job failed at Phase 5 because the test expected nemoclaw status to reconcile stale registry entries, but #4578 intentionally made status non-destructive. This PR aligns the test with that behavior by verifying the non-destructive status output first, then triggering actual reconciliation via connect --probe-only.

Related Issue

Fixes #4639

Changes

  • test/e2e/test-double-onboard.sh: replace the single nemoclaw status reconciliation assertion with a two-step sequence.
  • Verify status exits 1 and preserves the registry entry with the "No local registry entry was removed" guidance.
  • Trigger reconciliation via connect --probe-only and verify "Removed stale local registry entry" plus final registry cleanup.

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

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes

Note: local checks were not rerun for this replacement branch; it copies #4635 unchanged. #4635 reported focused validation for double-onboard-e2e on the same fix commit: https://github.com/hunglp6d/NemoClaw/actions/runs/26792577152.


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

Summary by CodeRabbit

  • Improvements
    • Clarified that the status command is non-destructive and explicitly reports when it does not remove local registry entries.
    • Status and connect now intentionally preserve stale registry entries unless destroyed.
    • Cleanup now relies on the explicit destroy action to remove registry entries.
    • Tests updated to verify the non-destructive status message and to avoid forcing reconciliation after teardown.

…ve status (#4578)

Commit 4f7ae09 made `nemoclaw status` non-destructive: it no longer
removes stale local registry entries, keeping that cleanup in
active-use paths like `connect`.  The double-onboard E2E Phase 5 still
expected `nemoclaw status` to reconcile (remove) the stale entry.

Update the test to:
1. Verify that `status` preserves the registry entry and emits the
   new "No local registry entry was removed" guidance.
2. Trigger actual reconciliation via `connect --probe-only`, which
   calls ensureLiveSandboxOrExit and removes the stale entry.

Signed-off-by: Hung Le <hple@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jun 2, 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: adef05a6-6869-481a-8377-6409e1246d8c

📥 Commits

Reviewing files that changed from the base of the PR and between 7e50a02 and 0d11b01.

📒 Files selected for processing (1)
  • test/e2e/test-double-onboard.sh

📝 Walkthrough

Walkthrough

Test updates assert that nemoclaw status reports non-destructively ("No local registry entry was removed") and remove post-destroy status probes; reconciliation is exercised via nemoclaw connect --probe-only when required.

Changes

double-onboard e2e adjustments

Layer / File(s) Summary
Phase 5: assert non-destructive status
test/e2e/test-double-onboard.sh
Adds assertion that nemoclaw status output contains "No local registry entry was removed" before continuing stale-registry verification.
Phase 7: remove post-destroy status probes
test/e2e/test-double-onboard.sh
Removes explicit post-destroy nemoclaw "$SANDBOX_A" status / nemoclaw "$SANDBOX_B" status calls and replaces them with comments documenting that status/connect preserve registry entries and that cleanup relies on the earlier destroy --yes.

Sequence Diagram(s)

sequenceDiagram
  participant TestScript
  participant Status as "nemoclaw status"
  participant Connect as "nemoclaw connect --probe-only"
  participant Registry as "Local Registry"
  TestScript->>Status: run status and capture output
  Status-->>TestScript: "No local registry entry was removed"
  alt stale entry present
    TestScript->>Connect: run connect --probe-only to trigger reconciliation
    Connect->>Registry: perform stale-entry removal
    Registry-->>Connect: "Removed stale local registry entry"
    Connect-->>TestScript: reconciliation output
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4647: Updates test/e2e/test-double-onboard.sh to align e2e expectations with non-destructive status and probe-only reconciliation.
  • NVIDIA/NemoClaw#4578: Made nemoclaw status non-destructive and shifted reconciliation behavior such that tests must use connect --probe-only for stale-entry removal.

Suggested labels

fix, NemoClaw CLI, Sandbox

Suggested reviewers

  • cv
  • prekshivyas

Poem

🐰
I sniffed a stale and silent trace,
Status whispered, left no erase.
A probing hop, connect did sweep,
Registry tidy, tests can sleep. ✨

🚥 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 accurately summarizes the main change: aligning the double-onboard E2E test with the non-destructive status behavior introduced in #4578.
Linked Issues check ✅ Passed The PR fully addresses both objectives from issue #4639: verifying non-destructive status with the expected exit code and message, and exercising reconciliation via connect --probe-only.
Out of Scope Changes check ✅ Passed All changes in test/e2e/test-double-onboard.sh are directly scoped to the test alignment needed to resolve issue #4639; no extraneous modifications are present.

✏️ 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 sdang/reopen-4635-double-onboard

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

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: double-onboard-e2e

Dispatch hint: double-onboard-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None.

Optional E2E

  • double-onboard-e2e (high; ubuntu-latest job with 90 minute timeout): Useful to validate the edited E2E script itself and ensure the new stale-registry guidance assertion and cleanup changes do not break the existing double-onboard lifecycle job. This is not merge-blocking because only test code changed, not runtime code.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/nightly-e2e.yaml
  • jobs input: double-onboard-e2e

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • None. Changed file is a legacy/non-scenario E2E test under test/e2e/ and does not affect the scenario E2E suite under test/e2e-scenario/ or its workflows/metadata/runtime.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 1 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 0 still apply, 1 new item found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • PR description still describes connect as the stale-entry cleanup path (test/e2e/test-double-onboard.sh:757): The current test and source-of-truth now assert that routine connect preserves the stale registry entry and that explicit destroy is the purge path. However, the PR body and linked issue text still say to trigger reconciliation via connect --probe-only and verify 'Removed stale local registry entry'. That mismatch can mislead reviewers about the intended sandbox lifecycle contract.
    • Recommendation: Update the PR description and any carried-forward acceptance notes to say status and connect are non-destructive for missing-live entries, rebuild must still locate the preserved entry, and explicit destroy --yes is used to purge intentional stale registry state.
    • Evidence: The script says 'A routine `connect` against the same stale entry must also preserve it' and then fails if connect output contains 'Removed stale local registry entry'. It later uses `destroy --yes` and asserts 'destroy purged the stale ... registry entry'. This matches src/lib/actions/sandbox/gateway-state.ts, where ensureLiveSandboxOrExit preserves missing-live registry state and routes intentional purges through destroy.

🌱 Nice ideas

  • None.
Since last review details

Current findings:

  • PR description still describes connect as the stale-entry cleanup path (test/e2e/test-double-onboard.sh:757): The current test and source-of-truth now assert that routine connect preserves the stale registry entry and that explicit destroy is the purge path. However, the PR body and linked issue text still say to trigger reconciliation via connect --probe-only and verify 'Removed stale local registry entry'. That mismatch can mislead reviewers about the intended sandbox lifecycle contract.
    • Recommendation: Update the PR description and any carried-forward acceptance notes to say status and connect are non-destructive for missing-live entries, rebuild must still locate the preserved entry, and explicit destroy --yes is used to purge intentional stale registry state.
    • Evidence: The script says 'A routine `connect` against the same stale entry must also preserve it' and then fails if connect output contains 'Removed stale local registry entry'. It later uses `destroy --yes` and asserts 'destroy purged the stale ... registry entry'. This matches src/lib/actions/sandbox/gateway-state.ts, where ensureLiveSandboxOrExit preserves missing-live registry state and routes intentional purges through destroy.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@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/test-double-onboard.sh`:
- Around line 720-724: Phase 7 teardown still expects `nemoclaw status` to
reconcile stale registry entries but the new contract makes `status`
non-destructive; update the test to perform explicit reconciliation before the
gateway is torn down by either calling the reconciliation path (e.g., run
`nemoclaw connect --probe-only` or the test helper that invokes
ensureLiveSandboxOrExit) while the named gateway is still healthy, or restore a
healthy named gateway and invoke `connect --probe-only` prior to Phase 6 gateway
teardown so sandboxes.json is cleaned up; locate the Phase 5/6/7 logic in
test/e2e/test-double-onboard.sh and move or add the explicit reconciliation step
there referencing the `nemoclaw status` and `nemoclaw connect --probe-only`
commands and the sandboxes.json cleanup expectation.
🪄 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: e1b2298a-db66-45b4-b1cb-0cc103f75ebf

📥 Commits

Reviewing files that changed from the base of the PR and between c8df6ae and f16440d.

📒 Files selected for processing (1)
  • test/e2e/test-double-onboard.sh

Comment thread test/e2e/test-double-onboard.sh Outdated
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26825688323
Target ref: sdang/reopen-4635-double-onboard
Workflow ref: main
Requested jobs: double-onboard-e2e
Summary: 0 passed, 0 failed, 0 skipped

Job Result
double-onboard-e2e ⚠️ cancelled

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26825921931
Target ref: sdang/reopen-4635-double-onboard
Requested jobs: double-onboard-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
double-onboard-e2e ✅ success

@sandl99 sandl99 added E2E nightly-e2e Nightly E2E test failures labels Jun 2, 2026
@sandl99 sandl99 requested a review from cv June 2, 2026 14:39

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

🧹 Nitpick comments (1)
test/e2e/test-double-onboard.sh (1)

97-125: ⚡ Quick win

Consider wrapping the probe-only reconciliation in run_with_timeout.

In Phase 7 the named gateway has been stopped (Phase 6), so this connect --probe-only runs against a degraded/recovering gateway. Per the upstream contract that path runs ensureLiveSandboxOrExit (which can spawn ~15s openshell sandbox exec/probe calls), so an unbounded call here can stall cleanup right before teardown. The rest of the suite already guards probe calls with run_with_timeout (e.g. Line 693), so applying it here keeps the cleanup bounded and consistent.

♻️ Proposed change
   reconcile_log="$(mktemp)"
-  run_nemoclaw "$sandbox_name" connect --probe-only >"$reconcile_log" 2>&1 || true
+  run_with_timeout "${NEMOCLAW_E2E_PROBE_TIMEOUT_SECONDS:-30}" \
+    "${NEMOCLAW_CMD[@]}" "$sandbox_name" connect --probe-only >"$reconcile_log" 2>&1 || true
   reconcile_output="$(cat "$reconcile_log")"
   rm -f "$reconcile_log"
🤖 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/test-double-onboard.sh` around lines 97 - 125, The probe-only
reconciliation call in reconcile_stale_registry_entry currently invokes
run_nemoclaw "$sandbox_name" connect --probe-only directly (writing to
reconcile_log) and can block; wrap that invocation with the existing
run_with_timeout helper used elsewhere so the probe is time-bounded (use the
same timeout value used by other probe calls), while preserving capturing
stdout/stderr to reconcile_log and the trailing "|| true" behavior; update the
reconcile_log/reconcile_output handling to read the temp file created by the
run_with_timeout-wrapped invocation and keep the subsequent registry_has
check/diagnostic prints unchanged.
🤖 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.

Nitpick comments:
In `@test/e2e/test-double-onboard.sh`:
- Around line 97-125: The probe-only reconciliation call in
reconcile_stale_registry_entry currently invokes run_nemoclaw "$sandbox_name"
connect --probe-only directly (writing to reconcile_log) and can block; wrap
that invocation with the existing run_with_timeout helper used elsewhere so the
probe is time-bounded (use the same timeout value used by other probe calls),
while preserving capturing stdout/stderr to reconcile_log and the trailing "||
true" behavior; update the reconcile_log/reconcile_output handling to read the
temp file created by the run_with_timeout-wrapped invocation and keep the
subsequent registry_has check/diagnostic prints unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7860dbf0-da35-4005-b347-324c429a7455

📥 Commits

Reviewing files that changed from the base of the PR and between f16440d and 7e50a02.

📒 Files selected for processing (1)
  • test/e2e/test-double-onboard.sh

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26827051535
Target ref: sdang/reopen-4635-double-onboard
Workflow ref: main
Requested jobs: double-onboard-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
double-onboard-e2e ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv enabled auto-merge (squash) June 3, 2026 00:17
@cv cv added the v0.0.57 Release target label Jun 3, 2026
@cv cv merged commit 1f6685c into main Jun 3, 2026
30 checks passed
@cv cv deleted the sdang/reopen-4635-double-onboard branch June 3, 2026 00:21
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression and removed E2E nightly-e2e Nightly E2E test failures labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression v0.0.57 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nightly-e2e: double-onboard-e2e stale-registry reconciliation misaligned with #4578 (run 26790528855)

4 participants