Skip to content

fix(cli): state the 100-row server cap in alert/alert-event --limit flag help - #138

Merged
ysyneu merged 2 commits into
feat/ai-srefrom
fix/limit-help-caps
Aug 6, 2026
Merged

fix(cli): state the 100-row server cap in alert/alert-event --limit flag help#138
ysyneu merged 2 commits into
feat/ai-srefrom
fix/limit-help-caps

Conversation

@ysyneu

@ysyneu ysyneu commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The alert list and alert-event list endpoints reject limit > 100 with InvalidParameter: Limit must be 100 or less. incident list already documents the cap in its --limit flag help ("Max results (max 100)"); this mirrors the same wording onto the two alert verbs.

Rationale: the cap is mentioned in alert list's long description, but a reader (human or agent) who greps the Flags section of --help never sees it and only discovers the cap by hitting the 400. The flag-level note makes the first call correct.

Verification: make + go test ./internal/... green; built binary shows --limit int Max results (max 100) for both verbs; make gen-cards produces no card diff (flag usage strings are not embedded in the generated fences).

ysyneu added 2 commits August 6, 2026 02:25
…lag help

The alert list and alert-event list endpoints reject limit > 100 with
InvalidParameter. incident list already documents the cap in its --limit
flag help; mirror the same wording so the Flags section alone is enough
to get the first call right (the long description mentions the cap, but
--help readers who grep Flags never see it).
Same shared page-query validator as alert/alert-event/incident list;
same wording.
@ysyneu

ysyneu commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Extended to insight incidents --limit as well — its endpoint shares the same page-query validator (lte=100), verified in the backend. Other verbs with unstated caps (oncall, incident similar, audit's max-99) are NOT touched here: their caps differ or weren't verified against the backend, so stamping them would be guesswork — separate follow-up if wanted.

@ysyneu
ysyneu merged commit 5316c25 into feat/ai-sre Aug 6, 2026
12 checks passed
@ysyneu
ysyneu deleted the fix/limit-help-caps branch August 6, 2026 09:45
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.

1 participant