Skip to content

feat(pull-requests): read native GitHub stack membership - #30

Open
kalvenschraut wants to merge 1 commit into
stacks/dependency-navigatorfrom
stacks/github-native-membership
Open

feat(pull-requests): read native GitHub stack membership#30
kalvenschraut wants to merge 1 commit into
stacks/dependency-navigatorfrom
stacks/github-native-membership

Conversation

@kalvenschraut

@kalvenschraut kalvenschraut commented Sep 5, 2026

Copy link
Copy Markdown
Member

What Changed

Add the optional GitHub native-stack reader through the existing PR provider boundary. Two bounded REST calls find exact membership and fetch ordered lightweight members, including merged roots. Failures remain unavailable rather than becoming empty membership; native order never creates branch edges.

Why

GitHub-native membership can contain historical members that ordinary open-branch discovery cannot recover. The same shared contract remains usable by Gitea and other hosts without native stacks. The preview read is limited to github.com; Gitea-native membership stays disabled.

Stack step 7/7. Builds on #29.

Validation: focused tests and scoped lint passed for the implementation and review fixes, including 56 Gitea API, 15 topology, 113 service, and 11 navigation tests after the latest changes. Contracts, client-runtime, and web typechecks passed. Server typechecking reports eight Gitea errors, all reproduced on pristine parent 85dd52877, with no new errors.

A live read on this fork returned all nine members of the existing Gitea workflow stack in exactly two API calls. API reference: https://docs.github.com/en/rest/pulls/stacks.

Checklist

  • One focused review slice
  • Explained the problem and resulting behavior

Models and harnesses: Codex, independently reviewed by GPT-5.6 Sol (high); design by Claude Fable 5.1 via Claude Code.

Summary by CodeRabbit

  • New Features

    • Added support for reading native GitHub pull-request stack membership.
    • Pull-request views can identify related dependency members, including merged roots.
    • Supports paginated results with membership limits and bounded relationship-only listings.
    • Reports when results are truncated due to filtering or listing limits.
  • Bug Fixes

    • Added validation for malformed, ambiguous, mismatched, or unsupported GitHub responses.
    • Improved repository identity and API-host verification.
    • Provides clearer failures when GitHub data cannot be safely interpreted.

@kalvenschraut
kalvenschraut marked this pull request as ready for review September 5, 2026 05:56
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 12 minutes.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 35c421f6-908c-4ac8-84c2-27f598a7e072

📥 Commits

Reviewing files that changed from the base of the PR and between 0e76b9e and e6e8344.

📒 Files selected for processing (1)
  • apps/server/src/pullRequest/GitHubPullRequestCli.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The pull-request provider now reads bounded GitHub native-stack membership. The CLI also supports relationship-only listings with bounded fallback behavior and truncation reporting.

Changes

GitHub native stack membership

Layer / File(s) Summary
Native stack reader and response contracts
apps/server/src/pullRequest/gitHubNativeStack.ts, apps/server/src/pullRequest/gitHubNativeStack.test.ts
Adds response schemas and decoding helpers. The reader validates GitHub.com requests, performs bounded REST calls, checks output data, and maps CLI failures.
Membership validation and mapping
apps/server/src/pullRequest/gitHubNativeStack.ts, apps/server/src/pullRequest/gitHubNativeStack.test.ts
Validates exact membership, stack identifiers, repositories, duplicate members, and ambiguous responses. It applies member limits and maps stack state into provider membership data.
Relationship-only listing fallback
apps/server/src/pullRequest/GitHubPullRequestCli.ts
Adds a bounded, search-free fallback path. It disables row expansion and reports truncation when rows are filtered or the limit is reached.
Provider service integration
apps/server/src/pullRequest/GitHubPullRequestCli.ts, apps/server/src/pullRequest/GitHubPullRequestProvider.ts
Exposes the native membership reader through the CLI service and delegates provider requests to it.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to e6e83

This adds bounded GitHub.com native stack membership and relationship-only listing support while preserving unavailable results on failures and reporting truncation. No concrete merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant PullRequestProvider
  participant GitHubPullRequestCli
  participant GitHubCLI
  PullRequestProvider->>GitHubPullRequestCli: request native dependency membership
  GitHubPullRequestCli->>GitHubCLI: query exact pull request membership
  GitHubCLI-->>GitHubPullRequestCli: membership response
  GitHubPullRequestCli->>GitHubCLI: fetch native stack
  GitHubCLI-->>GitHubPullRequestCli: validated stack data
  GitHubPullRequestCli-->>PullRequestProvider: bounded membership result
Loading

Suggested reviewers: bil0000, maria-rcks

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description includes the required What Changed, Why, and Checklist sections. It clearly explains the implementation, scope, behavior, and validation. No UI changes are reported, so screenshot and …
Title check ✅ Passed The title clearly and concisely describes the main change: reading native GitHub stack membership for pull requests.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stacks/github-native-membership

Comment @coderabbitai help to get the list of available commands.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 86bab53 to 0e76b9e Compare September 5, 2026 06:29
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 0e76b9e to e6e8344 Compare September 5, 2026 06:54
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please review the latest head after the verified findings were fixed and the stack was rebased. The focused fixes passed 296 tests and targeted lint; web typechecking passed. Server typechecking matches the eight errors on the pristine Gitea parent, with no new errors.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@kalvenschraut have exceeded the limit for the number of chat messages per hour. Please wait 6 minutes and 32 seconds before sending another message.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from e6e8344 to 8e9b769 Compare September 5, 2026 07:47
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 8e9b769 to 5ae452f Compare September 5, 2026 08:05
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 5ae452f to a47a1af Compare September 5, 2026 08:43
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from a47a1af to 3c5ee07 Compare September 5, 2026 08:56
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 3c5ee07 to 075d78b Compare September 5, 2026 09:06
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 075d78b to 84c5877 Compare September 5, 2026 09:23
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 84c5877 to 3a32e4b Compare September 5, 2026 10:01
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@kalvenschraut

kalvenschraut commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

This dependency-stack tip is now integrated into rtvision with Fable's explicit approval. The combined commit resolves #25's Gitea conflicts and inherited type errors and restores the missing #8 lifecycle follow-ups described on #9. Focused tests and server/web/desktop typechecks passed on that exact tree.

The remaining #29 browser/evidence gate applies before upstream submission or claiming the UI verified. This original PR branch remains unchanged; preserve the integration corrections when preparing the upstream series.

Integration: a3ad93268, tree 9e13dd0812b8743ef76d4b8adca2f683317fc9e5. All original feature branches are preserved. Implementation/review: Codex (GPT-6); independent approval for the exact commit and rtvision destination: Claude Fable 5.1 through Claude CLI.

@kalvenschraut

Copy link
Copy Markdown
Member Author

Published the integration corrections in stacked follow-up #36 at 1e97a3c73. It joins only #32 and #8 with this dependency tip, preserving both original feature histories and carrying the adapter resolution, combined listing regression, and both lifecycle follow-ups. 260 focused tests plus server/web/desktop typechecks and scoped lint pass; independent Sol high review is clear.

This clears the code integration work at the new tip. The browser/evidence gate on #29 remains pending explicit browser permission; no UI approval is claimed from these code checks. No GitHub PR was merged.

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