fix(member): add --limit flag to member list + page/limit consistency test#42
Merged
ysyneu merged 2 commits intoJun 12, 2026
Merged
Conversation
…airing member list registered --page but not --limit even though the SDK's MemberListRequest embeds ListOptions with a Limit field, so agents that learned --limit on other list commands got 'unknown flag: --limit'. Add the flag (same wording/default as team list) and a cobra-tree test asserting any command with --page also exposes --limit.
MemberListRequest already exposes Orderby and Asc fields (generated from the OpenAPI schema); team list has both flags with identical wording and defaults. Wire them to close the sibling-parameter gap found during the audit-2026-06-11b param consistency review.
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.
What
member listnow exposes--limit(default 20, same wording asteam list) and forwards it toMemberListRequest.Limit.TestPageImpliesLimitwalks the cobra command tree and asserts every command that registers--pagealso registers--limit, so future drift is caught at test time.Root cause
member listregistered--pagebut never--limit, even though the SDK'sMemberListRequestembedsflashduty.ListOptions(which hasLimit). Every other curated list command (alert/change/incident/oncall/team/audit/session) exposes both, so agents transfer the flag and hitunknown flag: --limitonly here.Evidence
Audit run
audit-2026-06-11b:sess_GWzX4FHFabgaENLQkpNgHBsteps 7-8:fduty member list --limit 3→unknown flag: --limitsess_PZUjHi3xEAxuURncY6nSqZsteps 5-14: flag trial-and-error / --help round-tripsThe broader alias-everything matrix from the original proposal was deliberately excluded: channel/field list do client-side filtering with no server pagination, and renaming search flags is a design call, not a mechanical fix.
Verification
go test ./internal/cli -run TestPageImpliesLimitFAILS citingflashduty member list.go build ./... && go vet ./... && go test ./...all green.go run ./cmd/flashduty member list --helpshows--limit.