nvx-rs: replace the golden CLI scenarios with structured scenario tests
I maintainer di solito rispondono entro 1 giorno
@ppenna ci sta già lavorando.
Dal 23/10/2026.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- cli, testing-qa
Direzione di ricerca
Start with tests/cli.rs, tests/fixtures/cli.json, and the replay in nvx_rs_reproduces_the_recorded_scenarios; inspect the shared setup and scenario records before designing the harness under tests/cli/. Map all 281 scenarios and listed regressions to the requested tests, then run the Linux and Windows suites and the specified mutation checks. Done means every scenario is covered and the behavior preserving pull request passes its gate; retirement is a later pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Replace tests/fixtures/cli.json and its replay, nvx_rs_reproduces_the_recorded_scenarios in tests/cli.rs, with scenario tests that check what callers rely on: exit statuses, error codes and stable fragments, the state directory and its parsed JSON files, file modes, and the arguments that OpenVMM receives, rather than transcripts recorded from Python.
Background
cli.jsonholds 141 POSIX and 140 Windows scenarios, in 426 steps, recorded fromnvx.py sandbox,egress compile, andartifacts, withnvx-fake-openvmmas OpenVMM. Each step compares the exit status, standard output and error, and state files byte for byte, after replacing the root, process IDs, and random identifiers with placeholders.- On Windows, only the replay reaches 533 lines and 130 branches, mostly in
src/host/cli/sandbox/andsrc/testing/fake_openvmm.rs, and all ofegress compile. nvx.py sandboxpasses the streams and status ofnvx-rsthrough, and the hypervisor suites match message fragments and parseruntime.jsonand outcome reports.
Tasks
Replacement tests, in a pull request that doesn't change behavior:
- A harness in
tests/cli/that reuses the root and fake-OpenVMM setup oftests/cli.rs, and checks exit statuses, error codes (#724) or stable fragments, the entries of the state directory, its parsed JSON files, POSIX file modes, and the arguments that the fake OpenVMM received. - Table-driven tests:
usage_errors_exit_2_and_name_the_optionvalidation_errors_exit_1_before_any_side_effect: the state directory is unchanged, and OpenVMM didn't run.dry_runs_print_the_openvmm_command_and_launch_nothing: the>>line, split into arguments, holds the sandbox blocks, workload identity, shares, egress rules, and kernel command line.one_shot_runs_exit_with_the_workload_or_openvmm_status: statuses such as 0, 3, 7, 124, 127, and 137, the workload's output byte for byte, and the schema of the outcome report.lifecycles_of_every_configuration: the state after each ofprovision,start,exec,stop, anddeprovision.refusals_of_lifecycle_operationsconfigurations_of_every_format_start_and_exec, from hand-writtenconfig.jsonfiles of formats 1 to 6 intests/fixtures/state/.egress_compile_prints_the_library_loweringartifacts_list_every_guest_in_order- A property that the
>>line splits back into the arguments, withCommandLineToArgvWon Windows and a shell-word splitter on POSIX.
- A temporary table that maps each of the 281 scenarios, and the regressions of #369, #373, #464, and #513, to tests, and a test that fails on a scenario that maps to none.
- Keep the other tests of
tests/cli.rs, including the Ctrl-C tests.
Retirement, in the next pull request:
- Delete
cli.json, the replay and its normalization helpers, and the mapping test. - Write only the newest
config.jsonformat, and keep reading formats 1 to 6. Drop the README's promise that an oldernvx.pycan operate a sandbox thatnvx-rsprovisioned. - Docs: replace the README's "Golden scenarios" section, and update its Testing section and
doc/project-structure.md.
Gate
- The lines and branches that only the replay reaches, on Windows and Linux (#726), are reached by the new tests or deleted.
-
cargo mutantsonsrc/host/cli/sandbox/mod.rs,lifecycle.rs, andstate.rsmisses no mutant with the new tests that the replay catches. - Every scenario maps to a test.
Coordination
nvx-rs run(#638) gets its scenarios as tests of this harness, not as records from Python.- Until
cli.jsonis deleted, changes such as those of #620 and #622 may edit its records by hand, but add no recorded scenarios.
Acceptance criteria
-
cli.jsonis gone, and the scenario tests pass on Linux and Windows.
- Lingua principale
- Python
- Stelle
- 408
- Fork
- 28
- Merge medio
- 16h 20m
- PR unite (30g)
- 355
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/nvx
-
Track nvx-rs host VMM supervisor bugs: a non-UTF-8 process name at a reused PID blocks reconcile, reattach, and stopForse già presa @56steve l’ha presa 1 giorno fa. Apertabug-hunt confirmed good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/nvx#720 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 24/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/nvx
Issue simili
-
[Resource]: LoreApertaresource-submission validation-passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
hesreallyhim/awesome-claude-code#3234 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openminion/openminion#376 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: ☹︎ Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
posit-dev/great-tables#1028 ·
I maintainer di solito rispondono entro 1 giorno
-
integration: apple_tv
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
home-assistant/core#188282 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"ApertaP4: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
jeffknupp/association#538 ·