Context
The org/repo hierarchy listing added in #5434 bounds each pagination loop to 20 pages as a backstop against an unbounded loop. When that cap is hit, the result is silently truncated with no signal a caller could use to detect incomplete results. The cap only trips well beyond any realistic single hierarchy (2000 repos for Azure per project and GitLab; 20 pages of orgs/groups), and there are no consumers of these APIs yet, so this is deferred follow-up rather than a blocker for #5434.
Affected sites
packages/plus/integrations/src/providers/azureDevOps.ts (getProviderRepositoriesForOrg, no-project per-project fan-out)
packages/plus/integrations/src/providers/gitlab.ts (getProviderRepositoriesForOrg, exhaust + namespace filter)
packages/plus/integrations/src/providers/providersApi.ts (getGithubOrgsForCurrentUser)
packages/plus/integrations/src/providers/providersApi.ts (getGitlabGroupsForCurrentUser)
Why it's not a trivial flag
A caller-detectable truncation signal only makes sense if it's actionable, i.e. resumable. None of these sites can provide a resumable cursor as written:
- GitLab
getProviderRepositoriesForOrg exhausts + filters getReposForCurrentUser internally and takes no cursor param.
- The Azure no-
project branch merges N independently-paginated per-project streams; there's no single cursor that could resume that merge.
getGithubOrgsForCurrentUser / getGitlabGroupsForCurrentUser return plain arrays with no metadata slot.
A bare paging.more = true with no resumable cursor is a broken contract, so surfacing truncation needs a real design pass, not a flag.
Proposed work
- Decide the truncation/completeness contract for these APIs once a real paginating consumer exists (what "incomplete" means and how a caller resumes).
- For the
PagedResult-returning methods: add proper cursor plumbing so paging is honestly resumable, or keep exhausting but expose an explicit truncated/more indicator with a documented meaning.
- For the org/group methods returning
T[]: introduce a metadata-carrying return shape (or switch to PagedResult) so truncation can be represented at all.
- Revisit whether 20 pages is the right backstop per site.
Follow-up from review feedback on #5434 (see #5434 (comment)).
Context
The org/repo hierarchy listing added in #5434 bounds each pagination loop to 20 pages as a backstop against an unbounded loop. When that cap is hit, the result is silently truncated with no signal a caller could use to detect incomplete results. The cap only trips well beyond any realistic single hierarchy (2000 repos for Azure per project and GitLab; 20 pages of orgs/groups), and there are no consumers of these APIs yet, so this is deferred follow-up rather than a blocker for #5434.
Affected sites
packages/plus/integrations/src/providers/azureDevOps.ts(getProviderRepositoriesForOrg, no-projectper-project fan-out)packages/plus/integrations/src/providers/gitlab.ts(getProviderRepositoriesForOrg, exhaust + namespace filter)packages/plus/integrations/src/providers/providersApi.ts(getGithubOrgsForCurrentUser)packages/plus/integrations/src/providers/providersApi.ts(getGitlabGroupsForCurrentUser)Why it's not a trivial flag
A caller-detectable truncation signal only makes sense if it's actionable, i.e. resumable. None of these sites can provide a resumable cursor as written:
getProviderRepositoriesForOrgexhausts + filtersgetReposForCurrentUserinternally and takes no cursor param.projectbranch merges N independently-paginated per-project streams; there's no single cursor that could resume that merge.getGithubOrgsForCurrentUser/getGitlabGroupsForCurrentUserreturn plain arrays with no metadata slot.A bare
paging.more = truewith no resumable cursor is a broken contract, so surfacing truncation needs a real design pass, not a flag.Proposed work
PagedResult-returning methods: add proper cursor plumbing sopagingis honestly resumable, or keep exhausting but expose an explicittruncated/moreindicator with a documented meaning.T[]: introduce a metadata-carrying return shape (or switch toPagedResult) so truncation can be represented at all.Follow-up from review feedback on #5434 (see #5434 (comment)).