fix(e2e): align double-onboard stale-registry test with non-destructive status (#4578)#4672
Conversation
…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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTest updates assert that Changesdouble-onboard e2e adjustments
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: None Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
test/e2e/test-double-onboard.sh
Selective E2E Results — ✅ All requested jobs passedRun: 26825688323
|
Selective E2E Results — ✅ All requested jobs passedRun: 26825921931
|
Signed-off-by: San Dang <sdang@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/e2e/test-double-onboard.sh (1)
97-125: ⚡ Quick winConsider wrapping the probe-only reconciliation in
run_with_timeout.In Phase 7 the named gateway has been stopped (Phase 6), so this
connect --probe-onlyruns against a degraded/recovering gateway. Per the upstream contract that path runsensureLiveSandboxOrExit(which can spawn ~15sopenshell sandbox exec/probe calls), so an unbounded call here can stall cleanup right before teardown. The rest of the suite already guards probe calls withrun_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
📒 Files selected for processing (1)
test/e2e/test-double-onboard.sh
Selective E2E Results — ✅ All requested jobs passedRun: 26827051535
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Replaces #4635 with the same diff on an upstream
NVIDIA/NemoClawbranch so maintainers can dispatch E2E from the replacement PR. Thedouble-onboard-e2enightly job failed at Phase 5 because the test expectednemoclaw statusto reconcile stale registry entries, but #4578 intentionally madestatusnon-destructive. This PR aligns the test with that behavior by verifying the non-destructivestatusoutput first, then triggering actual reconciliation viaconnect --probe-only.Related Issue
Fixes #4639
Changes
test/e2e/test-double-onboard.sh: replace the singlenemoclaw statusreconciliation assertion with a two-step sequence.statusexits 1 and preserves the registry entry with the "No local registry entry was removed" guidance.connect --probe-onlyand verify "Removed stale local registry entry" plus final registry cleanup.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesNote: local checks were not rerun for this replacement branch; it copies #4635 unchanged. #4635 reported focused validation for
double-onboard-e2eon the same fix commit: https://github.com/hunglp6d/NemoClaw/actions/runs/26792577152.Signed-off-by: San Dang sdang@nvidia.com
Summary by CodeRabbit