Skip to content

eval:list accepts malformed --limit values and can hide all runs #1683

Closed

Description

@jbetala7

Observed problem

bun run eval:list -- --limit <value> parses the limit with parseInt and never validates the full token. That means malformed values are accepted or produce confusing successful output.

Current behavior on upstream main

On current origin/main (920a13a1), with two eval JSON files in the eval directory:

HOME=/tmp/repro bun run scripts/eval-list.ts --limit 1abc

prints one row and exits successfully because parseInt("1abc", 10) becomes 1.

HOME=/tmp/repro bun run scripts/eval-list.ts --limit nope

also exits successfully, but runs.slice(0, NaN) shows zero rows even though the footer reports two total runs.

Expected behavior

--limit should require a positive integer token. Invalid, zero, negative, decimal, or suffixed values should fail with a clear error instead of silently changing the displayed history.

Duplicate searches performed

I searched open issues and PRs for:

  • eval list limit
  • eval-list
  • eval:list --limit
  • scripts/eval-list.ts

I did not find an open issue or canonical PR for this behavior. The nearest historical hits are broad eval infrastructure PRs, not a fix for eval:list --limit validation.

Candidate fix shape

Add strict positive-integer parsing for scripts/eval-list.ts --limit, print a concise stderr error for invalid values, exit non-zero, and add focused regression coverage for malformed and valid limits.

Activity

  1. jbetala7 commented on May 24, 2026

    @jbetala7
    ContributorAuthor

    Opened #1684 with a strict eval:list --limit parser and focused regression coverage.

  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej Please close this issue as resolved. eval:list now accepts only a complete positive safe integer for --limit, so malformed, zero, or unsafe values cannot silently hide runs. This shipped in #2264.

  3. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    bun run scripts/eval-list.ts --limit 1abc and --limit nope now both exit 1 with eval:list: --limit requires a positive integer on current main.

    Fixed by #2264 (on main since v1.60.1.0).
    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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions