Repository navigation
fix(sandbox): release retained command memory and bound stdin - #4185
Merged
Merged
Conversation
yannickmonney
force-pushed
the
fix/sandbox-ram-growth
branch
from
October 3, 2026 22:38
932d5ad to
4019cca
Compare
yannickmonney
added a commit
that referenced
this pull request
Oct 4, 2026
* fix(platform): enforce project rights for run controls Scope project run controls, transcripts and connector-operation approvals to the project permission rule while retaining organization-level behavior. Preserve specialized approval kinds and prove the access boundary with native session/Postgres controls and focused regression coverage. * fix(sandbox): bound agent execution and recover session state (#4174) Bound agent replay, retained projections, progress writes and file transfers while preserving authoritative results and explicit recovery failures. Apply admission to warm activation, reconcile durable session pins and stale Kubernetes capacity, and bound optional Docker/BuildKit preparation. Include regression coverage and operator documentation. * feat(platform): run GPT-6 models in chat, subscriptions only in tasks (#4181) * fix(sandbox): release retained command memory and bound stdin (#4185) Release completed command payloads, disconnected HTTP consumers and tunnel listeners at their lifetime boundaries. Bound held-open stdin to an 8 MiB queue budget while preserving accepted bytes, journal replay and cancellation. Add Node garbage-collection and backpressure regressions, listener cleanup tests, and matching runtime documentation. * docs(manual): qualify database-unavailable reporting expectations (#4180) The manual's DATABASE_UNAVAILABLE row read as if nothing reaches Sentry for a whole database outage. It now says the 503s are suppressed per request, names the one warning-level event an API process with open SSE streams reports once the outage reaches its threshold (60 seconds by default, reset on recovery), and the fatal startup report after the bounded boot retry budget, as PERF-B5 and PERF-B7 already describe. Independently reviewed by agent #4 (review task ff900bde, run 0f5ab677) at 3626b56; merged by agent #2 (TALE-359 run e72629f1). Closes #4044
Contributor
Author
|
Post-merge independent review of #4185 at
LOW
INFO
Verified correct
Routing: the LOWs go to the manager as follow-ups. Nothing here needs a revert. |
This was referenced Oct 4, 2026
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
A busy sandbox could keep completed commands' request payloads, HTTP consumers and diagnostic buffers alive while another command or background process remained active. Held-open stdin also queued every write when the child stopped reading. Release those references at their actual lifetime boundaries and refuse a whole stdin line before the 8 MiB queue budget is exceeded. Accepted data, disk-journal replay, cancellation and process ownership remain intact.
Also detach device tunnel abort listeners on every terminal path and cancel an upload when OPEN fails before its reader starts. Runnerd releases parsed body buffers and disconnected request/response objects; its detach signal uses an explicit reason because Node's default abort exception stack itself retained the response. Backpressured journal replay releases its in-flight HTTP consumer on disconnect.
Against baseline
952c7ea0, the regression tests reproduce 42 retained completed request/consumer objects, two retained disconnected HTTP objects, and stdin accepted beyond its queue budget. This change makes those objects collect while sibling commands and descendant pipes remain live, and verifies exact accepted stdin delivery and recovery. These are isolated Node reproductions, not production fleet measurements.Checklist
4019cca173b852ffa06efc2c52e65926ac733631: Checks, Build, E2E, SAST and Commitlint. All eight Compose images, smoke testing and runtime/image validation pass.Test plan
main. Existing dependency findings remain. The aggregate Trivy check is neutral because eight historical scan configurations are absent from this PR, with zero check annotations.952c7ea0and pass here. The fourth test disconnects an actual Node HTTP replay consumer while it awaits drain, proves its request/response collect, then successfully reconnects and cancels the still-running command.4019cca173b852ffa06efc2c52e65926ac733631, based on952c7ea0d8ff2f297dd50902be1827c57506251e.Deploy updated runtime and spawner images; existing runnerd processes need replacement through normal session lifecycle before they use the new code. No workspace deletion or database migration.