Skip to content

perf(platform): let staged skills survive a sandbox restart unsent - #4556

Merged
yannickmonney merged 2 commits into
mainfrom
perf/sandbox-staging-digests
Oct 9, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
perf/sandbox-staging-digests

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Every turn after a session's idle stop re-sent every equipped skill bundle inline (up to 32 MiB each), because the reuse probe identified files by digest but did not send the digest, and the runtime's record of what it staged dies with the container.

Changes

perf(platform): let staged skills survive a sandbox restart unsent

Skill bundles stage as inline files with a reuse probe that named each
file by the digest of its bytes but did not send the digest. The runtime
could confirm a hit only from its in-memory record of what it had staged,
which every restart of a stopped session (5 minutes after a turn) loses,
so each later turn sent every bundle again inline: up to 32 MiB per skill,
read, base64-encoded and carried platform -> spawner -> runnerd at 1.33x.

The probe now carries each file's sha256, which the runtime already checks
against the file on disk when an item names one, so an unchanged bundle is
confirmed without its bytes after a restart too.

Verification

  • vitest: session_client.staging.test.ts + session_client.test.ts 101 pass (the probe test now asserts each file's digest).
  • @tale/platform typecheck; type-aware oxlint clean on the touched files.
  • The runtime side is unchanged: file-ops.ts already verifies sha256 against the file on disk (held by file-ops.test.ts).

Part of the sandbox footprint and robustness pass (#4533, #4538 and siblings).

@yannickmonney
yannickmonney added this pull request to the merge queue Oct 9, 2026
@yannickmonney
yannickmonney removed this pull request from the merge queue due to a manual request Oct 9, 2026
@yannickmonney
yannickmonney force-pushed the perf/sandbox-staging-digests branch from 3a87ea8 to f8386be Compare October 9, 2026 02:40
@yannickmonney
yannickmonney force-pushed the perf/sandbox-staging-digests branch from f8386be to 9a5df17 Compare October 9, 2026 02:41
Skill bundles stage as inline files with a reuse probe that named each
file by the digest of its bytes but did not send the digest. The runtime
could confirm a hit only from its in-memory record of what it had staged,
which every restart of a stopped session (5 minutes after a turn) loses,
so each later turn sent every bundle again inline: up to 32 MiB per skill,
read, base64-encoded and carried platform -> spawner -> runnerd at 1.33x.

The probe now carries each file's sha256, which the runtime already checks
against the file on disk when an item names one, so an unchanged bundle is
confirmed without its bytes after a restart too.
The automation coverage map now keeps one file per suite, so parallel changes stop appending to the same lines; this change's rows move there, after their own anchor row.
@yannickmonney
yannickmonney force-pushed the perf/sandbox-staging-digests branch from 9a5df17 to 6599ce6 Compare October 9, 2026 02:57
@yannickmonney
yannickmonney merged commit b1528b0 into main Oct 9, 2026
@yannickmonney
yannickmonney deleted the perf/sandbox-staging-digests branch October 9, 2026 03:02
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