Repository navigation
Conversation
Contact Center paging now honours endpoints that page with `size`, report totals in `pageInfo`, or return a bare array (the flow store, functions). Other areas follow Link rel="next" headers on the same host, fall back to the endpoint's own offset parameter (start, offset, or SCIM startIndex), and stop if a page repeats. The generator only emits the --paginate branch for GETs that declare paging parameters or are list commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UtLeQHRwiKpRw7YnQ3KoEt
edumansky
commented
Oct 10, 2026
edumansky
left a comment
Contributor
Author
There was a problem hiding this comment.
Codex review (gpt-6-astra, reasoning effort: high)
No actionable regressions were identified in the pagination changes or regenerated commands. All Go tests, go vet, and the 28 Python code-generation tests passed.
Contributor
Author
Codex review summaryCodex ( As part of its review, Codex ran:
No test failures, environmental or otherwise. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--paginatehad three failures:cc flow listcrashed or stopped early. The flow store pages withsize(notpageSize), returns a bare array unlessincludePagination=true, and reports totals inpageInfo(notmeta). Without--include-pagination trueit failed withcannot unmarshal array. With it, it fetched only page 0 at the default size of 10.cc functions listandcc flow searchhad the same problem.Linkheader looped forever. Examples arerooms,memberships,people,meetingsandrecordings. The non-CC paginator sentstart, which these endpoints ignore, so it got the same first page again and again. In testing,messaging rooms list --paginatemade dozens of requests for the same 100 rooms.--paginatebranch.cc skill get --paginateprintednull.admin people get-my-own --paginateprinted one of the person's arrays instead of the person.Changes
internal/clientreq.PageSizeParam, reads totals frommetaorpageInfo, treats a bare array as one complete page, and prints a non-list response unchanged.Link: rel="next"when present, and only to the same host as the base URL. Otherwise it advances the endpoint's own offset parameter, set byreq.OffsetPaging:start/max,offset/max, or 1-based SCIMstartIndex/count. It stops when a page repeats the previous page's first item.client.Donow exposes response headers internally so the paginator can readLink.codegen/generate_cli.pyemits the--paginatebranch only for GETs that declare paging parameters or arelist…commands, along with the paging hints above. The regeneratedcmd/output drops the branch from about 800 single-object GETs and adds hints to the CCsizeendpoints and 171 non-CC list commands.--paginateflag description in the README and site, and a note in the skill and the CC page.Known limitations
cc tasks get --paginatestill returns at most 100 tasks, because the API reports no page count.list-compliance-eventscommands return one page, because they page with a token in the response body.Validation
go test ./...passes. Newinternal/client/pagination_test.gocovers flow-store paging,Linkfollowing, refusing a link to another host, an endpoint that ignoresstart,start/max, SCIM and CC single objects.python3 -m unittest discover -s codegen -p 'test_*.py'passes. New tests cover which paging hint each kind of endpoint gets.make checkandnpm run buildinsite/pass.--paginate:cc flow listreturned all 11 flows (previously a crash, or 10).messaging rooms listreturned 596 unique rooms in 6 requests; one--max 1000call also returns 596.messaging memberships listreturned 614 across 7 pages.calling numbers get-phone-organdadmin people listmatch their non-paginated counts.cc skill getandadmin people get-my-ownprint the full object.start/max, which the tenant doesn't have, and SCIM.admin scim-2-users searchreturns a 404 on this tenant whether or not this change is applied; it appears to send the base64 org ID where SCIM expects the UUID.🤖 Generated with Claude Code
https://claude.ai/code/session_01UtLeQHRwiKpRw7YnQ3KoEt
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.