You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
groups list 400 INVALID_ARGUMENT: searchTransitiveGroups rejects (A || B) OR label filter #1059
Auth: delegated service account (domain-wide delegation), invoked as --account <workspace-email>
Repro
gog --account admin@example.com groups list
Result:
Google API error (400 badRequest): Request contains an invalid argument.
Root cause
internal/cmd/groups.go → searchTransitiveGroupsQuery builds this query:
returnfmt.Sprintf(
"member_key_id == '%s' && ('%s' in labels || '%s' in labels)",
memberKeyID,
groupLabelDiscussionForum, // cloudidentity.googleapis.com/groups.discussion_forumgroupLabelDynamic, // cloudidentity.googleapis.com/groups.dynamic
)
Cloud Identity's groups.memberships.searchTransitiveGroups query accepts && (AND) filters, but the parenthesized || (OR) between two label conditions is rejected with 400 INVALID_ARGUMENT.
Evidence (raw API, varying the query)
query
HTTP
member_key_id == 'x@example.com' (no label)
400
member_key_id == 'x@example.com' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels
200
member_key_id == 'x@example.com' && ('...discussion_forum' in labels || '...dynamic' in labels)
400
Suggested fix
Use a single label filter instead of the OR (e.g. only discussion_forum), or issue two separate queries and merge results. The two-label OR appears to have been introduced by the label-filter change (#315), but the OR form is not accepted by the Cloud Identity API.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 7, 2026, 4:26 AM ET / 08:26 UTC.
Summary
The reported query remains on current main and in v0.39.1. The maintainer explicitly reopened this issue after an unrelated pagination merge; the approved repair still awaits independent provider validation.
Reproducibility: yes. for constructing and sending the reported query: both current callers visibly use it. Independent reproduction of Google's rejection remains pending on an eligible identity; no live request or tests were executed in this review.
Root-cause cluster
Relationship: canonical
Canonical: #1059
Summary: This issue remains the query-repair tracker; the merged pagination and dependency work explicitly excluded it.
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Retain the explicit no-new-fix-pr hold and route the existing eligible-provider validation gate to steipete without reopening settled product direction.
Review details
Best possible solution:
Use the documented single discussion-forum predicate in the shared helper, preserving escaping, native pagination, and output contracts, with exact-query regressions and eligible-provider proof.
Do we have a high-confidence way to reproduce the issue?
Yes for constructing and sending the reported query: both current callers visibly use it. Independent reproduction of Google's rejection remains pending on an eligible identity; no live request or tests were executed in this review.
Is this the best way to solve the issue?
Yes. The maintainer-selected single predicate follows Google's documented membership search and dynamic-group examples without introducing a second query or composite cursor.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Independent provider evidence has not established successful single-filter retrieval of a known dynamic membership and agreement between --max 1, --page, and --all under an already-authorized eligible identity.
Codex review notes: model internal, reasoning medium; reviewed against 443c84da8b57.
Label changes
Label changes:
remove clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.
remove clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.
Label justifications:
P2: An existing Workspace Groups operation reports a provider rejection, with a bounded repair and limited service-specific impact.
impact:other: The affected behavior is group-membership retrieval for listing and backup, outside the more specific owned impact classes.
Evidence reviewed
What I checked:
Current query and command caller: The checkout matches fetched main. The query builder still combines discussion-forum and dynamic labels with OR; GroupsListCmd sends it directly to SearchTransitiveGroups. (internal/cmd/groups.go:212, 443c84da8b57)
Shared backup exposure: The Groups backup collector uses the same query builder and forwards native continuation tokens, so the selected repair covers both callers. (internal/cmd/backup_directory_keep.go:145, 443c84da8b57)
Latest release remains affected: Inspection of v0.39.1 shows the same OR-label query. The tag resolves to the supplied latest-release commit. (internal/cmd/groups.go:212, 6895139ab1b4)
Existing tests encode the disputed filter: The helper test requires both label predicates, while command tests use synthetic HTTP responses and check substrings; these checks do not establish Google's acceptance of the query. (internal/cmd/groups_test.go:78, 443c84da8b57)
Maintainer-selected repair and validation boundary: The September 3 comment approves one discussion-forum predicate, preserved escaping and native pagination, and independent eligible-provider validation including a known dynamic membership. It explicitly excludes new scopes, IAM, API enablement, billing, or fixture groups. groups list 400 INVALID_ARGUMENT: searchTransitiveGroups rejects (A || B) OR label filter #1059 (comment).
steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
How this review workflow works
ClawSweeper keeps one durable marker-backed review comment per issue or PR.
Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
Maintainers can also comment @clawsweeper review to request a fresh review only.
Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Maintainer triage: this is an existing-query repair; a new product decision or two-query merge is not needed. Google's transitive-membership guide uses one discussion-forum predicate to retrieve direct and indirect group memberships, excluding identity-mapped groups. Its dynamic-group creation example also uses that label with dynamic-group metadata.
The bounded repair is to replace the OR in searchTransitiveGroupsQuery with that documented single predicate, retaining member escaping and native page tokens. The shared helper covers both groups list and the Groups backup collector. Exact-query and request-level pagination tests should cover both; no deduplication or composite cursor is warranted.
The remaining gate is independent live proof with an already-authorized eligible Workspace/Cloud Identity Premium identity and membership-view access. Compare the reported OR failure with a successful single-filter request, include a known dynamic membership, and verify --max 1, --page, and --all agree. The existing focused Groups tests pass, but they are mocks, not provider proof. The consumer test account cannot exercise this endpoint. No new scopes, IAM, API enablement, billing, or fixture groups are authorized by this triage. Keep the issue open pending that validation; no fix has landed yet.
Reopening: this was closed automatically by the #1087 merge reference, but the Groups OR-label query is still on main. Peter selected the narrow single-discussion-forum predicate repair; it still needs live validation against an eligible Cloud Identity grant before landing.
Maintainer update: proceed with the narrow single-discussion-forum query repair using Google's documented query/label contracts, generated-client request regressions, review, and normal CI. I am relaxing the earlier requirement for an independent live Cloud Identity comparison for this bounded fix.
The configured Workspace accounts were checked again: user OAuth is healthy, but neither has a delegated Groups credential. Ordinary OAuth reauthentication does not supply that configuration. Do not add IAM grants, enable APIs, change billing, or create fixture groups to satisfy this check.
The refreshed regression suite fails against the old query and passes with the documented predicate. It covers listing and backups, page sizes, opaque native cursors, --all from the beginning or an existing cursor, and literal member escaping. Google's ordinary/security/dynamic label documentation supports the single predicate; fixture group names are not presented as live dynamic-membership proof. The original reporter's OR-versus-single-filter API comparison remains reporter evidence, not an independently repeated result.
Activity
clawsweeper commentedon Sep 2, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 7, 2026, 4:26 AM ET / 08:26 UTC.
Summary
The reported query remains on current main and in v0.39.1. The maintainer explicitly reopened this issue after an unrelated pagination merge; the approved repair still awaits independent provider validation.
Reproducibility: yes. for constructing and sending the reported query: both current callers visibly use it. Independent reproduction of Google's rejection remains pending on an eligible identity; no live request or tests were executed in this review.
Root-cause cluster
Relationship:
canonicalCanonical: #1059
Summary: This issue remains the query-repair tracker; the merged pagination and dependency work explicitly excluded it.
Members:
adjacent_distinct: fix(paging): reject token cycles across CLI scans and backups #1087 - Merged pagination-cycle guards address a separate failure and explicitly leave query validation unresolved.adjacent_distinct: chore(deps): refresh Google support and worker tooling #1076 - The merged dependency refresh explicitly preserves the eligible-provider validation gate.partial_overlap: fix(groups): include required label filter in transitive group search #315 - The earlier merged label-filter repair concerns the same query, but its missing-label problem does not resolve the reported OR rejection.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Retain the explicit no-new-fix-pr hold and route the existing eligible-provider validation gate to steipete without reopening settled product direction.
Review details
Best possible solution:
Use the documented single discussion-forum predicate in the shared helper, preserving escaping, native pagination, and output contracts, with exact-query regressions and eligible-provider proof.
Do we have a high-confidence way to reproduce the issue?
Yes for constructing and sending the reported query: both current callers visibly use it. Independent reproduction of Google's rejection remains pending on an eligible identity; no live request or tests were executed in this review.
Is this the best way to solve the issue?
Yes. The maintainer-selected single predicate follows Google's documented membership search and dynamic-group examples without introducing a second query or composite cursor.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 443c84da8b57.
Label changes
Label changes:
clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.Label justifications:
P2: An existing Workspace Groups operation reports a provider rejection, with a bounded repair and limited service-specific impact.impact:other: The affected behavior is group-membership retrieval for listing and backup, outside the more specific owned impact classes.Evidence reviewed
What I checked:
internal/cmd/groups.go:212, 443c84da8b57)internal/cmd/backup_directory_keep.go:145, 443c84da8b57)internal/cmd/groups.go:212, 6895139ab1b4)internal/cmd/groups_test.go:78, 443c84da8b57)(A || B)OR label filter #1059 (comment).(A || B)OR label filter #1059 (comment). (91b66c9ea170)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Sep 3, 2026
Maintainer triage: this is an existing-query repair; a new product decision or two-query merge is not needed. Google's transitive-membership guide uses one discussion-forum predicate to retrieve direct and indirect group memberships, excluding identity-mapped groups. Its dynamic-group creation example also uses that label with dynamic-group metadata.
The bounded repair is to replace the OR in
searchTransitiveGroupsQuerywith that documented single predicate, retaining member escaping and native page tokens. The shared helper covers bothgroups listand the Groups backup collector. Exact-query and request-level pagination tests should cover both; no deduplication or composite cursor is warranted.The remaining gate is independent live proof with an already-authorized eligible Workspace/Cloud Identity Premium identity and membership-view access. Compare the reported OR failure with a successful single-filter request, include a known dynamic membership, and verify
--max 1,--page, and--allagree. The existing focused Groups tests pass, but they are mocks, not provider proof. The consumer test account cannot exercise this endpoint. No new scopes, IAM, API enablement, billing, or fixture groups are authorized by this triage. Keep the issue open pending that validation; no fix has landed yet.chore(deps): refresh Google support and worker tooling (#1076)
steipete commentedon Sep 7, 2026
Reopening: this was closed automatically by the #1087 merge reference, but the Groups OR-label query is still on main. Peter selected the narrow single-discussion-forum predicate repair; it still needs live validation against an eligible Cloud Identity grant before landing.
steipete commentedon Sep 24, 2026
Maintainer update: proceed with the narrow single-discussion-forum query repair using Google's documented query/label contracts, generated-client request regressions, review, and normal CI. I am relaxing the earlier requirement for an independent live Cloud Identity comparison for this bounded fix.
The configured Workspace accounts were checked again: user OAuth is healthy, but neither has a delegated Groups credential. Ordinary OAuth reauthentication does not supply that configuration. Do not add IAM grants, enable APIs, change billing, or create fixture groups to satisfy this check.
The refreshed regression suite fails against the old query and passes with the documented predicate. It covers listing and backups, page sizes, opaque native cursors, --all from the beginning or an existing cursor, and literal member escaping. Google's ordinary/security/dynamic label documentation supports the single predicate; fixture group names are not presented as live dynamic-membership proof. The original reporter's OR-versus-single-filter API comparison remains reporter evidence, not an independently repeated result.