You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a9ac0ae
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sandbox): spend each file ceiling once across every source
Two ceilings on a Function run's sandbox files were charged per source
rather than per execution.
Mounts: planUserFileMounts assigned a path per element, so one storage
key named by two sources became two mounts. The resolver already reuses
a marker for a file the code references twice, but nothing collapsed a
caller's `files` list against itself or against those markers — and
`files` is `user-or-llm`, so a model repeating an id is the ordinary
case. The duplicate cost a presign, a second transfer of identical
bytes, and a second charge against both the byte budget and the 20-file
mount ceiling, either of which then refuses a request that fits. Key on
the storage key, first occurrence wins; keyless files stay separate
since an empty key identifies nothing.
Exports: MAX_SANDBOX_OUTPUT_FILES is documented as what one execution
may export "whether declared by path or discovered by harvesting", and
the byte ceiling is already shared and dedup-aware across the two. The
count ceiling was not — a request declaring paths and harvesting a
directory could export 20 of each. Check the harvest against what the
declared paths leave, and drop a declared path inside the directory from
the discovered set so it is not billed on both sides. Unreachable from
execute-request today, which sets outputSandboxDir only when nothing
declares a sandboxPath, but the layer is caller-agnostic and already
commits to the combined rule for bytes.
Fixture keys in sandbox-mounts.test.ts were identical across files the
tests meant to be distinct; they now differ, which is what those tests
always claimed to set up.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments