Skip to content

test(onboard): cover rebuild resume snapshot handoff#5111

Merged
cv merged 2 commits into
mainfrom
codex/fsm-polish-rebuild-resume-coverage
Jun 10, 2026
Merged

test(onboard): cover rebuild resume snapshot handoff#5111
cv merged 2 commits into
mainfrom
codex/fsm-polish-rebuild-resume-coverage

Conversation

@cv

@cv cv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds targeted rebuild/resume boundary coverage for the reopened-complete snapshot shape that #4533 called out after #4472. The test drives rebuildSandbox() through the recreate handoff with destructive work stubbed, then verifies onboard --resume sees the reopened terminal session shape that repairResumeMachineSnapshot() repairs.

Related Issue

Refs #3802

Changes

  • Adds src/lib/actions/sandbox/rebuild-resume-snapshot.test.ts.
  • Stubs Docker/OpenShell/destructive rebuild work while preserving the real rebuild-to-onboard handoff shape.
  • Verifies rebuild marks a completed session as status: in_progress and resumable: true, and that resume repair maps it back to provider_selection from the legacy completed step.

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

Focused verification run locally:

  • npm run build:cli
  • npx vitest run --project cli src/lib/actions/sandbox/rebuild-resume-snapshot.test.ts
  • npx vitest run --project cli src/lib/onboard/resume-machine-repair.test.ts src/lib/actions/sandbox/rebuild-resume-snapshot.test.ts src/lib/actions/sandbox/rebuild-gateway-drift.test.ts src/lib/actions/sandbox/rebuild-shields-finally.test.ts
  • npm run typecheck:cli
  • npm run test-size:check
  • npm run source-shape:check
  • git diff --check

Full npx prek run --all-files / hook path was attempted, but this local machine still fails in unrelated test/release-latest-tag.test.ts fixture commits because /home/cvillela/.ssh/git-signing-key.pub has no available private key. This PR does not touch that test.

  • 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
  • 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: Carlos Villela cvillela@nvidia.com

@cv cv added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery labels Jun 10, 2026
@cv cv self-assigned this Jun 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cv, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 20 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 156bd126-44e1-4f19-9eb4-aa7a3b9296a9

📥 Commits

Reviewing files that changed from the base of the PR and between 7a471a0 and be5d7ad.

📒 Files selected for processing (1)
  • src/lib/actions/sandbox/rebuild-resume-snapshot.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fsm-polish-rebuild-resume-coverage

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

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

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

Workflow run details

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

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. Only a new unit test file is added. The change improves coverage for sandbox rebuild/onboarding resume behavior but cannot affect runtime or real assistant user flows, so no existing E2E job is required.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jun 10, 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. Change is a unit test outside test/e2e-scenario/ and does not modify scenario workflows, scenario metadata, expected-state contracts, suite definitions, runtime code, or scenario-relevant install/onboarding helpers.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

@cv cv marked this pull request as ready for review June 10, 2026 06:26
@cv cv merged commit 5db8df3 into main Jun 10, 2026
30 checks passed
@cv cv deleted the codex/fsm-polish-rebuild-resume-coverage branch June 10, 2026 06:35
@cv cv added the v0.0.63 Release target label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery v0.0.63 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants