Skip to content

fix: validate upload S3 worker count - #1694

Merged
neuromechanist merged 3 commits into
feature/issue-1671-epic-bru-upload-fixesfrom
patch/issue-1455-upload-jobs-validation
Oct 9, 2026
Merged

neuromechanist merged 3 commits into
feature/issue-1671-epic-bru-upload-fixesfrom
patch/issue-1455-upload-jobs-validation

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The upload command now rejects malformed, non-decimal, non-positive, and unsafe --jobs values before authentication or upload setup. Previously, a value such as 4workers was parsed later with parseInt, allowing setup to start before invalid concurrency reached the S3 copy stage.

Validation:

  • bun test test/cli.test.ts -t 'invalid S3 copy worker count' (3 isolated CLI cases pass; each validation boundary was mutation-checked, including moving the guard below authentication)
  • bun run lint
  • bun run typecheck
  • ./node_modules/.bin/biome format test/cli.test.ts
  • git diff --check

Refs #1455 and #1671. This is CLI validation only; #1455 remains open for authenticated full-upload and NFS final-save acceptance.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1694

Version: 0.10.16-PR1694.2eace76
Commit: 2eace76


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Pre-merge review for exact PR head 2eace76261b72f7f895ee2130f4687759e7c6389 against epic base 7a6a512c8e5ea10e9b7f7d8758c495c34f6c5f7f.

The contract/code/type and maintainability reviewers found no actionable issues. The tests/errors reviewer found that the before-authentication tests inherited the developer's NEMAR config. I accepted and fixed that finding by giving each invalid-value case a fresh empty NEMAR_CONFIG_DIR. Mutation verification moved the --jobs guard below requireAuth; the isolated CLI test then failed with Not authenticated instead of the validation error, confirming the ordering assertion catches the regression. Malformed, zero, and unsafe-integer values are each covered.

Local checks: bun test test/cli.test.ts -t 'invalid S3 copy worker count' (3 passed), bun run lint, bun run typecheck, ./node_modules/.bin/biome format test/cli.test.ts, and git diff --check passed. The exact-head GitHub run is 37964143756; at the time of this review record, core tests were still running. The real authenticated upload and NFS final-save acceptance gap remains open under #1455.

@neuromechanist
neuromechanist merged commit 5cbcc04 into feature/issue-1671-epic-bru-upload-fixes Oct 9, 2026
14 checks passed
@neuromechanist
neuromechanist deleted the patch/issue-1455-upload-jobs-validation branch October 9, 2026 17:24

This branch was previously deployed

1 inactive deployment
npm — 2eace762 Deployed Oct 9, 2026 by neuromechanist via publish #3310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant