fix: preserve sandbox write payload stdin#43876
Merged
altaywtf merged 2 commits intoopenclaw:mainfrom Mar 12, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR fixes a bug where the sandbox pinned write helper's Python script was consuming
Confidence Score: 5/5
Last reviewed commit: fffcf38 |
fffcf38 to
b4e9422
Compare
b4e9422 to
d438cb8
Compare
d438cb8 to
a10fd4b
Compare
Member
|
Merged via squash.
Thanks @glitch418x! |
lml2468
added a commit
to lml2468/openclaw
that referenced
this pull request
Mar 12, 2026
Defense-in-depth for openclaw#43858: even after the heredoc stdin fix (openclaw#43876), a broken pipe or abort race could still deliver 0 bytes to the Python write helper. Without this guard, run_write atomically replaces the target file with a 0-byte temp file, silently destroying content. Add an os.fstat check after write_stdin_to_fd: when the temp file is empty and the target already exists, raise RuntimeError instead of proceeding with os.replace. Creating new empty files is still allowed. AI-assisted (Claude, fully tested)
2 tasks
GGzili
pushed a commit
to GGzili/moltbot
that referenced
this pull request
Mar 12, 2026
Merged via squash. Prepared head SHA: a10fd4b Co-authored-by: glitch418x <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
8 tasks
steipete
pushed a commit
to BruceMacD/openclaw
that referenced
this pull request
Mar 13, 2026
Merged via squash. Prepared head SHA: a10fd4b Co-authored-by: glitch418x <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Interstellar-code
pushed a commit
to Interstellar-code/operator1
that referenced
this pull request
Mar 16, 2026
Merged via squash. Prepared head SHA: a10fd4b Co-authored-by: glitch418x <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf (cherry picked from commit 8ea79b6)
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
writecould report success while creating a zero-byte file.Change Type
Scope
Linked Issue/PR
User-visible / Behavior Changes
writenow preserves payload bytes instead of creating empty files while reporting success.Security Impact
Repro + Verification
Environment
Steps
writewith a small payload.Expected
Actual
Evidence
Human Verification
./node_modules/.bin/vitest run src/agents/sandbox/fs-bridge-mutation-helper.test.ts src/agents/sandbox/fs-bridge.shell.test.ts src/agents/sandbox/fs-bridge.anchored-ops.test.tsNot verified in this PR branch:
Compatibility / Migration
Failure Recovery
Risks and Mitigations