Skip to content

fix(ci): poll sandbox stop until usage is final - #334

Merged
mattrossman merged 8 commits into
mainfrom
mattrossman/ai-1247-poll-the-sandbox-session-until-stopped-before-recording
Sep 24, 2026
Merged

mattrossman merged 8 commits into
mainfrom
mattrossman/ai-1247-poll-the-sandbox-session-until-stopped-before-recording

Conversation

@mattrossman

@mattrossman mattrossman commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up on edge case from #303.

When VM shutdown is slow, sandbox.stop() resolves after ~15s with status: "stopping" and no duration, CPU, or network, so our results have primarily recorded sandboxUsage as memory only. This was missed in #303 because it didn't occur on my test run, it's possibly an upstream bug since Vercel docs claim "sandbox.stop() resolves once the VM is fully stopped". Filed upstream as vercel/sandbox#350.

Sandbox cleanup now polls stop() while the session is still stopping (up to 60s) and warns if usage is still incomplete.

Compare regression results before recording memory only, and after a single-run regression refresh they record full usage.

Before After
CleanShot 2026-09-24 at 2 08 46 PM@2x CleanShot 2026-09-24 at 2 08 50 PM@2x

Closes AI-1247

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Preview Sep 24, 2026 7:21pm UTC

Request Review

@mattrossman
mattrossman marked this pull request as ready for review September 24, 2026 18:14
@mattrossman
mattrossman requested a review from a team as a code owner September 24, 2026 18:14
@mattrossman
mattrossman merged commit 63de54c into main Sep 24, 2026
7 checks passed
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.

2 participants