fix(jtk): auto-paginate search/list past Jira's 100-result page cap#182
fix(jtk): auto-paginate search/list past Jira's 100-result page cap#182
Conversation
…181) SearchPage now loops internally when MaxResults exceeds the per-request page size, accumulating results across pages. The --max flag means "max total results" instead of "page size." Removes unused SearchAll method (superseded by SearchPage with MaxResults).
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: f16d18a
Summary
No issues found.
Completed in 47s | $0.19 | sonnet
| Field | Value |
|---|---|
| Model | sonnet |
| Reviewers | hybrid-synthesis, security:code-auditor |
| Reviewed by | pr-review-daemon · monit-pr-reviewer |
| Duration | 47s (Reviewers: 45s · Synthesis: 4s) |
| Cost | $0.19 |
| Tokens | 93.0k in / 2.5k out |
| Turns | 6 |
TDD Coverage AssessmentAll 19 new tests pass and the full suite is green. The coverage is genuinely good for the core pagination loop, but there are a handful of gaps worth noting before merge. What is well covered
Gaps1. Page-size cap in single-page mode is untested
2. When the last page overshoots and we trim, the code sets 3. Starting token with multi-page continuation
4. Empty result set in multi-page mode No test covers 5. Table output with auto-pagination (minor) The two command-layer tests only use VerdictThe core pagination algorithm is well-tested — the loop, stopping condition, trim, and error paths are all covered. The gaps above are real but they are on edge cases and post-trim semantics rather than the main contract. The change is safe to merge as-is. If you want to close the gaps, priority order would be: (2) → (3) → (1) → (4) → (5). |
Catches up documentation for recent features and fixes: - README: document --fields flag, auto-pagination, fields command group, users get subcommand, --assignee none, multi-value --field, and escape sequences in comment --body - CHANGELOG: add entries for PRs #178, #180, #182, #186-189 - integration-tests: add test cases for auto-pagination, --fields, users get, --assignee none, multi-value --field, and escape sequences Closes #183
#190) Catches up documentation for recent features and fixes: - README: document --fields flag, auto-pagination, fields command group, users get subcommand, --assignee none, multi-value --field, and escape sequences in comment --body - CHANGELOG: add entries for PRs #178, #180, #182, #186-189 - integration-tests: add test cases for auto-pagination, --fields, users get, --assignee none, multi-value --field, and escape sequences Closes #183
Closes #181
Summary
SearchPagenow auto-paginates whenMaxResultsexceeds the per-request page size, looping internally with cursor-based tokens--maxflag semantics change from "page size" to "max total results" (non-breaking: values ≤ 100 behave identically)min(maxResults, 100)for efficient fetching--next-page-tokenstill works as a starting point for the pagination loopTotalfield inPaginationInforeports actual result count in JSON outputSearchAllmethod (superseded bySearchPagewithMaxResults)Test plan
jtk issues search --jql '...' -o json --max 200 | jq '.issues | length'