Skip to content

fix(gateway-state): restore column-agnostic Ready check in isSandboxReady - #2222

Merged
ericksoa merged 1 commit into
mainfrom
fix/ready-check-column-assumption
Apr 22, 2026
Merged

ericksoa merged 1 commit into
mainfrom
fix/ready-check-column-assumption

Conversation

@ericksoa

@ericksoa ericksoa commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • PR fix(connect): add readiness poll with timeout before connecting (Fixes #430) #466 refactored isSandboxReady to delegate to parseSandboxStatus, which hardcodes the status to column 2 (cols[1]). The previous implementation used cols.includes("Ready") to check all columns.
  • When openshell sandbox list outputs the status in a column other than the second, the readyCheck never returns true, causing openshell sandbox create to hang indefinitely after image upload — the sandbox becomes Ready but NemoClaw never detects it.
  • This broke every nightly E2E test. Bisected to 49ec8955 (fix(connect): add readiness poll with timeout before connecting (Fixes #430) #466) with confirmed good run on the prior commit.
  • Restores the column-agnostic cols.includes("Ready") && !cols.includes("NotReady") check while keeping the parseSandboxRow helper.

Bisect results

Commit Result
bd82e1f0 (pre-#466) Pass
ff18fb8f (midpoint) Pass
49ec8955 (#466) Fail — sandbox hangs
37ca70e6 (pre-#466, docs) Pass

Test plan

  • vitest run test/onboard-readiness.test.ts — 34 passed
  • Nightly E2E on this branch

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved sandbox readiness detection to be more resilient across different versions of the sandbox management tool, ensuring reliable status parsing regardless of column layout variations.

…eady

PR #466 refactored isSandboxReady to delegate to parseSandboxStatus,
which only checks column 2 (cols[1]) for the status. The previous
implementation checked all columns via cols.includes("Ready"). When
openshell sandbox list outputs the status in a column other than the
second, the readyCheck never returns true, causing openshell sandbox
create to hang indefinitely after image upload.

Restore the column-agnostic check while keeping the parseSandboxRow
helper.

Fixes: sandbox creation hang on all nightly E2E tests since #466.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7abd94c8-3871-46da-b3ed-b47ff41fb812

📥 Commits

Reviewing files that changed from the base of the PR and between eda521e and 1370224.

📒 Files selected for processing (1)
  • src/lib/gateway-state.ts

📝 Walkthrough

Walkthrough

The isSandboxReady function in src/lib/gateway-state.ts was refactored to improve robustness against openshell sandbox list column-layout variations. Instead of relying on exact column position matching, it now parses the full sandbox row and checks for the presence of "Ready" and absence of "NotReady" strings.

Changes

Cohort / File(s) Summary
Sandbox Readiness Detection
src/lib/gateway-state.ts
Modified isSandboxReady() function to parse full sandbox row instead of matching exact column position, making it resilient to version-specific column-layout changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through sandbox states,
No longer bound by column fates,
Where "Ready" hides in flowing text,
More flexible—what comes next? 🐰✨

🚥 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 and specifically describes the main change: restoring a column-agnostic Ready check in isSandboxReady, which directly addresses the core regression described in the PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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 fix/ready-check-column-assumption

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

@ericksoa
ericksoa merged commit 9339a85 into main Apr 22, 2026
26 of 34 checks passed
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
@cv
cv deleted the fix/ready-check-column-assumption branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants