Skip to content

fix(benchmark): validate timeout flag - #1727

Closed
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1726-benchmark-timeout
Closed

jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1726-benchmark-timeout

Conversation

@jbetala7

Copy link
Copy Markdown
Contributor

Summary

  • reject malformed, non-numeric, zero, negative, decimal, or missing --timeout-ms values before benchmark dry-run/provider execution
  • keep valid positive integer timeout values working, including plus-prefixed values
  • add focused CLI regression coverage for the timeout parser

Fixes #1726

Validation

  • bun test test/benchmark-cli.test.ts
  • direct CLI proof: invalid --timeout-ms values 1abc, nope, 0, -1, 1.5, and empty all exit 1 with --timeout-ms requires a positive integer
  • direct CLI proof: --timeout-ms +2500 --dry-run reports timeout_ms: 2500
  • git diff --check
  • git merge-tree --write-tree HEAD origin/main

Collision check

Before publishing, I searched open issues/PRs for gstack-model-benchmark --timeout-ms, malformed benchmark timeout parsing, timeout_ms NaN, issue #1726, and open PRs touching bin/gstack-model-benchmark / test/benchmark-cli.test.ts. No canonical PR covers this timeout validation bug. Open PR #1495 touches the same CLI for an additive Ollama provider and does not validate --timeout-ms.

@time-attack

Copy link
Copy Markdown
Contributor

@16francej — recommend merging this PR. Focused behavior tests and the build passed, and the change rejects invalid timeout values while preserving valid positive integers and the default.

@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @jbetala7. The fix is now on main: bin/gstack-model-benchmark validates --timeout-ms with parsePositiveIntegerFlag (already on main as of v1.91.16.0). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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.

gstack-model-benchmark accepts malformed --timeout-ms values

2 participants