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

Closed
JordanFableFur wants to merge 1 commit from upstream-pr/334 into main
JordanFableFur commented 2026-11-24 23:34:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JordanFableFur on 2026-11-24T23:34:56Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593600035 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/334). Originally posted by [JordanFableFur](https://github.com/JordanFableFur) on 2026-11-24T23:34:56Z. --- ## 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.
chatgpt-codex-connector[bot commented 2026-11-25 00:10:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T23:35:03Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7147564939 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7147564939). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T23:35:03Z. --- <!-- 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>
kaayzouee commented 2026-11-25 01:12:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by kaayzouee on 2026-11-25T01:11:13Z.


Duplicate of #290?

<!-- greyfinch-sync:fxceless/victory-fork:comment:7149293087 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7149293087). Originally posted by [kaayzouee](https://github.com/kaayzouee) on 2026-11-25T01:11:13Z. --- Duplicate of #290?
upstream-sync closed this pull request 2026-11-25 02:09:26 +00:00
JordanFableFur commented 2026-11-25 02:10:10 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by JordanFableFur on 2026-11-25T01:46:13Z.


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

<!-- greyfinch-sync:fxceless/victory-fork:comment:7149935352 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/334#issuecomment-7149935352). Originally posted by [JordanFableFur](https://github.com/JordanFableFur) on 2026-11-25T01:46:13Z. --- Closing — #290 fixes the same issue (#249) and was opened first. Thanks for flagging.

Pull request closed

Sign in to join this conversation.
No reviewers
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!334
No description provided.