fix(iam): return paginationToken from listPolicies - #206
Merged
Conversation
The AWS-standard ListPolicies response nests IsTruncated and Marker inside ListPoliciesResult, but they were read from the top level, so the next-page token was always undefined — callers could never page past the first result set. Read them from ListPoliciesResult, gated on IsTruncated, matching the existing listPoliciesForAccessKey handling. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Greptile SummaryCorrects IAM policy pagination by reading
Confidence Score: 5/5The PR appears safe to merge, with the focused pagination fix and package changeset aligned with existing IAM list behavior. The implementation reads both pagination fields from the documented nested result, suppresses tokens when the response is not truncated, and preserves existing policy mapping behavior. Important Files Changed
Reviews (1): Last reviewed commit: "fix(iam): return paginationToken from li..." | Re-trigger Greptile |
MantasMiksys
approved these changes
Jul 24, 2026
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
@tigrisdata/iam'slistPoliciesnever returned apaginationToken, sotigris iam policies listcould not page past the first result set — reported when 6 policies with--limit 3yielded no page token, in both table and--jsonoutput.The AWS-standard
ListPoliciesresponse nestsIsTruncatedandMarkerinsideListPoliciesResult, but the code read them from the top level, soMarkerwas alwaysundefined. This matches the already-correctlistPoliciesForAccessKey(ListUserPolicies) handling.Verification
Verified live:
--limit 3now returns apaginationToken, and paging with it fetches a genuinely different second page (0 overlap) plus a further token.Audit
Swept every other list path (storage buckets/forks/objects/versions/snapshots/stats, iam access-keys, and all CLI list commands incl.
--json/--xml) — no other pagination-token gaps found.🤖 Generated with Claude Code
Note
Low Risk
Narrow response-parsing fix in IAM policy listing with no auth or data-mutation changes; behavior only affects multi-page policy lists.
Overview
Fixes
listPoliciespagination so callers (e.g.tigris iam policies list) can page past the first result set.The
ListPoliciesAPI nestsIsTruncatedandMarkerunderListPoliciesResult, but the client typed and read them at the top level, sopaginationTokenwas always missing. The response type and mapping now useListPoliciesResult, and the next-page token is only set whenIsTruncatedis true—aligned withlistPoliciesForAccessKey.Reviewed by Cursor Bugbot for commit b2f0db0. Bugbot is set up for automated code reviews on this repo. Configure here.