translate: --jobs 0 is an argument error #334

Closed
github-bot wants to merge 1 commit from gh-pr/334/head into gh-pr/334/base
Owner

@⁠JordanFableFur on GitHub · 2026-11-24 23:34 UTC · original
JordanFableFur:fix/translate-jobs-zero → main · +8 −2 · 1 files · 1 commits · closed without merging

What

--jobs parsed into usize and the per-file worker count came from it directly, so victory translate --jobs 0 <file> spawned zero workers and reported zero containers instead of refusing the input.

The option is now Option<NonZeroUsize>: clap exits with an argument error for zero, and the default (every logical core) is unchanged. translate::run still takes Option<usize> (NonZeroUsize::get at the call), so nothing else moves.

Fixes #249.

Testing

cargo check --all-targets and clippy -D warnings cross-checked for the Windows target (clean). The rejection happens in clap before run is reached, which is where the issue asks it to happen.

AI use: written with Codex and Claude Code (GPT-5.2 Codex); reviewed and posted with my approval. No game files were used.

**@⁠JordanFableFur** on GitHub · 2026-11-24 23:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/334) `JordanFableFur:fix/translate-jobs-zero` → `main` · +8 −2 · 1 files · 1 commits · closed without merging ## What `--jobs` parsed into `usize` and the per-file worker count came from it directly, so `victory translate --jobs 0 <file>` spawned zero workers and reported zero containers instead of refusing the input. The option is now `Option<NonZeroUsize>`: clap exits with an argument error for zero, and the default (every logical core) is unchanged. `translate::run` still takes `Option<usize>` (`NonZeroUsize::get` at the call), so nothing else moves. Fixes #249. ## Testing `cargo check --all-targets` and clippy `-D warnings` cross-checked for the Windows target (clean). The rejection happens in clap before `run` is reached, which is where the issue asks it to happen. **AI use:** written with Codex and Claude Code (GPT-5.2 Codex); reviewed and posted with my approval. No game files were used.
The option parsed into usize and the worker range came from it directly,
so --jobs 0 ran the batch with zero workers and reported zero containers
instead of refusing the input. It is now NonZeroUsize: clap exits with
an argument error, and the default (every logical core) is unchanged.

AI use: written with Codex and Claude Code (GPT-5.2 Codex); reviewed and
posted with my approval. No game files were used.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:40:58 +00:00
github-bot closed this pull request 2026-11-26 03:40:58 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:35 UTC · original · edited 2026-11-24 23:37 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T23:37:26.964535Z 924283e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:35 UTC · [original](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7147564939) · edited 2026-11-24 23:37 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"924283ea9440338f04f8e939d63f51b3ff1bcd52","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T23:37:26.964535Z">2026-11-24T23:37:26.964535Z</relative-time> | `924283e` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠kaayzouee on GitHub · 2026-11-25 01:11 UTC · original

Duplicate of #290?

**@⁠kaayzouee** on GitHub · 2026-11-25 01:11 UTC · [original](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7149293087) Duplicate of #290?
Author
Owner

@⁠JordanFableFur on GitHub · 2026-11-25 01:46 UTC · original

Closing — #290 fixes the same issue (#249) and was opened first. Thanks for flagging.

**@⁠JordanFableFur** on GitHub · 2026-11-25 01:46 UTC · [original](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7149935352) Closing — #290 fixes the same issue (#249) and was opened first. Thanks for flagging.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.