Skip to content

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

Merged
kalvenschraut merged 6 commits into
stacks/dependency-navigatorfrom
stacks/github-native-membership
Sep 8, 2026
Merged

kalvenschraut merged 6 commits 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 0e76b9ea970ea29542663d41226297947b10f0b5 and e6e83446589c6579aa30384a747898a9c7a3d348.

📒 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.

@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

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 #29 missing-evidence gate is now cleared after Codex and Fable inspected the uploaded screenshots and verification notes. PR #37 is merged into rtvision with the follow-up budget and pagination fixes; preserve those corrections when preparing upstream submissions. 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.

@kalvenschraut

Copy link
Copy Markdown
Member Author

Merge verdict: NO-GO (review gates incomplete).

Head: 3a32e4b1f98e7f1f523998f491f9c1353230f029.

  • Codex: NO-GO for merging under the requested two-reviewer gate. Merge readiness and review history were checked; the full dual code review is incomplete, and this comment is not a code approval.
  • Fable 5.1 / Claude CLI: BLOCKED. The requested claude-fable-5-1 review was attempted, but the CLI reached its session limit before returning a completed verdict. Its reported reset is midnight America/Chicago. There is no fresh Fable GO from this pass.
  • CodeRabbit: APPROVED on this exact head.
  • GitHub merge state: MERGEABLE / CLEAN against stacks/dependency-navigator.
  • Checks: the current rollup contains a successful CodeRabbit status only; it contains no build/test check result. No new tests or browser verification are claimed by this audit.

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.

@kalvenschraut
kalvenschraut force-pushed the stacks/github-native-membership branch from 3a32e4b to 57af1a0 Compare September 7, 2026 05:49
@kalvenschraut

kalvenschraut commented Sep 7, 2026 •

Copy link
Copy Markdown
Member Author

Merge verdict: NO-GO; this PR’s isolated change has two GO reviews.

Reviewed head: 3a32e4b1f98e7f1f523998f491f9c1353230f029. Destination: stacks/dependency-navigator.

  • Codex: GO. Adds bounded, validated GitHub native stack membership without inventing dependency edges.
  • Claude Fable 5.1 through Claude CLI: GO. Completed independent source review of this exact head.
  • CodeRabbit: APPROVED on the old reviewed head. GitHub subsequently rebased this PR; approval on the new head is required.
  • Validation: The focused navigation/native-stack suites passed as part of 339 integrated PR tests on 6114cf39. The integrated server typecheck passed. These integrated checks do not claim that every earlier stack snapshot is free of inherited compiler errors; PR feat(pull-requests): approve native Gitea workflow runs #12’s baseline compiler errors and their correction in fix(pull-requests): preserve Gitea schema inference #22 are tracked separately.

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 57af1a00c7a8a4262057cdf136e045d6e180af8d, base stacks/dependency-navigator. The old and new Git trees are identical, so the code findings above still apply; commit-specific approvals are nevertheless stale. Merge verdict remains NO-GO.

@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.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

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/pullRequest

Length 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/pullRequest

Length of output: 179230


🤖 web_search executed:

GitHub REST API pull request stacks endpoint "repos/{owner}/{repo}/stacks" pull_request response API version

Length of output: 12908


🤖 web_search executed:

site:docs.github.com/en/rest/pulls/stacks "Pull Request Stack Entry" "head" "repo"

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


@kalvenschraut Code review completed for 57af1a00c7a8a4262057cdf136e045d6e180af8d.

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.

@kalvenschraut

Copy link
Copy Markdown
Member Author

NO-GO now — blocked dependencies

Reviewed commit: 57af1a00c7a8a4262057cdf136e045d6e180af8d.

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 6114cf39dac017bd665908effd538e5f4f8d5764 passed 1,002 tests across 39 affected files, scoped server/web/desktop typechecks, and targeted lint (warnings, no errors). These are integration results, not a claim that this standalone head passed those checks. Fable independently reviewed source and diffs via Claude CLI; it did not run the tests.

Reviewers: Codex and Claude Fable 5.1 (Claude CLI).

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please independently review the newly pushed fixes at 2f18c4d52a33cf0bfe3c761601aa4588eb2f0485 and submit a formal GitHub approval on this head only if no blockers remain. Otherwise report the remaining actionable findings. The maintainer requested fresh CodeRabbit approval before merging; an older approval or a green skipped-review status does not satisfy that gate. Codex and Claude Fable 5.1 are separately re-reviewing the changes, including the prior no-go findings in this PR.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

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/pullRequest

Length 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
fi

Length 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/src

Length of output: 141244


@kalvenschraut Code review completed for 2f18c4d52a33cf0bfe3c761601aa4588eb2f0485.

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.

@kalvenschraut

Copy link
Copy Markdown
Member Author

Re-review: GO on the membership reader; NO-GO for merging now

Reviewed head: 2f18c4d52a33cf0bfe3c761601aa4588eb2f0485. This updates my earlier go/no-go comment for the newly pushed repairs.

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 73dd9c33ab15db71748beb6f0485ec212e6682f8; scoped server, web, and client-runtime typechecks passed, and targeted lint of 21 changed files passed with warnings. A separate single-worker reproduction exposed the native comment-reaction bug (100 reads and no reactions for a 50-reaction comment). These are integration results, not a claim that every standalone head passed the checks. Fable reviewed source and diffs through Claude CLI; it did not run tests.

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.

@kalvenschraut

kalvenschraut commented Sep 8, 2026 •

Copy link
Copy Markdown
Member Author

GO — merged after Codex, Fable 5.1, and CodeRabbit review.

Reviewed head: 47f25d017ab8215059f9aaef5f1a2fa443af1a57. This supersedes my previous decision on the older 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 2e156ad621fb32b241abd4614a367aea7943d12e, including the previously failing native comment-reaction reproduction. Scoped server, web, and client-runtime typechecks passed; targeted lint of 24 changed files passed with warnings. Checks ran sequentially with one test worker. These validate the integration, not separate test runs on every component head. Fable independently reviewed source and diffs via Claude CLI.

Merged: 20926b20ed4ea72618f7608f70b1d4cea8e40053 at 2026-09-08T04:45:14Z. The 17-member Gitea stack merged first into rtvision. The six remaining dependency PRs were regrouped from stack pingdotgg#35 into stack pingdotgg#38 and retargeted to rtvision, without changing any reviewed head, then merged together. Final rtvision commit is 20926b20ed4ea72618f7608f70b1d4cea8e40053; its tree 9a0e0253b515456f6a117be5ebccf2cd8e911b01 exactly matches tested integration head #36.

@kalvenschraut
kalvenschraut merged commit 20926b2 into rtvision Sep 8, 2026
1 check passed
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