Repository navigation
fix(supergroups): Strip inaccessible groups from by-group response - #129217
Merged
michelletran-sentry merged 2 commits intoOct 29, 2026
Merged
Conversation
Seer returns every group in a supergroup, including groups in projects the caller cannot access. Filter group_ids and project_ids to the caller's projects before the status, threshold, and assignee handling, and drop supergroups that end up empty. Co-Authored-By: Michelle Tran <[email protected]>
michelletran-sentry
marked this pull request as draft
October 29, 2026 17:41
The access filter and the status filter each queried the same group ids. Fetch id and status once and run both filters from that result. Co-Authored-By: Michelle Tran <[email protected]>
michelletran-sentry
marked this pull request as ready for review
October 29, 2026 19:46
cvxluo
approved these changes
Oct 29, 2026
cvxluo
left a comment
Contributor
There was a problem hiding this comment.
i think supergroups are limited to open team membership only orgs, so i don't think there's any impact here? either way fix looks good just in case things change in the future
michelletran-sentry
deleted the
fix/supergroups-filter-inaccessible-groups
branch
October 29, 2026 20:06
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.
OrganizationSupergroupsByGroupEndpointvalidates the requestedgroup_ids against the caller's projects. But Seer returns every group in each matching supergroup, and those came back as-is. Unless astatusfilter was applied below the fan-out threshold, the response could include group IDs, project IDs and assignees from projects the caller can't access.Right after the Seer call, one
values_list("id", "status")query over the returned group IDs, limited to the caller's projects, drives both filters. Each supergroup'sgroup_idsandproject_idsare trimmed to what the caller can access, and supergroups left empty are dropped. This runs before the threshold check, so the over-threshold path is covered too. The status filter reuses the same statuses instead of running a secondget_group_listlookup, so the endpoint still makes one group query after Seer.test_skips_fanout_over_thresholdused 100 made-up group IDs to trip the threshold. Those IDs are now filtered out, so the test patches the threshold to 1 and uses real groups instead.Open question for owners: the supergroup
titleandsummarycome from Seer and may reflect issues in projects the caller can't see. This PR doesn't change them.via Michelle Tran.
--
View Junior Session [Sentry]