Skip to content

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

Closed

Description

@jbetala7

Observed problem

On current upstream main (cf50443b63e461a7c0796857f69d572781acab8e), gstack-model-benchmark --timeout-ms is parsed with parseInt, so malformed values are accepted instead of rejected.

Repro:

bun run bin/gstack-model-benchmark --prompt hi --timeout-ms 1abc --dry-run
bun run bin/gstack-model-benchmark --prompt hi --timeout-ms nope --dry-run
bun run bin/gstack-model-benchmark --prompt hi --timeout-ms 0 --dry-run

Current output includes:

timeout_ms: 1
timeout_ms: NaN
timeout_ms: 0

Expected behavior

--timeout-ms should require a positive integer timeout and fail fast for malformed, non-numeric, zero, negative, or decimal values before dry-run or provider execution.

Duplicate searches performed

I checked for existing open issues and PRs using:

  • gstack-model-benchmark --timeout-ms
  • benchmark timeout parseInt malformed --timeout-ms
  • bin/gstack-model-benchmark timeout
  • timeout_ms NaN benchmark

No duplicate issue or canonical open PR covered this behavior. Open PR #1495 also touches bin/gstack-model-benchmark, but it is an additive Ollama provider change and does not validate --timeout-ms.

Candidate fix shape

Add a strict positive-integer parser for --timeout-ms, emit a concise CLI error for invalid values, and cover dry-run behavior in test/benchmark-cli.test.ts.

Activity

  1. jbetala7 commented on May 26, 2026

    @jbetala7
    ContributorAuthor

    Opened PR #1727 with the timeout parser fix and focused CLI regression coverage: #1727

  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej — recommend closing this issue only after #1727 completes its remaining integration check and lands. #1727 fixes the permissive parsing of malformed timeout values and has passed focused checks. Please retain the original attribution and the full timeout-case coverage.

  3. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    gstack-model-benchmark --timeout-ms 1abc --dry-run now fails with --timeout-ms requires a positive integer on current main.

    Fixed in v1.64.0.0 (#2571).
    If you still see this on the latest gstack, please reopen with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions