Skip to content

fix(github): pull requests load on Enterprise Server again - #2

Open
zrm625 wants to merge 6 commits into
mainfrom
pyre/ghes-stack-fields
Open

zrm625 wants to merge 6 commits into
mainfrom
pyre/ghes-stack-fields

Conversation

@zrm625

@zrm625 zrm625 commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

On GitHub Enterprise Server, the Pull Requests tab is empty and linked pull request summaries fail with Field 'stack' doesn't exist on type 'PullRequest'. Enterprise Server validates the full GraphQL document before applying @include, so gating stack and stackEntry behind @include(if: $stacks) still causes every listing and summary read to be rejected (pingdotgg/t3code#20436).

Fix

  • Move the stack fields into a single shared PullRequestStackFields fragment used only by github.com operations (PullRequestSummaryWithStacks, PullRequestSearchWithStacks, and PullRequestStackMembership).
  • Keep PullRequestSummary, PullRequestSearch, and PullRequestList free of stack fields so Enterprise Server hosts never receive them, while github.com makes the same requests as before.
  • Route host-specific operations and resolvers through one normalized isGitHubCom(host) check, and only decode stack fields on rows that carry them.
  • Update graphql.config.ts to note that Enterprise-missing fields belong in separate github.com-only documents rather than under @include.
  • Extend the existing GitHubPullRequestApi tests to verify PullRequestSearchWithStacks on github.com and confirm Enterprise list, search, and summary reads never name stack fields or trigger stack enrichment.

Validation

  • vp run check:changed passes (format, lint, knip, graphqlgen --check, typecheck across 11 packages, and 194 tests).
  • Not tested against a live GitHub Enterprise Server instance.

Based on @felixlaga's original fix in pingdotgg/t3code#20531 (credited as co-author).

Implemented with Claude Opus 5.5 (Claude Code) and Gemini 4 Neon (Antigravity) through T3 Code.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T03:15:47.820208Z 794dbf0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 8, 2026
@zrm625
zrm625 force-pushed the pyre/ghes-stack-fields branch from 794dbf0 to d2dec1f Compare November 8, 2026 18:19
Enterprise Server validates a whole GraphQL document before applying
directives, so the listing and summary documents fail there because they
name `stack` and `stackEntry`, even under `@include(if: false)`. Enterprise
hosts now get documents without those fields, and github.com gets
`PullRequestSearchWithStacks` and `PullRequestSummaryWithStacks`, which
share one `PullRequestStackFields` fragment with `PullRequestStackMembership`.

Co-authored-by: felixlaga <felix.laga@yahoo.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zrm625
zrm625 force-pushed the pyre/ghes-stack-fields branch from d2dec1f to 0b5c51a Compare November 9, 2026 13:18
zrm625 added a commit that referenced this pull request Nov 9, 2026
Keep stack and label coverage together, and regenerate GraphQL operations with the current watch fields.

Model: gpt-6.1-sol. Harness: Codex in T3 Code.
Model: gpt-6.1-sol. Harness: Codex in T3 Code.
Share the summary request call and search arguments across GitHub and Enterprise while preserving their existing GraphQL documents and batching.

Model: gpt-6.1-sol. Harness: Codex in T3 Code.
@zrm625 zrm625 removed the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Nov 13, 2026
@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Nov 20, 2026
@zrm625 zrm625 removed vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant