Skip to content

[code-improvement] deduplication: centralize device I/O decoding - #198

Merged
Pedro Henrique Penna (ppenna) merged 6 commits into
devfrom
code-improvement/dedupe-device-io-decoding-35805063103-4bc9780e36a19dc1
Sep 23, 2026
Merged

Pedro Henrique Penna (ppenna) merged 6 commits into
devfrom
code-improvement/dedupe-device-io-decoding-35805063103-4bc9780e36a19dc1

Conversation

@ppenna

Copy link
Copy Markdown
Contributor

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 dev head had no prepared reproducible CI failure, so run 35805063103 selected the highest-weight viable category, deduplication (weight 4). All 16 recent closed code-improvement PRs were inspected live; all merged, with no NOT_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.py only — 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 scripts
  • python -m ruff check scripts
  • python -m pyright --pythonplatform Linux
  • python -m pyright --pythonplatform Windows
  • python -m ruff format --check scripts
  • NVX CLI help smokes for the root command, OpenVMM unit/VMM tests, microVM tests, adversarial tests, and benchmarks
  • git diff --check

No dependency, public API/CLI/ABI, gitlink, or OpenVMM change was made.

Generated by code-improvement · copilot · gpt56 · 78.9 AIC · ⌖ 23 AIC · ⊞ 15.9K ·

  • expires on Oct 7, 2026, 1:22 AM UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 23, 2026 01:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ppenna
Pedro Henrique Penna (ppenna) marked this pull request as ready for review September 23, 2026 03:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused refactor preserves existing behavior and is adequately validated.

Review effort: Balanced
Findings: None

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
Copilot AI review requested due to automatic review settings September 23, 2026 04:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (1)

Comment thread scripts/nvx_tools/microvm_tests.py
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
Copilot AI review requested due to automatic review settings September 23, 2026 04:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The title and description do not disclose most of the current branch’s functional and workflow changes.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

Comment thread .github/actions/validate-runner/action.yml Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3da0fce3-541b-42cb-a187-ffc1e0bcf73b
Copilot AI review requested due to automatic review settings September 23, 2026 05:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (2)

@ppenna
Pedro Henrique Penna (ppenna) marked this pull request as draft September 23, 2026 12:24
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
Copilot AI review requested due to automatic review settings September 23, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The snapshot behavior changes contradict the stated single-file deduplication scope and must be removed, split, or documented.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

@ppenna
Pedro Henrique Penna (ppenna) marked this pull request as ready for review September 23, 2026 12:34
@ppenna
Pedro Henrique Penna (ppenna) merged commit e05d05f into dev Sep 23, 2026
42 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the code-improvement/dedupe-device-io-decoding-35805063103-4bc9780e36a19dc1 branch September 23, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants