Skip to content

fix(sandbox): keep a workbench timeout report when its stop settles after the call deadline - #9619

Closed
waleedlatif1 wants to merge 1 commit into
stagingfrom
fix/v0942-release-review
Closed

waleedlatif1 wants to merge 1 commit into
stagingfrom
fix/v0942-release-review

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A workbench run stopped by its own timeout reports its output and files, but both run paths checked the call signal before building that report. When the provider's stop round trip outlasted the report reserve, the call deadline had already passed and the run returned a bare timeout with the printed output dropped
  • The cancellation check moves into throwIfRunTimedOut: a deadline that passes while the stop settles keeps the report, and a cancellation at any point stays a cancellation
  • One-shot sandboxes and runs that did not time out keep the same checks as before

Type of Change

  • Bug fix

Testing

  • New session-sandbox.test.ts case: a 10s workbench run whose stop settles 3s after its own timeout. Red on current staging (bare AbortError: timeout), green with the fix
  • lib/execution/remote-sandbox/ suite: 22 files, 592 tests pass, including the existing cancellation-while-listing case
  • biome clean; full type-check, check:audits and the full suite are left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…fter the call deadline

A workbench run stopped by its own timeout reports its output and files, but
both run paths checked the call signal before the report. When the provider's
stop round trip outlasted the report reserve, the call deadline had already
passed and the run returned a bare timeout with its output dropped.

- The cancellation check moves into throwIfRunTimedOut: a passed deadline
  keeps the report, a cancellation at any point stays a cancellation
- One-shot sandboxes and runs that did not time out keep their checks
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 3, 2026 6:38am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Keeps a workbench run’s printed output when its timeout stop finishes after the call deadline.

  • Timed-out workbench runs keep their output when stopping finishes late.

Reviews (1) · Last reviewed commit: "fix(sandbox): keep a workbench timeout r..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Superseded by #9617, which landed the same change on staging first (the cancellation check moved into throwIfRunTimedOut via throwIfCancelled, so a passed deadline keeps the timeout report). This PR's regression test, a 10s workbench run whose stop settles 3s after its own timeout, passes on current staging.

@waleedlatif1
waleedlatif1 deleted the fix/v0942-release-review branch November 3, 2026 06:55

This branch was previously deployed

1 inactive deployment
Preview — bf023b27 Deployed Nov 3, 2026 by vercel[bot]
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.

1 participant