Skip to content

fix(sandbox): bound replay consumers and preserve agent output - #4170

Merged
yannickmonney merged 1 commit into
mainfrom
fix/sandbox-memory-recovery
Oct 4, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/sandbox-memory-recovery

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Bound agent parser state and replay consumers, preserve complete terminal answers when a harness omits final text, and harden file staging against timeouts and filesystem replacement. Docker-free sessions now use the intended 4 GiB default even in Docker-enabled deployments; explicit memory overrides still apply to both modes. Provisioning reuses its own verified provider IDs to eliminate a redundant gateway listing.

  • Fail explicitly at parser entry/character budgets and reject malformed base64 before delivering output or advancing replay cursors.
  • Share eight HTTP consumer slots across exec and attach, releasing them on disconnects and errors. Apply one 25-second staging deadline, preserve existing file permissions, and reject FIFO or replaced-path cache probes.
  • Retain complete bounded answer fallbacks independently of the display tail; task runs still require an explicit final report. Isolate process-reaper fixtures so unrelated pending scans cannot invalidate exact counter assertions.

Checklist

  • Format, lint, typecheck and test gates pass in CI. The UI suite executed fresh: 5,247 tests across 570 files, including all 65 cloud-import outcome cases. The local full check encountered an unchanged cold-import timing failure also reproduced on the prior checkout; no UI source or assertions were changed. All 57 local lint/type/unit tasks passed.
  • Opengrep passes in CI; the additional changed-source scan found zero findings across 163 rules.
  • Translations: EN/DE/FR operator reference updated; UI message catalogs are N/A because no UI strings changed.
  • Docs: environment reference, session contract, runtime README and automated coverage registry updated.
  • READMEs: affected sandbox/runtime READMEs updated; root marketing READMEs are N/A.
  • All six CI workflows completed successfully on the final head. Image validation passed 83/83 checks; container smoke passed 29/29 tests. Scan steps and SBOM uploads succeeded; inherited findings are documented below.

Test plan

  • Exact final head 78c50c349a: local Linux daemon 328 passed with one expected root-permission skip; affected sandbox suites 412 passed; affected platform suites 253 passed. Production Node 24 HTTP smoke passed consumer admission/recovery, permission preservation, source reuse and FIFO rejection.
  • Hosted unit execution: platform 81,682 passed (two existing skips), sandbox 889 passed, runtime 327 passed (two existing vision-tool skips). Real Linux subreaper and isolated counter regressions executed successfully.
  • Backend integration: 1,517/1,517 checks across 224/224 required lanes, zero failures or skips.
  • E2E: all 211 executed Playwright tests passed on their first attempts (platform 66, docs 55, web 90), with no retry diagnostics. One unchanged search test remains marked fixme.
  • All five CLI targets, Storybook and documentation container tests passed. Docs production build, prerender checks and EN/DE/FR browser inspection passed locally.
  • Independent adversarial review found no blocking correctness or security regression in this change. All three changed-image scans exactly match their existing baselines (zero added or removed findings: runtime 1,743, platform 1,148, sandbox 401). Image scans retain inherited dependency findings; the runtime image’s 1,743 findings exactly match already-merged fix(sandbox): speed replay and harden session streams #4188 (zero added or removed), including 20 critical and 230 high findings. The flagged Cursor/piscina advisory already existed before this PR. This change modifies no Dockerfile or dependency pins. GitHub’s Trivy summary is neutral because the PR scans fewer image categories than main.
  • Production throughput and peak memory still require representative deployment measurements.

@yannickmonney
yannickmonney force-pushed the fix/sandbox-memory-recovery branch 4 times, most recently from b103b1b to a78f1e8 Compare October 3, 2026 22:52
@yannickmonney yannickmonney changed the title fix(sandbox): bound agent memory and harden session recovery fix(sandbox): bound replay consumers and preserve agent output Oct 3, 2026
@yannickmonney
yannickmonney force-pushed the fix/sandbox-memory-recovery branch 2 times, most recently from 7722b17 to 4e6eb0f Compare October 3, 2026 23:51
@yannickmonney

Copy link
Copy Markdown
Contributor Author

TALE-245 / TALE-359 checkpoint

Already implemented on origin/main dd1cb49: merged PR #4170 (commit 9b7463b) changed boardFilterClause in services/platform/backend/domains/tasks/service.ts. Home still passes reviewerId, but the server now matches a pending task_review approval's recipient: structured user reviewer when present, otherwise legacy requestedFor. It uses the stored designation only when there is no pending review. Pending reviews are scoped by organization, task, pending status and non-workflow approval.

This includes creator-fallback and cleared-reviewer recipients and excludes a stale designated reviewer when the pending review belongs to someone else. No duplicate implementation, branch or PR was created, following the instruction to stop if already done. The shared working clone was left on its existing branch without source edits.

Verification: fetched origin/main; inspected the current Home call, server query and introducing commit; confirmed PR #4170 is merged and issue #3790 remains open. Existing backend/integration-check.ts covers the named-reviewer control. The three requested acceptance scenarios were not executed; no runtime, lint or type checks were run because no code changed. PostgreSQL-backed backend integration and browser acceptance remain unverified in this run; LIGHT scope was respected. No CI reruns.

Workspace reporting returned status unavailable / not_granted for workspace_status, so direct task comments on TALE-245 and TALE-359 could not be sent. This checkpoint is posted on PR #4170 as the authorized fallback. A nonauthor should confirm the three acceptance scenarios and reconcile the still-open issue.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Correction to my TALE-245 checkpoint above: the implementation belongs to PR #4076, merge 19776cf, not this PR. Recorded checks on #4076 pass. The three Home acceptance scenarios remain NOT_RUN in my run; local PostgreSQL/browser execution is awaiting a named heavy permit under the earlier LIGHT restriction. Please disregard my previous attribution to #4170.

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