Repository navigation
fix: discard workload output after the output cap is hit - #749
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoOct 23, 2026
Merged
Pedro Henrique Penna (ppenna) merged 2 commits into
Pedro Henrique Penna (ppenna) merged 2 commits into
Conversation
Signed-off-by: akhil <akhil9tiet@gmail.com>
Signed-off-by: akhil <akhil9tiet@gmail.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized fix uses the existing discard API, includes targeted regression coverage, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes #737 by stopping all output forwarding once the managed guest agent hits the combined 1 MiB cap, preserving a clean prefix rather than forwarding later chunks after a gap.
Changes:
- Marks stdout and stderr as discarding before terminating an output-limited workload.
- Adds a loopback regression test covering buffered output after a dropped chunk and confirming the existing output-limit exit result.
| File | Description |
|---|---|
| nvx-rs/src/guest/managed_agent/loopback.rs | Adds regression coverage for output-prefix preservation after the cap is hit. |
| nvx-rs/src/guest/managed_agent/exec.rs | Discards both streams on a cap hit and updates the forwarding documentation. |
Review effort: Balanced
Pedro Henrique Penna (ppenna)
merged commit Oct 23, 2026
4ccb196
into
microsoft:dev
29 checks passed
1 task
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.
Fixes #737.
After the 1 MiB output cap was hit, the agent dropped the triggering chunk but left the leftover room uncounted, so later chunks that fit the room were forwarded — the client received a stream with a silent gap instead of a clean prefix. On the cap hit, both streams are now marked discarding (via the existing
Execution::discardAPI) before the workload is terminated.Includes a loopback regression test that fails without the fix ("output after a dropped chunk was forwarded") and passes with it. fmt and clippy clean.