Skip to content

test(e2e): model boot restart before recovery - #8049

Merged
senthilr-nv merged 1 commit into
mainfrom
codex/fix-post-reboot-recovery-contract
Aug 1, 2026
Merged

test(e2e): model boot restart before recovery#8049
senthilr-nv merged 1 commit into
mainfrom
codex/fix-post-reboot-recovery-contract

Conversation

@senthilr-nv

@senthilr-nv senthilr-nv commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

The post-reboot E2E fixture now models the boot-owned restart of the preserved OpenShell container before checking recovery. The previous fixture retried nemoclaw <name> status against a stopped container even though no actor could start it, so the lane failed deterministically instead of testing automatic post-reboot recovery.

Changes

  • Start the preserved Docker container at the simulated reboot boundary and wait for the exact OpenShell sandbox to report Ready.
  • Invoke nemoclaw <name> status once after the boot transition so status remains responsible for restoring OpenClaw, host forwarding, and the delivery path.
  • Add focused coverage for command ordering and for starting the renamed preserved container in the GPU-backup scenario.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This changes only the E2E fixture's reboot simulation and support coverage. It does not change a product command, configuration, output, default, error, or supported user workflow.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Maintainer-directed E2E-only scope. The fixture starts the already identified preserved container; it does not change product sandbox lifecycle, command construction, credentials, or policy.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: The review confirmed exact command and lifecycle terminology in test/e2e/fixtures/phases/lifecycle.ts and behavior-oriented coverage in test/e2e/support/e2e-phase-lifecycle.test.ts. No user-visible product surface changes.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: npx vitest run --project e2e-support test/e2e/support/e2e-phase-lifecycle.test.ts passed 23/23; npm run test:e2e-phases:check passed with 114 tests across 71 files; CLI and plugin builds passed.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Aggregate e2e-support reached 1,888 passing tests; two Linux/systemd fixture cases are incompatible with the macOS login-shell harness and one unrelated Hermes swap test timed out. The changed lifecycle suite is green; Linux CI is the authoritative broad gate.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • 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: Senthil Ravichandran senthilr@nvidia.com

Summary by CodeRabbit

  • Tests
    • Updated lifecycle recovery coverage to reflect Docker-managed container startup after reboot.
    • Added verification for sandbox readiness during stop-and-restart and rename-and-restart scenarios.
    • Added failure and readiness checks for post-reboot recovery.
    • Replaced timer-based status retry coverage with direct boot-restart readiness validation.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv senthilr-nv self-assigned this Aug 1, 2026
@senthilr-nv
senthilr-nv enabled auto-merge (squash) August 1, 2026 07:46
@coderabbitai

coderabbitai Bot commented Aug 1, 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: f256583b-9a75-415e-b8a4-16ddb43d1e6f

📥 Commits

Reviewing files that changed from the base of the PR and between 31fb403 and 9516565.

📒 Files selected for processing (2)
  • test/e2e/fixtures/phases/lifecycle.ts
  • test/e2e/support/e2e-phase-lifecycle.test.ts

📝 Walkthrough

Walkthrough

The lifecycle fixture now models post-reboot Docker startup explicitly, polls sandbox readiness, and runs nemoclaw status once. E2E tests cover stop-original, recovery failure, stopped-container, and renamed GPU-backup scenarios.

Changes

Post-reboot recovery

Layer / File(s) Summary
Lifecycle recovery flow
test/e2e/fixtures/phases/lifecycle.ts
Readiness polling accepts transition labels. Post-reboot recovery starts the selected container, waits for sandbox readiness, records lifecycle steps, and runs status once.
Recovery scenario validation
test/e2e/support/e2e-phase-lifecycle.test.ts
Tests validate Docker start, sandbox readiness, command order, step IDs, failure handling, and renamed backup-container recovery. Fake-timer cleanup and retry-based assertions were removed.

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

Possibly related PRs

Suggested labels: area: e2e, chore

Suggested reviewers: cv, prekshivyas, cjagwani

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: modeling a boot restart before post-reboot recovery in E2E tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 codex/fix-post-reboot-recovery-contract

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

@github-code-quality

github-code-quality Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 9516565 in the codex/fix-post-reboo... branch remains at 96%, unchanged from commit 31fb403 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 9516565 in the codex/fix-post-reboo... branch remains at 81%, unchanged from commit 31fb403 in the main branch.


Updated August 01, 2026 07:58 UTC

@senthilr-nv senthilr-nv added chore Build, CI, dependency, or tooling maintenance area: e2e End-to-end tests, nightly failures, or validation infrastructure integration: openclaw OpenClaw integration behavior v0.0.100 labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections match; severity counts match.

Second-opinion E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-inference, cloud-onboard, security-posture, ubuntu-repo-docker-post-reboot-recovery

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@senthilr-nv
senthilr-nv merged commit 0de2789 into main Aug 1, 2026
75 of 76 checks passed
@senthilr-nv
senthilr-nv deleted the codex/fix-post-reboot-recovery-contract branch August 1, 2026 08:07
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 chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants