Repository navigation
fix(fs): admit standard-stream capture before growth - #2723
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 61b89d0 | Commit Preview URL Branch Preview URL |
Oct 14 2026, 04:28 AM |
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.
What changed
Standard-stream file operands reserve retained capacity before writes and collection. Capture obeys configured stdout/stderr ceilings, shares the request live-memory/work budget, and checks cancellation/deadlines on each write or append. Byte/text leases survive collection, redirects and result hooks. Wrapper-owned stdin/read-copy storage and stream-copy temporary reads also receive admission; ordinary filesystem operations still delegate. Resolved copy sources use POSIX VFS spelling and root-aware absolute symlink targets on every host; the existing Windows job checks zero admission before direct/aliased device reads.
Why
Intercepted stream writes bypass filesystem quotas. Output truncation after builtin completion cannot protect the preceding allocations.
Before / After
Before: two ordinary two-byte admission configurations returned success despite zero stderr admission or a three-byte combined stdout ceiling. Both failing-first assertions exited 101 on the original source.
After: both return a resource-limit error before discarded redirects. All 45 targeted fixtures pass: capture ownership/capacity, work/cancellation, stdin/copy admission, fd/append/redirect compatibility, byte transport and static threat-ledger checks. Real Bash comparison preserves stdout
hihihi, stderrhihi, and exit 0 for a two-byte alias/append fixture; the real CLI produces the same bytes.Validation
-D warningscargo vet --locked;cargo deny check licenses sourcessingle_echoCriterion benchmarkRisk
Medium. Stream operands exceeding configured capture ceilings now fail before redirects, including redirects that discard output. Plain filesystem stdin reads cannot carry leases, so the wrapper conservatively retains copy charges until it drops. Temporary backend read admission relies on metadata correctness plus canonical device read ceilings.
Checklist