Repository navigation
feat: record sandbox usage on eval results - #303
Merged
mattrossman merged 11 commits intoSep 21, 2026
Merged
mattrossman merged 11 commits into
mattrossman merged 11 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mattrossman
force-pushed
the
mattrossman/ai-1222-record-sandbox-usage-metrics-on-eval-results
branch
from
September 16, 2026 21:23
f39014c to
0f22936
Compare
This reverts commit d9bc1c7.
mattrossman
commented
Sep 17, 2026
mattrossman
marked this pull request as ready for review
September 17, 2026 20:40
gregnr
approved these changes
Sep 17, 2026
Collaborator
Author
|
Hex has been updated with the renamed |
This was referenced Sep 21, 2026
mattrossman
added a commit
that referenced
this pull request
Sep 21, 2026
Fixes a regression that slipped into [#303](#303) where runs without a `workspace/` (non local-stack ones) fail to upload artifacts. My verification dispatch on that PR ran a [single CLI eval](https://github.com/supabase/evals/actions/runs/35152800137), one of the few that does produce a workspace, so nothing caught it. Packing now writes an empty archive when the dir is absent, which keeps the missing-archive check in `downloadResults` strict. Verified with a more comprehensive [full regression refresh on this branch](https://github.com/supabase/evals/actions/runs/35657023299), 78/78 runs packed and exported (compare with [the same dispatch on `main`](https://github.com/supabase/evals/actions/runs/35634801354) which dropped 54 of 78)
mattrossman
added a commit
that referenced
this pull request
Sep 24, 2026
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](https://vercel.com/docs/sandbox/sdk-reference#sandbox.stop) claim "`sandbox.stop()` resolves once the VM is fully stopped". Filed upstream as [vercel/sandbox#350](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](https://github.com/supabase/evals/blob/dacee2b9ef76eba40db88f6d3f8a9c9b4e1a3ff3/apps/web/src/data/regression-eval-results.json#L159-L161) recording `memory` only, and [after a single-run regression refresh](https://github.com/supabase/evals/blob/eb2adfd6/apps/web/src/data/regression-eval-results.json#L154-L162) they record full usage. | Before | After | |--------|--------| | <img width="570" height="170" alt="CleanShot 2026-09-24 at 2 08 46 PM@2x" src="https://github.com/user-attachments/assets/f2b9913c-a349-4346-9fdc-ff7a58db451e" /> | <img width="514" height="418" alt="CleanShot 2026-09-24 at 2 08 50 PM@2x" src="https://github.com/user-attachments/assets/9ecb6f8d-321d-4673-bbda-b1afd4b8f892" /> | Closes AI-1247 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records Vercel Sandbox's metered usage on eval results so we can estimate total sandbox cost per experiment. See fields mirrored from
sandbox.stop()return type.I renamed our
durationMs->agentRunDurationMsto disambiguate from the new sandbox duration fields.Notes
In the previous PR #302 I kept all the files from the Sandbox tarred together to keep the agent-authored ones contained in case of corrupt filenames. This PR moves
result.jsonout from that so we can inject the Sandbox usage stats w/o needing to untar / retar the results file.The runner tests also cover archived agent-authored filenames and incomplete
.partialresults.How to review
I sanity checked one benchmark eval via the refresh workflow. Take a look at the sandbox usage snapshot to vet the new fields.
Closes AI-1222