[code-improvement] code-quality: reject boolean release asset sizes - #212
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoSep 27, 2026
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Pedro Henrique Penna (ppenna)
September 24, 2026 03:55
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The selector still accepts booleans as integers, causing the new regression test to fail.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds regression coverage intended to reject boolean release asset sizes, but the selector implementation remains unchanged.
Changes:
- Adds a malformed boolean-sized asset before a valid asset in the release-selection test.
| File | Description |
|---|---|
scripts/test_nvx_tools.py |
Adds boolean-size regression coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| { | ||
| "name": "nvx-invalid-linux-kvm.tar.gz", | ||
| "url": "https://api.example.invalid/invalid", | ||
| "size": True, |
Contributor
There was a problem hiding this comment.
Fixed in cbfdc7f by explicitly rejecting boolean asset sizes in _latest_release_asset().
Pedro Henrique Penna (ppenna)
marked this pull request as ready for review
September 26, 2026 19:13
Copilot started work on behalf of
Pedro Henrique Penna (ppenna)
September 26, 2026 19:13
View session
Co-authored-by: ppenna <4939789+ppenna@users.noreply.github.com>
Copilot started reviewing on behalf of
Pedro Henrique Penna (ppenna)
September 26, 2026 19:15
View session
Pedro Henrique Penna (ppenna)
deleted the
code-improvement/reject-boolean-release-size-4c486570badff582
branch
September 27, 2026 04:29
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.

Scope: code-quality
Release discovery accepted a JSON boolean for an asset's
sizebecause Pythonbooleans are integers. That malformed metadata could select the wrong asset and
turn
trueinto an expected one-byte download. The selector now rejects booleansizes, matching the existing development-release metadata validation.
This is not tracked by an open issue or pull request. The 20 recent
code-improvement pull requests were merged without negative maintainer feedback,
and none proposed this release-asset validation.
Changes
scripts/nvx_tools/release.py: reject boolean release-asset sizes.scripts/test_nvx_tools.py: cover skipping malformed metadata before a validmatching asset.
Total patch size: 6 added lines, 0 deleted lines across 2 files.
Validation
All commands passed:
python3 -m unittest scripts.test_nvx_tools.ReleaseTests.test_selects_latest_matching_prerelease_asset -vpython3 -m compileall -q scriptspython3 -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_microvm_tests.py scripts/test_development_release.py -qpython3 scripts/test_adversarial.py -qpython3 .github/skills/nvx-host-connect/scripts/test_hosts.py -qpython3 scripts/nvx.py --helppython3 scripts/nvx.py test-openvmm-unit --helppython3 scripts/nvx.py test-openvmm --helppython3 scripts/nvx.py test-microvm --helppython3 scripts/nvx.py test-adversarial --helppython3 scripts/nvx.py benchmark --helppython3 -m ruff check scriptspython3 -m pyright --pythonplatform Linuxpython3 -m pyright --pythonplatform Windowspython3 -m ruff format --check scriptsgit diff --checkNo dependency, public API/CLI/ABI, gitlink, or OpenVMM change was made.