Repository navigation
feat(pull-requests): read native GitHub stack membership - #30
Conversation
|
@coderabbitai full review |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 0e76b9ea970ea29542663d41226297947b10f0b5 and e6e83446589c6579aa30384a747898a9c7a3d348. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe pull-request provider now reads bounded GitHub native-stack membership. The CLI also supports relationship-only listings with bounded fallback behavior and truncation reporting. ChangesGitHub native stack membership
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to 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
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
86bab53 to
0e76b9e
Compare
|
@coderabbitai full review |
✅ Action performedFull review finished. |
0e76b9e to
e6e8344
Compare
|
@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. |
Rate Limit Exceeded
|
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
e6e8344 to
8e9b769
Compare
|
@coderabbitai review |
|
8e9b769 to
5ae452f
Compare
|
@coderabbitai review |
|
5ae452f to
a47a1af
Compare
|
@coderabbitai review |
|
✅ Action performedComments resolved. Approval is disabled; enable |
84c5877 to
3a32e4b
Compare
|
@coderabbitai review |
|
@coderabbitai approve |
|
✅ Action performedComments resolved and changes approved. |
|
This dependency-stack tip is now integrated into The #29 missing-evidence gate is now cleared after Codex and Fable inspected the uploaded screenshots and verification notes. PR #37 is merged into Integration: a3ad93268, tree |
|
Published the integration corrections in stacked follow-up #36 at 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. |
|
Merge verdict: NO-GO (review gates incomplete). Head:
No merge performed. Resume the independent code reviews when Fable is available, obtain the missing/current CodeRabbit approval where applicable, and recheck the exact head and base before merging. |
3a32e4b to
57af1a0
Compare
|
Merge verdict: NO-GO; this PR’s isolated change has two GO reviews. Reviewed head:
Why NO-GO: this is a native GitHub stack. Its required asynchronous merge would also merge predecessors with blocking Codex/Fable findings (#26, #27 and #29). An isolated merge is unavailable. Resolve those predecessor findings and obtain fresh approvals for any changed heads before merging. GitHub merge semantics. Post-merge update: current head is @coderabbitai review Please review the current head above and formally approve only if your code review has no remaining blockers; otherwise explain the required correction. The maintainer’s independent-review and predecessor gates remain in force. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Checked-out commit and status =='
git rev-parse HEAD
git status --short
printf '%s\n' '== PR metadata =='
gh pr view 30 --repo RTVision/t3code --json baseRefName,headRefName,headRefOid,mergeable,state,url
printf '%s\n' '== Diff against PR base =='
base="$(git merge-base HEAD "origin/$(gh pr view 30 --repo RTVision/t3code --json baseRefName --jq .baseRefName)")"
printf 'merge-base=%s\n' "$base"
git diff --stat "$base"...HEAD
git diff --name-only "$base"...HEAD
printf '%s\n' '== Structure of changed and related pull-request files =='
fd -a '^(GitHubPullRequestCli|GitHubPullRequestProvider|gitHubNativeStack|PullRequestProvider).*\.ts$' apps/server/src/pullRequest -x ast-grep outline '{}' --view expanded
printf '%s\n' '== Relevant declarations and call sites =='
rg -n -C 4 '\b(getNativeDependencyMembership|listPullRequests|relationshipOnly|makeGitHubNativeStackRead)\b' apps/server/src/pullRequestLength of output: 1692 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Pull request base and changed files from GitHub =='
gh api repos/RTVision/t3code/pulls/30 --jq '{base_sha: .base.sha, head_sha: .head.sha, commits: .commits, changed_files: .changed_files}'
gh api --paginate repos/RTVision/t3code/pulls/30/files \
--jq '.[] | "FILE: \(.filename)\nSTATUS: \(.status)\nPATCH:\n\(.patch // "(binary or omitted)")\n---"'
printf '%s\n' '== Candidate file outlines =='
for file in \
apps/server/src/pullRequest/GitHubPullRequestCli.ts \
apps/server/src/pullRequest/GitHubPullRequestProvider.ts \
apps/server/src/pullRequest/gitHubNativeStack.ts \
apps/server/src/pullRequest/gitHubNativeStack.test.ts
do
if [ -f "$file" ]; then
printf '\n== %s ==\n' "$file"
ast-grep outline "$file" --view expanded || true
fi
done
printf '%s\n' '== Related API declarations and implementations =='
rg -n -C 5 '\b(getNativeDependencyMembership|listPullRequests|relationshipOnly|makeGitHubNativeStackRead)\b' apps/server/src/pullRequestLength of output: 179230 🤖 web_search executed:
Length of output: 12908 🤖 web_search executed:
Length of output: 2605 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Native membership contract and failure handling =='
sed -n '340,375p' apps/server/src/pullRequest/PullRequestProvider.ts
sed -n '1380,1445p' apps/server/src/pullRequest/PullRequestService.ts
sed -n '1450,1585p' apps/server/src/pullRequest/GitHubPullRequestCli.ts
printf '%s\n' '== Published OpenAPI schema for stack members =='
api_description="$(mktemp)"
curl --fail --silent --show-error --location \
https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.hub.lumenfield.work.json \
-o "$api_description"
jq '
.paths["/repos/{owner}/{repo}/stacks/{stack_number}"].get.responses["200"].content["application/json"].schema
' "$api_description"
rm -f "$api_description"Length of output: 12955 🏁 Script executed: #!/bin/bash
set -euo pipefail
api_description="$(mktemp)"
curl --fail --silent --show-error --location \
https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.hub.lumenfield.work.json \
-o "$api_description"
printf '%s\n' '== Published pull-request stack member schema =='
jq '.components.schemas["pull-request-stack-pull-request"]' "$api_description"
rm -f "$api_description"
printf '%s\n' '== Changed reader with line numbers =='
nl -ba apps/server/src/pullRequest/gitHubNativeStack.ts | sed -n '1,160p'Length of output: 1966 🏁 Script executed: #!/bin/bash
set -euo pipefail
api_description="$(mktemp)"
curl --fail --silent --show-error --location \
https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.hub.lumenfield.work.json \
-o "$api_description"
printf '%s\n' '== Inherited minimal pull-request schema =='
jq '.components.schemas["pull-request-minimal"]' "$api_description"
rm -f "$api_description"
printf '%s\n' '== Reader source with line numbers =='
awk '{ printf "%6d %s\n", NR, $0 }' apps/server/src/pullRequest/gitHubNativeStack.ts | sed -n '1,160p'Length of output: 9761
I found no remaining code blockers in this PR. The GitHub stack API usage matches the published endpoint and member schemas. The failure path degrades to unavailable native membership without disabling branch relationship discovery. This approval applies only to the code in this PR. The stated independent-review and predecessor merge gates remain outside this code-review result. [approve] You are interacting with an AI system. |
|
NO-GO now — blocked dependencies Reviewed commit: Claude Fable 5.1 approves the incremental native GitHub membership reader: it is host-restricted, bounded to two calls, and does not invent dependency edges. Codex holds the merge because the native-stack prefix still contains #26, #27, and #29’s blockers. Clear the topology, refresh, and cross-repository navigation defects before merging this stack member. No separate blocker was identified in the membership-reader delta. Validation by Codex: the exact #36 integration head Reviewers: Codex and Claude Fable 5.1 (Claude CLI). |
|
@coderabbitai review Please independently review the newly pushed fixes at |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='2f18c4d52a33cf0bfe3c761601aa4588eb2f0485'
printf '%s\n' '== Checkout and PR metadata =='
printf 'checkout: '; git rev-parse HEAD
gh pr view 30 --repo RTVision/t3code \
--json number,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,mergeable,url \
--jq '.'
actual_head="$(gh pr view 30 --repo RTVision/t3code --json headRefOid --jq .headRefOid)"
if [ "$actual_head" != "$expected_head" ]; then
printf 'ERROR: requested head is %s but GitHub PR head is %s\n' "$expected_head" "$actual_head"
exit 0
fi
base_ref="$(gh pr view 30 --repo RTVision/t3code --json baseRefName --jq .baseRefName)"
base="$(git merge-base HEAD "origin/$base_ref")"
printf 'merge-base: %s\n' "$base"
printf '%s\n' '== Changed files =='
git diff --name-status "$base"...HEAD
printf '%s\n' '== Diff =='
git diff --find-renames --find-copies --unified=80 "$base"...HEAD
printf '%s\n' '== Changed-file outlines =='
git diff --name-only "$base"...HEAD | while IFS= read -r file; do
case "$file" in
*.ts|*.tsx|*.js|*.jsx)
printf '\n== %s ==\n' "$file"
ast-grep outline "$file" --view expanded || true
;;
esac
done
printf '%s\n' '== Related contract declarations and call sites =='
rg -n -C 5 '\b(getNativeDependencyMembership|listPullRequests|relationshipOnly|makeGitHubNativeStackRead)\b' \
apps/server/src/pullRequestLength of output: 2164 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='RTVision/t3code'
pr='30'
head='2f18c4d52a33cf0bfe3c761601aa4588eb2f0485'
printf '%s\n' '== PR commits =='
gh api "repos/$repo/pulls/$pr/commits" --paginate \
--jq '.[] | {sha: .sha, parents: [.parents[].sha], message: .commit.message}'
printf '%s\n' '== PR changed-file patches from GitHub =='
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" \
--jq '.[] | "FILE: \(.filename)\nSTATUS: \(.status)\nPATCH:\n\(.patch // "(patch omitted)")\n---"'
printf '%s\n' '== Changed source files at verified checkout =='
for file in \
apps/server/src/pullRequest/gitHubNativeStack.ts \
apps/server/src/pullRequest/gitHubNativeStack.test.ts \
apps/server/src/pullRequest/GitHubPullRequestCli.ts \
apps/server/src/pullRequest/GitHubPullRequestProvider.ts
do
if [ -f "$file" ]; then
printf '\n== %s ==\n' "$file"
nl -ba "$file" | sed -n '1,260p'
fi
done
printf '%s\n' '== Native membership API contract and service consumption =='
for file in \
apps/server/src/pullRequest/PullRequestProvider.ts \
apps/server/src/pullRequest/PullRequestService.ts
do
if [ -f "$file" ]; then
printf '\n== %s: matching contexts ==\n' "$file"
rg -n -C 12 '\bgetNativeDependencyMembership\b' "$file" || true
fi
done
printf '%s\n' '== GitHub CLI relationship-only listing behavior =='
if [ -f apps/server/src/pullRequest/GitHubPullRequestCli.ts ]; then
rg -n -C 18 '\brelationshipOnly\b|\blistPullRequests\b' \
apps/server/src/pullRequest/GitHubPullRequestCli.ts
fi
printf '%s\n' '== Test cases for native membership =='
if [ -f apps/server/src/pullRequest/gitHubNativeStack.test.ts ]; then
ast-grep outline apps/server/src/pullRequest/gitHubNativeStack.test.ts --items all --view expanded || true
fiLength of output: 16477 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='RTVision/t3code'
old_head='57af1a00c7a8a4262057cdf136e045d6e180af8d'
new_head='2f18c4d52a33cf0bfe3c761601aa4588eb2f0485'
printf '%s\n' '== Fresh delta from previous approved head =='
git diff --name-status "$old_head" "$new_head"
git diff --find-renames --find-copies --unified=60 "$old_head" "$new_head"
printf '%s\n' '== Merge-commit changed files and patches =='
for commit in \
77434d1e8cb3508e61f92a9c2467f15af0a54c49 \
0d8dcb8190a27b3870439af85698832a49f2d7b5 \
5e482b39138a8a460251244e967805f0086b6493 \
2f18c4d52a33cf0bfe3c761601aa4588eb2f0485
do
printf '\n== %s ==\n' "$commit"
gh api "repos/$repo/commits/$commit" \
--jq '{sha: .sha, parents: [.parents[].sha], files: [.files[] | {filename, status, patch}]}'
done
printf '%s\n' '== Current native membership reader =='
sed -n '1,240p' apps/server/src/pullRequest/gitHubNativeStack.ts
printf '%s\n' '== Current contract and consumption contexts =='
rg -n -C 15 '\bgetNativeDependencyMembership\b' \
apps/server/src/pullRequest/PullRequestProvider.ts \
apps/server/src/pullRequest/PullRequestService.ts \
apps/server/src/pullRequest/GitHubPullRequestProvider.ts \
apps/server/src/pullRequest/GitHubPullRequestCli.ts || true
printf '%s\n' '== Current tests =='
sed -n '1,230p' apps/server/src/pullRequest/gitHubNativeStack.test.ts
printf '%s\n' '== GitHub native stack API documentation =='
gh api repos/github/rest-api-description/contents/descriptions/api.github.com/api.hub.lumenfield.work.json \
--jq '.download_url' \
| xargs -r curl --fail --silent --show-error --location \
| jq '{
stack_list: .paths["/repos/{owner}/{repo}/stacks"].get,
stack_get: .paths["/repos/{owner}/{repo}/stacks/{stack_number}"].get
}'Length of output: 202267 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Server refresh implementation =='
sed -n '120,180p' apps/server/src/pullRequest/PullRequestService.ts
sed -n '2350,2895p' apps/server/src/pullRequest/PullRequestService.ts
printf '%s\n' '== Host identity helpers =='
rg -n -C 10 '\b(pullRequestHostOf|repositoryIdentityOf|listingEpoch|bumpListingEpoch|invalidateReference)\b' \
apps/server/src/pullRequest/PullRequestService.ts \
apps/server/src/pullRequest/PullRequestProvider.ts \
apps/server/src/pullRequest
printf '%s\n' '== Client refresh implementation and all hook call sites =='
sed -n '1,255p' packages/client-runtime/src/state/pullRequests.ts
rg -n -C 6 '\b(usePullRequestTurnRefresh|usePullRequestTurnRefreshes|pullRequestEnvironment\.refreshes|pullRequestsSubscribeRefreshes)\b' \
apps packages
printf '%s\n' '== Dependency navigation callback and ChatView usage =='
sed -n '3770,3835p' apps/web/src/components/ChatView.tsx
sed -n '7600,7650p' apps/web/src/components/ChatView.tsx
sed -n '1,160p' apps/web/src/components/pullRequest/usePanelPullRequestNavigation.ts
rg -n -C 4 '\bopenThreadPullRequest\b|\busePanelPullRequestNavigation\b' apps/web
printf '%s\n' '== Protocol compatibility and server stream handler =='
sed -n '710,750p' packages/contracts/src/rpc.ts
sed -n '2145,2180p' apps/server/src/ws.ts
printf '%s\n' '== Native membership implementation references =='
rg -n -C 5 '\b(makeGitHubNativeStackRead|getNativeDependencyMembership)\b' apps/server/srcLength of output: 141244
I found no remaining actionable code blockers. The native GitHub stack reader remains bounded and validates its responses. The refresh changes preserve scoped invalidations across event bursts. The navigation change opens dependencies in the displayed pull request repository. This approval applies only to the reviewed code at this commit. The maintainer’s independent-review and predecessor gates remain outside this result. [approve] You are interacting with an AI system. |
|
Re-review: GO on the membership reader; NO-GO for merging now Reviewed head: The native GitHub stack read remains bounded and does not invent dependency edges. CodeRabbit approves the incremental reader/scoped-refresh result. Fable 5.1: GO on the membership reader; the merge remains blocked by #26. The native-stack prefix retains #26's Azure identity defect and #28's misleading path warnings. Clear the prefix before merging this member. Validation by Codex: 308 focused tests across 9 files passed on integration head The remaining native-stack merges must clear their predecessors and the actual target branch. CodeRabbit’s commit-specific comments are distinguished from formal GitHub review records; rate-limited requests are not approvals. |
|
GO — merged after Codex, Fable 5.1, and CodeRabbit review. Reviewed head: Native GitHub membership behavior is retained; this head carries the corrected dependency service and navigation model. CodeRabbit reviewed every exact head and cleared the combined integration. Its commit-specific approval is recorded in that comment; this is not a claim of a new formal GitHub APPROVED review on each PR. All three reviewers require #26 to land with #27 or later; they merged together in the dependency batch. Validation by Codex: 490 focused tests across 13 files passed on integration head Merged: |
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
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
Bug Fixes