fix(runtime): route late writes around closed capture buffers - #130
Open
furgalep wants to merge 1 commit into
Open
fix(runtime): route late writes around closed capture buffers#130furgalep wants to merge 1 commit into
furgalep wants to merge 1 commit into
Conversation
furgalep
force-pushed
the
fix/runtime-closed-capture-buffer
branch
from
August 12, 2026 21:11
77e9370 to
5cb918a
Compare
Signed-off-by: Paul Furgale <pfurgale@nvidia.com>
furgalep
force-pushed
the
fix/runtime-closed-capture-buffer
branch
from
August 19, 2026 06:31
5cb918a to
f001236
Compare
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
write,writelines, andflushbehavior for stale closed buffersValueErrorbehavior for buffers that are not actually closedWhy
Background tasks inherit context variables and may outlive the execution capture that installed a
StringIO. Late logging or exception reporting then writes to a closed buffer and can mask the original failure. This routes only stale, actually-closed buffers to the process stream.Verification
uv run ruff check src/nooa/runtime/stream_wrappers.py tests/runtime/test_stream_wrappers.pyuv run ruff format --check src/nooa/runtime/stream_wrappers.py tests/runtime/test_stream_wrappers.pyuv run pytest -q tests/runtime/test_stream_wrappers.py(49 passed)