Skip to content

[Bug]: Sessions and Cron commands accept negative --limit values #1558

Description

@aaaajanus2016

OpenSquilla version or commit

0.5.4

Area

CLI

Reproduction steps

With more than one session and at least one Cron run:

opensquilla sessions list --limit -1 --json
opensquilla cron runs <job-id-with-run-history> --limit -1 --json

Expected behavior

Reject values below 1 consistently at the CLI/RPC boundary with exit code 2 and, in JSON mode, a structured invalid-parameter error.

Actual behavior

Both commands exit 0 and return records. For sessions, -1 effectively removes or changes the intended limit rather than failing validation.

For comparison, Memory search rejects a negative limit with a structured params.limit must be >= 1 error.

Environment

windows 11

Diagnostic bundle and error reference

No response

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

    bugSomething isn't workinghas-linked-prAn open pull request is linked to this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions