Skip to content

fix(sdk): fail promptly when Studio startup terminates - #195

Merged
ethanwharris merged 2 commits into
mainfrom
codex/deflake-start-failure-oct12
Oct 13, 2026
Merged

ethanwharris merged 2 commits into
mainfrom
codex/deflake-start-failure-oct12

Conversation

@ethanwharris

@ethanwharris ethanwharris commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What does this PR change?

There are cases where start-up errors for some reason or other and the SDK can get stuck. Instead, this PR makes it fail fast when things have failed.

Agent

Root cause and verification

The old loop fetched up to three status snapshots per poll and only checked restore readiness. A workload exiting with code 2 briefly passed through FAILED before STOPPING and DELETED, leaving start blocked until the CI timeout. The new loop binds to the first new instance ID after start and checks one snapshot per poll, including cleanup states.

Validation: 142 tests passed across Studio API, mocked startup lifecycles, and public Studio startup (6.32s). Pinned Ruff and changed-file pre-commit hooks, including mypy, passed.

What else should a reviewer know?

The start response contains no instance ID. If cleanup removes the instance before any poll observes it, the SDK cannot associate that failure with this start. It also cannot recover a failure message already overwritten by the backend. This improves reporting; the underlying GCP workload crash remains unresolved.

— GPT-6, via /create-pr; text not reviewed

@ethanwharris
ethanwharris marked this pull request as ready for review October 12, 2026 11:35
@ethanwharris
ethanwharris merged commit 32f3abc into main Oct 13, 2026
39 checks passed
@ethanwharris
ethanwharris deleted the codex/deflake-start-failure-oct12 branch October 13, 2026 12:19
bmaydan pushed a commit that referenced this pull request Oct 14, 2026
Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants