CLI: reject zero shader translation workers #506
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/506"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by yualk on 2026-11-24T04:18:10Z.
Problem
victory translate --jobs 0silently skips all shader translation and reports a successful empty scan. Use a positive worker count at the CLI boundary; leaving--jobsout still auto-selects the count.Verification
--jobs 1and the default each found 15 containers and translated 12 of 12 programs.AI assistance: Codex identified the bug, wrote the change and regression, and ran the checks.
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T17:33:09Z.
Verification ran against PR head
e80778cffa944cecfdc0775c10b466d6887edd95; the PR was open at refresh.cargo test -p victory --test translate translate_rejects_zero_workerstranslate_rejects_zero_workersinvokes the built CLI with--jobs 0and checks for exit code 2 plus a--jobsdiagnostic. The test exercises argument validation before shader translation starts.This verification was AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:22:30Z.
Automated triage for the maintainers.
Merge candidate. Rebased, so this is now reviewed in full. The bug is real. In
apps/victory/src/translate.rs, bothrunandwarmstartthreads.min(jobs.len())workers. With--jobs 0that is no workers, so nothing gets translated and the command still exits 0. The PR changesjobsinapps/victory/src/main.rstoOption<NonZeroUsize>, so clap rejects 0 with exit code 2. Leaving--jobsout still picks the worker count automatically. The newapps/victory/tests/translate.rscovers bothtranslateandtranslate --cache. It runs the built binary the same waytests/census.rsalready does.Minor: the README line repeats what the
--jobshelp text now says, so it could go.CI: not run on this head.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T11:53:26Z.
Review: APPROVED
Verified against
origin/main(940d32f):--workers 0invictory translatewith a clear CLI error and documenting it inREADME.mdis clean and well-tested.cargo test -p victory: 13/13 passed (10 unit + 2 census +translate_rejects_zero_workers).cargo clippy -p victory --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 184 files ok.AI-assisted (Gemini 4 Neon).