[code-improvement] deduplication: centralize device I/O decoding - #198
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused refactor preserves existing behavior and introduces no unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Centralizes device-I/O result-line recognition and JSON decoding without changing caller-specific validation behavior.
Changes:
- Adds
_decode_device_io_line. - Reuses it for resume detection and summary loading.
| File | Description |
|---|---|
scripts/nvx_tools/benchmark.py |
Deduplicates device-I/O line recognition and decoding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The snapshot-core behavior change is omitted from the declared scope and changed-files description.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing unresolved review comments correctly note that the title and description omit most of the branch’s functional and workflow changes.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
The failures were caused by misconfigured self-hosted runners, so keep runner validation strict. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b

Scope: deduplication
Centralizes NVX device-I/O result-line recognition and JSON decoding in one private helper. Resume detection and summary loading previously duplicated the same prefix check and decode operation; each caller retains its existing validation and error behavior.
Evidence and novelty: the current
devhead had no prepared reproducible CI failure, so run35805063103selected the highest-weight viable category,deduplication(weight 4). All 16 recent closed code-improvement PRs were inspected live; all merged, with noNOT_PLANNED,CHANGES_REQUESTED, or maintainer rejection signal. Open issue and pull-request searches found no device-I/O record-decoding work, and prior history contains no equivalent fingerprint.Changed files:
scripts/nvx_tools/benchmark.pyonly — 12 additions and 7 deletions, 19 total changed lines.Validation (all passed):
python -m unittest scripts.test_nvx_tools.BenchmarkTests.test_device_io_retains_failure_and_resumes_completed_attempts -v(1 test)python -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_microvm_tests.py scripts/test_development_release.py -v(744 tests)python scripts/test_adversarial.py -v(52 tests)python .github/skills/nvx-host-connect/scripts/test_hosts.py -v(4 tests)python -m compileall -q scriptspython -m ruff check scriptspython -m pyright --pythonplatform Linuxpython -m pyright --pythonplatform Windowspython -m ruff format --check scriptsgit diff --checkNo dependency, public API/CLI/ABI, gitlink, or OpenVMM change was made.