🪟 feat: Preserve Command Output Heads and Tails - #275
Conversation
B1 head handoffPushed head:
The summary and timeout probes fail on the previous collector; cancellation remains unchanged. The local public native sandbox suite stops at the existing private-storage ownership guard before command execution, and unchanged main reproduces that root-ownership rejection. CI's three full code-package matrix lanes and Linux native-sandbox lane passed this exact head. Existing Independent review was requested for this exact head. The child runner failed to complete and returned no review verdict or finding ledger. This is not a clean review; severity counts and dispositions are unavailable. No GitHub inline review findings were present at the handoff check. A1/A2 PRs are untouched. No deployment, merge, or benchmark improvement is claimed. |
|
@codex review Please review B1 at exact pushed head Scope: bounded head-and-tail native command output, separate stdout/stderr, stderr reservation, inline omission counts, UTF-8/combined-budget enforcement, and unchanged timeout/cancellation/result contracts. A1/A2 and filesystem/search/patch slices are excluded. Local focused collector/protocol/subprocess checks and real-Bash collector probes pass. Public native sandbox tests are blocked before execution by the existing private-storage ancestor guard in this worker; unchanged main reproduces the same root-ownership rejection. Full CI and independent exact-head review run separately. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f11f51d036
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merge current main while preserving Git metadata denies and tolerant edit support. Retain malformed quiet-stream output beside noisy output within the combined byte budget.
|
Updated head: Merged current main without rewriting history. Both sides of the README conflict are retained, including upstream Git-metadata security guidance. Fixed P2 GH-4143658407 with rendered-byte stream allocation and malformed quiet-stream regressions. Focused checks, CI, and an independent review are running for this exact head. Existing A1/A2 PRs are untouched. |
B1 updateHead: Merged current main without rewriting history. Both README sections are retained; upstream Git-metadata protections and tolerant edits are unchanged. GitHub reports the conflict resolved.
Finding ledger: GH-4143658407, P2, quiet malformed output starved by raw-byte allocation, fixed in this head. The new regression fails on the reviewed collector and passes with rendered-byte allocation. Replied to and resolved the thread. No finding was rejected. The four selected public native-command tests remain blocked locally before execution by the existing private-storage ancestor guard ( Not run locally: the complete code-package suite, live SRT confinement tests, service/API builds and Bun suites. Full-file Prettier still reports pre-existing formatting in the native sandbox files and README; new blocks were formatted without unrelated rewrites. There is no code-package lint/import-sort task. A1/A2 PRs are untouched. No merge to main, deployment, or benchmark improvement is claimed. CI at handoff: 10 checks passed; only |
|
Head: Independent review found P2 IR-SUFFIX-1: a partially filled tail dropped a summary whose bytes remained in the head. Fixed in this head. Retained buffers now render as a logical contiguous stream until capture overflows. New boundary/UTF-8 invariants and real-command regressions cover both streams and stream orders; the summary and logical-window tests fail on P2 GH-4143658407 remains fixed in Local build/typecheck, 62 focused tests, nine real-Bash collector probes, 5,000 arbitrary-byte/chunk cases, and scoped formatting pass. Public SRT admission remains subject to the unchanged local storage-ownership blocker. CI and a fresh independent review are running for this exact head. A1/A2 are untouched. |
B1 verificationHead:
Finding ledger:
The audit followed capture, byte allocation, omission counts, sandbox annotations, command settlement, IPC/protocol validation, programmatic consumers, timeout, cancellation, and cleanup. Result keys and security boundaries are unchanged. GitHub reports the PR conflict-free. A1/A2 are untouched. The new public native-command regression is blocked locally before execution by the existing storage ancestor guard ( Not run locally: full code-package suite, live SRT confinement tests, service/API builds or Bun suites. Existing native-sandbox files and README have base-revision full-file Prettier failures; new blocks were formatted without unrelated rewrites. No code-package lint/import-sort task exists. CI: 10 checks passed at this head, including the full Node 20/22/24 code-package matrix, macOS storage checks, and Linux native-sandbox lane. Only Independent review completed for No merge to main, deployment, or benchmark improvement is claimed. |
Summary
Attached native commands currently keep only the first output bytes that reach a shared stdout/stderr budget. Long test runs lose their final summaries, and noisy stdout can consume the entire allowance before an error reaches stderr.
Keep a bounded prefix and rolling suffix for each stream, then fit both into the existing combined
maxOutputByteslimit. Inline[... N bytes omitted ...]markers report dropped raw bytes. Stdout and stderr remain separate; quiet streams donate unused space, while noisy streams split the budget with the odd byte reserved for stderr. Sandbox violation annotations enter stderr before final rendering.This is B1 only. LibreChat A1/A2 remain in #16539 and #16540. No parent creation, read/search changes, edits, model-family selection, or patch execution is included. This does not depend on worker #271.
Mechanism
maxOutputBytes, independent of total output and chunk count. No references to oversized child buffers or per-chunk buffer arrays survive capture.truncatedflag.Verification
Focused checks and exact-head review results are recorded in the head handoff comment.
native-sandbox.test.tssuite is blocked before command execution by the existing private-storage ancestor guard because this worker sandbox's/belongs to uid 65534. Unchangedmainreproduces that failure. The guard was not weakened. Collector-boundary probes do not certify SRT admission or confinement.Not run locally: the complete
packages/codesuite, live SRT confinement tests, service/API builds or Bun suites. Onlypackages/codesource changes. No deployment or benchmark improvement is claimed.