Skip to content

typescript: sync @useblacksmith/sandbox - #8

Merged
ajwerner merged 1 commit into
mainfrom
copybara/sandbox-sdk
Oct 26, 2026
Merged

ajwerner merged 1 commit into
mainfrom
copybara/sandbox-sdk

Conversation

@ajwerner

@ajwerner ajwerner commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Sync @useblacksmith/sandbox

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/typescript/src/sandbox.ts Resolved
@ajwerner
ajwerner force-pushed the copybara/sandbox-sdk branch from 6b6685f to b6e5600 Compare October 23, 2026 18:52
@blacksmith-staging

blacksmith-staging Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Matches Agent call waits through pause/resume

Still holds: before, exec failed at once with sandbox_paused. After, it waited for the resume, replayed, printed hello, and reported the wait as running.

Merge-base

Exec fails immediately

This PR 39f6f42d

Exec waits, then succeeds

Also checked · 4 match

Matches Wait gives up at pauseResumeTimeoutMs
Matches Retired socket on running sandbox is replayed
Matches Health check now sends the bearer token
Matches Wait is bounded when health hangs after resume

Proof on 39f6f42d (from 4ed1778b)

View full Proof report

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/typescript/src/sandbox.ts Resolved
Comment thread packages/typescript/src/sandbox.ts Resolved
@ajwerner
ajwerner force-pushed the copybara/sandbox-sdk branch from b6e5600 to 4ed1778 Compare October 25, 2026 22:51

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/typescript/src/sandbox.ts Resolved
GitOrigin-RevId: ebf48032142a7dd390a1994fcba685c20e64bf27
@ajwerner
ajwerner force-pushed the copybara/sandbox-sdk branch from 4ed1778 to 39f6f42 Compare October 26, 2026 20:05
@ajwerner
ajwerner merged commit a7c4072 into main Oct 26, 2026
7 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 39f6f42. Configure here.

await this.raceAbort(
this.waitUntilReady(cutoff - Date.now(), waitSignal, cutoff),
waitSignal,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Health probe consumes resume redial

Medium Severity

redial() runs immediately before waitUntilReady, so the health probe consumes redialNext. The replayed agent call can then reuse a pooled connection to the host the resume left. After a transport-triggered wait, withRecheck has already spent its transport replay and surfaces that failure even though the sandbox is running.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 39f6f42. Configure here.

return fail(
"timeout",
new SandboxTransportError("GET", `${this.client.baseUrl}/health`, 1, unreachable),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ready wait discarded at cutoff

Medium Severity

After waitUntilReady succeeds, waitThroughPauseResume still fails the wait when Date.now() has reached cutoff. A health probe that finishes inside the 250ms slack is treated as unreachable, so the user call errors even though the agent already answered.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 39f6f42. Configure here.

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