CLI: translate --jobs 0 accepts the input and reports zero containers #249

Open
opened 2026-11-24 23:00:02 +00:00 by Bennet0k · 0 comments
Bennet0k commented 2026-11-24 23:00:02 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by Bennet0k on 2026-11-24T23:00:02Z.


Source · Source

The argument type accepts zero and the code uses it directly as the worker count. For victory translate --jobs 0 <file-with-a-shader>, the per-file worker range is empty even when shader sources were found, so the command reaches the summary with zero work instead of reporting invalid input. Verified from the argument and worker code. The Windows CLI was not run for this check.

Proposed fix. Parse the option as NonZeroUsize or reject zero before scanning. Test that zero exits with an argument error and one processes a synthetic shader fixture.

Found in an AI-assisted audit of 2119b0e.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593127141 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/249). Originally posted by [Bennet0k](https://github.com/Bennet0k) on 2026-11-24T23:00:02Z. --- [Source](https://github.com/fxceless/victory-fork/blob/2119b0e44c53aa9648307b0c5c73590290305b1f/apps/victory/src/main.rs#L80-L86) · [Source](https://github.com/fxceless/victory-fork/blob/2119b0e44c53aa9648307b0c5c73590290305b1f/apps/victory/src/translate.rs#L187-L223) The argument type accepts zero and the code uses it directly as the worker count. For `victory translate --jobs 0 <file-with-a-shader>`, the per-file worker range is empty even when shader sources were found, so the command reaches the summary with zero work instead of reporting invalid input. Verified from the argument and worker code. The Windows CLI was not run for this check. **Proposed fix.** Parse the option as `NonZeroUsize` or reject zero before scanning. Test that zero exits with an argument error and one processes a synthetic shader fixture. Found in an AI-assisted audit of `2119b0e`.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork#249
No description provided.