Repository navigation
fix(sandbox): reduce stream work and protect replacement sessions - #4200
Merged
Merged
Conversation
yannickmonney
force-pushed
the
fix/sandbox-hot-path-efficiency
branch
4 times, most recently
from
October 4, 2026 08:14
64e112b to
851f350
Compare
yannickmonney
force-pushed
the
fix/sandbox-hot-path-efficiency
branch
from
October 4, 2026 11:29
2cb81c0 to
cbd4ee7
Compare
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.
Summary
Tiny agent-output deltas repeatedly copied and serialized retained text, and sandbox execs kept unused output copies beside their replay journals. This change makes display updates incremental and snapshots lazy, preserves the complete terminal answer under its existing cap, and removes the redundant output histories while keeping exact journal replay. Session recovery now keeps endpoint and metadata tied to the same incarnation and rejects stale adoption, cleanup, legacy-acquire, Docker-readiness and admission results before they can affect replacement sessions or start an exec.
Checklist
bun run checkpasses (format, lint, typecheck, all tests) — corresponding final-head CI gates pass. All six applicable workflows completed successfully on attempt 1; actual execution, expected skips and cache replays are recorded below.bun run lint:sastpasses (Opengrep) — final-head CI scanned 4,510 files with 476 rules and no unsuppressed findings. All 14 SARIF records have accepted suppressions; unchanged-file parsing/timeouts and exclusions limit coverage. Local full-rule scanning of all 21 changed TypeScript files also reported zero findings and no production-file errors.messages/{en,de,fr}.ymlcatalogs, including shared UI strings and relevantde-CHoverrides — N/A: no localized UI or product-copy changes in this PR.docs/{en,de,fr}/for any user-visible change — N/A: internal runtime changes; session reference and automated coverage register updated.README.md/README.de.md/README.fr.mdupdated — runtime storage ownership and reproducible performance workloads documented; no translated README is affected.Test plan
cbd4ee74abd3bdbd4079beebd45ef6869e70a85e; executed merge8132049aff683c826c53e7669ae91133be23c6e1combines that head with base9e8f87f6832cf352eb70a0ad666bbec6fd9d1a57. Checks, E2E, Build, CLI, SAST and Commitlint all passed.ITEST_REQUIRE_ALL_LANES=1and strict error codes; 1,545/1,545 checks, 227/227 lanes, zero skips/failures, exit 0. Candidate DB image, CLI-pinned object store and exact source verified independently.Image scans retain existing vulnerabilities: sandbox 401 occurrences, runtime 1,743, platform 1,148. No occurrences were added against the contemporary upstream baselines. Runtime and platform each omit one previously reported medium zlib finding; that reporting difference is not evidence of remediation. Existing critical/high findings remain, and scan policy is unchanged and advisory. Scanner limits include vendor severity selection, one large source-map secret-scan warning and two runtime SBOM license-expression warnings.
The aggregate Trivy check is neutral because eight main-branch scan configurations are outside this PR's applicable scans. GitHub therefore cannot calculate whole-PR introduced alerts; the three image comparisons above were inspected independently.