Skip to content

--price/--max-tokens/--top/--fail-on-waste accept NaN and negatives #8

Description

@royalpinto007

Problem

--max-tokens abc classifies everything source (NaN defeats ?? and all comparisons are false); --max-tokens -5 flags everything trim.

Where

src/cli.js (Number(val()), no validation) + src/scan.js budget comparisons.

Acceptance

Add failing tests first for --max-tokens abc, --price -3, and --top -1, expecting exit 2 instead of exit 0 with nonsense. Then fix.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions