Skip to content

fix(vast): bound SSH readiness observations and waits - #2448

Merged
steipete merged 3 commits into
mainfrom
codex/vast-readiness-deadline-n816
Sep 21, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/vast-readiness-deadline-n816

Conversation

@steipete

@steipete steipete commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Vast's ten-minute SSH-endpoint wait checked the clock only after an API observation. A slow request or retry sleep could therefore outlive that budget. The client also redacted transport errors by flattening their causes into strings.

Use a deadline-bearing context for observations and waits, reuse the shared cancellation-aware sleeper, and retain transport causes through the shared display-safe error wrapper. Preserve completed ready responses, terminal native states, and API errors; do not relabel an independent client timeout as startup timeout. Lifecycle timestamps, native ownership, provisioning payloads, and cleanup rules are unchanged. Documentation and an Unreleased entry are included.

Verification

  • New regressions failed on the original implementation: pre-canceled reads, blocked reads/sleeps, and custom cancellation causes.
  • Full Vast race suite and vet pass in a credential-free, loopback-only runtime.
  • Real loopback HTTP requests confirm that the readiness budget cancels the actual client; a transport regression confirms redaction and cause identity together.
  • Independent Codex review: no actionable findings through P2.

Before merge

Exact-head CI run 35626628510 passed for the synchronized source below. No credentials, dependency changes, or configuration migration are required.

Native proof on synchronized head

Source: 5e04038733d27edc8efb6866405b8cf09095a487. Binary SHA-256: 2f3c164e16d297af08be1ea8f0df21b660b9fe74e27afa91dca24545c12fd0e9. After merging main and retaining both changelog entries, the full Vast race suite, vet, and complete independent review passed again. A fresh native RTX 5090 instance under the $0.50/hour offer-search cap passed account checks, acquisition through the changed readiness loop (256 seconds including bootstrap), and actual SSH readiness (ready: true, state: ready). The first normal destroy succeeded; independent full inventory and exact-ID reads confirmed no task instance remained, and the local claim was absent. Private runtime/key material was removed and the owned credential window closed. This is a new run on the synchronized source, not a relabeling of earlier proof.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 21, 2026
@steipete
steipete marked this pull request as ready for review September 21, 2026 16:08
@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 12:48 PM ET / 16:48 UTC (Revision 5).

ClawSweeper review

What this changes

The PR bounds Vast SSH-endpoint polling and retry waits by the existing startup deadline, preserves redacted transport error causes, and adds regression coverage and documentation.

Merge readiness

Ready for maintainer review

The fix remains necessary: current main and v0.63.0 still leave readiness observations outside the startup deadline. The synchronized head resolves the previous conflict, has sufficient real behavior proof, and introduces no actionable correctness findings.

Priority: P2
Reviewed head: 5e04038733d27edc8efb6866405b8cf09095a487

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with sufficient native proof, relevant cancellation coverage, and no remaining review findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The supplied synchronized-head native run exercises Vast acquisition through the changed readiness owner and reports successful SSH readiness and verified cleanup; reported real loopback HTTP fault execution covers deadline cancellation through the actual client.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied synchronized-head native run exercises Vast acquisition through the changed readiness owner and reports successful SSH readiness and verified cleanup; reported real loopback HTTP fault execution covers deadline cancellation through the actual client.
Evidence reviewed 8 items Introduced patch and scope: The pinned main-to-head delta changes only the Vast adapter, its tests, provider documentation, and one release-note entry. The readiness context now reaches both GetInstance and the shared sleeper.
Current main still needs the fix: Main passes the parent context to API observations and checks elapsed time only after a completed nonterminal response; the startup budget therefore cannot interrupt an in-flight request.
Latest release retains the old behavior: The v0.63.0 source also uses the post-observation clock check without a readiness deadline on requests. The latest release does not supersede this patch.
Findings None None.
Security None None.

How this fits together

Crabbox’s Vast adapter provisions GPU instances and waits for an SSH endpoint before bootstrapping tools and returning a usable lease. This polling step consumes Vast API responses and caller cancellation, then returns readiness or an error to the acquisition and cleanup flow.

flowchart TD
  A[Lease acquisition] --> B[Ten-minute readiness budget]
  B --> C[Vast API observation]
  C --> D{Observation result}
  D -->|Ready endpoint| E[SSH bootstrap and lease]
  D -->|Still loading| F[Cancellation-aware wait]
  F --> C
  D -->|Error or deadline| G[Safe error and acquisition cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth Production +3 net lines; tests +169 net lines Small production growth is justified by deadline classification and preserving error causes, with focused regression coverage.

Technical review

Best possible solution:

Keep readiness timing inside the Vast adapter, using shared cancellation and display-safe error helpers without changing lease ownership or configuration.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the failure path: a Vast observation begun near the startup deadline can continue beyond it because main supplies only the parent context. This review did not execute a reproduction.

Is this the best way to solve the issue?

Yes. A deadline-bearing polling context and existing shared error helpers repair the established timeout contract without introducing a parallel configuration or lifecycle mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7ef1afd0fab1.

Labels

Label justifications:

  • P2: This repairs a bounded Vast provisioning timeout defect without evidence of a broader outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied synchronized-head native run exercises Vast acquisition through the changed readiness owner and reports successful SSH readiness and verified cleanup; reported real loopback HTTP fault execution covers deadline cancellation through the actual client.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied synchronized-head native run exercises Vast acquisition through the changed readiness owner and reports successful SSH readiness and verified cleanup; reported real loopback HTTP fault execution covers deadline cancellation through the actual client.

Evidence

What I checked:

  • Introduced patch and scope: The pinned main-to-head delta changes only the Vast adapter, its tests, provider documentation, and one release-note entry. The readiness context now reaches both GetInstance and the shared sleeper. (internal/providers/vast/backend.go:370, 5e04038733d2)
  • Current main still needs the fix: Main passes the parent context to API observations and checks elapsed time only after a completed nonterminal response; the startup budget therefore cannot interrupt an in-flight request. (internal/providers/vast/backend.go:379, 7ef1afd0fab1)
  • Latest release retains the old behavior: The v0.63.0 source also uses the post-observation clock check without a readiness deadline on requests. The latest release does not supersede this patch. (internal/providers/vast/backend.go:375, 8a8b22d6fd4f)
  • Previous blocker resolved: The test merge’s raw parents are exactly pinned main followed by the reviewed head. Its CHANGELOG retains both the Vast entry and fix(runpod): preserve SSH readiness termination causes #2449, matching the supplied maintainer request to preserve both entries. (CHANGELOG.md:14, f4af28acb025)
  • Re-review continuity: The Vast production files, tests, and documentation are unchanged from the previously reviewed head; the targeted comparison is empty. The previous review contained no findings, and its concrete blocker was integration with main. (5e04038733d2)
  • Native and cancellation proof: The supplied complete PR body and fix(vast): bound SSH readiness observations and waits #2448 (comment) report a fresh native RTX 5090 acquisition on the synchronized source, 256 seconds including bootstrap, ready:true/state:ready, successful normal destroy, independent inventory and exact-ID absence, and local claim removal. Binary SHA-256 is 2f3c164e16d297af08be1ea8f0df21b660b9fe74e27afa91dca24545c12fd0e9. The body also reports actual loopback HTTP cancellation through the production client and passing Vast race tests and vet. These are contributor-supplied observations; this read-only review did not execute tests. (internal/providers/vast/client_test.go:98, 5e04038733d2)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-21T16:07:09.012Z sha 8a19ef6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-21T16:15:17.562Z sha 8a19ef6 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T16:19:33.376Z sha 8a19ef6 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T16:34:34.611Z sha 8a19ef6 :: needs changes before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The main PR body now contains completed native proof for the unchanged reviewed head 8a19ef6: fresh acquisition, actual SSH readiness, successful normal destroy, independent inventory/exact-ID absence, and local claim cleanup. The private runtime and credential window are closed. The previous review captured the body before that proof was available; exact-head CI is still pending.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 21, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The synchronized head is 5e04038. The main body now includes a new native run on that exact source: fresh acquisition, actual SSH readiness, successful normal destroy, independent inventory/exact-ID absence, and local claim cleanup. Both changelog entries were retained during integration; the full Vast race suite, vet, and independent review passed again. The private runtime and credential window are closed. Current-head CI remains running.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@steipete
steipete merged commit 46fb70e into main Sep 21, 2026
30 checks passed
@steipete
steipete deleted the codex/vast-readiness-deadline-n816 branch September 21, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant