Repository navigation
microvm tests: stream OpenVMM transcripts to disk as they are read - #588
Closed
Jay (jay23606) wants to merge 4 commits into
Closed
Jay (jay23606) wants to merge 4 commits into
Jay (jay23606) wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup ordering can lose final reader output and skip resource closure when transcript writes fail.
1 open finding
What changed in this PR
Streams consumed OpenVMM output to disk incrementally, improving microVM test diagnostics when runs end before cleanup.
Changes:
- Opens the transcript before starting OpenVMM.
- Writes and flushes each consumed chunk while preserving in-memory output.
- Adds tests for transcript growth, creation failures, and queued cleanup output.
| File | Description |
|---|---|
| scripts/test_microvm_tests.py | Adds three transcript persistence tests. |
| scripts/nvx_tools/openvmm_process.py | Replaces cleanup-time transcript rewrites with incremental writes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 19, 2026 00:07
74fb53b to
7aee64c
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 19, 2026 11:26
7aee64c to
bd17cf2
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 15:11
397ee1b to
2f49022
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 15:40
2f49022 to
eea3b0d
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 17:24
eea3b0d to
7ec9a3b
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 18:46
8bf187f to
606d6e7
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 19:14
606d6e7 to
5f496d3
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 19:36
5f496d3 to
b16b50f
Compare
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 19:56
b16b50f to
f70938d
Compare
Contributor
|
Hello Jay (@jay23606) I would appreciate if you asked your agents to stop automatically rebasing this. The current workflow is preventing me to run your PRs on our CI and thus preventing them to be merged. |
OpenvmmProcess kept the transcript in memory and wrote it only from wait or close, so a run terminated before cleanup left no transcript, or a truncated one, even though output had been read. Open the transcript before OpenVMM starts, append each consumed chunk and flush it, and close the file at wait or close. Bytes are written in the order received, with no prefixes and no duplication at cleanup. An error creating the transcript stops the run before OpenVMM starts. Output still queued at close is written too. The in-memory output and marker search are unchanged. Adds tests for growth while the process runs, a transcript that cannot be created, and output delivered after the last wait. Fixes microsoft#176 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
… release the transcript close drained the reader's queue before the interaction had stopped, so a final chunk queued during shutdown was lost from both output and transcript. A write failure during that drain also skipped closing the interaction and the transcript. Stop the interaction first, then drain, and release the transcript in a finally block. Adds regression tests for output queued during interaction close and for a transcript write failure. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
If InteractiveProcess.close raised, the drain was skipped and chunks still queued were missing from both output and the transcript. Drain in a finally around the interaction shutdown, so the transcript is complete whichever step fails. Adds a regression test with queued output and a failing interaction shutdown. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
_drain_available stopped at the first failed transcript write, so chunks still queued behind it never reached process.output. Keep collecting them in memory and re-raise the first error once the queue is empty. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
Jay (jay23606)
force-pushed
the
feat/stream-openvmm-transcript
branch
from
October 20, 2026 20:11
f70938d to
2634167
Compare
Contributor
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 #176.
Summary
OpenvmmProcesskept the transcript in memory and wrote it only fromwaitorclose. A run that was terminated before cleanup left no transcript, or a truncated one, even though its output had been read.waitandcloseonly close the file. Bytes are written in the order received, with no prefixes and no rewrite at cleanup, so nothing is duplicated.closeis written too.OpenvmmProcessonly.TcpConsolehas no transcript path, and the benchmark helpers inbenchmark.pyare not changed. Those are follow-ups.Test
wait), a transcript that cannot be created (fails before the change), and output delivered after the last wait.BOOT, thenLATEthree seconds later. The transcript containedBOOTwhile the child was still running, and the final transcript matched the output.test_microvm_tests: 193 tests. The dev baseline (190 tests) has the same nine failures and errors in host-loopback, private network ingress and SMP timer tests. They are unrelated to the transcript code and present on untoucheddev.🤖 Generated with Claude Code