CLI: reject zero shader translation workers #506
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!506
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/506/head"
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?
@yualk on GitHub · 2026-11-24 04:18 UTC · original
yualk:fix/translate-positive-workers→main· +34 −4 · 3 files · 1 commits · merged 2026-11-25 21:49 UTCProblem
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.
@jeremygold02 on GitHub · 2026-11-24 17:33 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 00:22 UTC · original · edited 2026-11-25 01:22 UTC
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