Batch GitHub team GraphQL reads - #301
Open
hosom wants to merge 1 commit into
Open
Conversation
hosom
force-pushed
the
reuse-graphql-http
branch
from
September 8, 2026 20:29
7cd282e to
1b8bd1c
Compare
hosom
force-pushed
the
batch-github-team-graphql
branch
from
September 8, 2026 20:29
95c2ebb to
1045758
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Cached missing-team results prevent newly created teams from being re-read before synchronization.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
lib/entitlements/backend/github_team/service.rb — Caching an authoritative nil here breaks creation in Provider#commit: after create_team,… |
What changed in this PR
Adds bounded GraphQL batching for GitHub team reads while preserving cache behavior and independent pagination.
Changes:
- Batches authoritative team queries with aliases, escaping, pagination limits, and rate-limit logging.
- Adds provider/controller prefetch support and caches missing teams.
- Expands tests for batching, pagination, caching, and failures.
| File | Description |
|---|---|
lib/entitlements/backend/github_team/service.rb |
Implements batched team reads and caching. |
lib/entitlements/backend/github_team/provider.rb |
Adds provider-level prefetching. |
lib/entitlements/backend/github_team/controller.rb |
Prefetches all calculated teams together. |
spec/unit/spec_helper.rb |
Updates GraphQL response fixtures. |
spec/unit/entitlements/backend/github_team/service_spec.rb |
Tests batching and pagination. |
spec/unit/entitlements/backend/github_team/provider_spec.rb |
Tests provider prefetch caching. |
spec/unit/entitlements/backend/github_team/controller_spec.rb |
Updates controller expectations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| end | ||
|
|
||
| { cache: false, value: team } | ||
| @team_cache[team_identifier] = { cache: false, value: team } |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bff1e95b-3949-4ae8-b3a5-737fd278a977
hosom
force-pushed
the
reuse-graphql-http
branch
from
September 9, 2026 20:33
1b8bd1c to
3298437
Compare
hosom
force-pushed
the
batch-github-team-graphql
branch
from
September 9, 2026 20:33
1045758 to
2df575e
Compare
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
Validation
bundle exec rspec spec/unit --format progress(205 examples, 0 failures, 100% coverage)bundle exec rubocop -c .rubocop.yml lib/ spec/(31 files, no offenses)git diff --checkDependency
This is stacked on #300 so the batching diff can be reviewed separately from GraphQL connection reuse and organization-membership cache optimizations.