Repository navigation
feat(source-control): recognize configured Gitea SSH hosts - #7
Conversation
|
@coderabbitai review Please evaluate correctness, regressions, security boundaries, and test coverage against the existing source-control and pull-request integrations. For this fork, |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Repository state and PR metadata =='
git status --short
git branch --show-current
git remote -v
gh pr view 7 --repo RTVision/t3code --json number,title,baseRefName,headRefName,mergeable,changedFiles,additions,deletions,files
echo
echo '== Merge base and change summary =='
base="$(gh pr view 7 --repo RTVision/t3code --json baseRefName --jq .baseRefName)"
git fetch --no-tags origin "$base" >/dev/null 2>&1 || true
merge_base="$(git merge-base "origin/$base" HEAD)"
printf 'base=%s\nmerge_base=%s\n' "$base" "$merge_base"
git diff --stat "$merge_base"...HEAD
git diff --name-status "$merge_base"...HEAD
echo
echo '== Full PR diff =='
git diff --find-renames --find-copies --unified=80 "$merge_base"...HEAD
echo
echo '== Candidate source-control / pull-request files =='
fd -t f . | rg -i '(gitea|source.?control|pull.?request|remote|git).*'
echo
echo '== Symbol outline for changed source files =='
git diff --name-only "$merge_base"...HEAD | while IFS= read -r file; do
case "$file" in
*.ts|*.tsx|*.js|*.jsx|*.mjs|*.cjs)
echo "--- $file"
ast-grep outline "$file" --items all || true
;;
esac
done
echo
echo '== Relevant configuration and host-recognition references =='
rg -n -i -C 5 \
'(T3CODE_GITEA_SSH_HOSTS|GITEA_SSH|gitea.*host|host.*gitea|GITEA|parse.*remote|remote.*url|ssh://|git@)' \
. -g '!node_modules/**' -g '!dist/**' -g '!build/**'Length of output: 3110 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr=7
meta="$(gh api "repos/$repo/pulls/$pr")"
base_sha="$(jq -r '.base.sha' <<<"$meta")"
head_sha="$(jq -r '.head.sha' <<<"$meta")"
base_ref="$(jq -r '.base.ref' <<<"$meta")"
head_ref="$(jq -r '.head.ref' <<<"$meta")"
printf 'base_ref=%s\nbase_sha=%s\nhead_ref=%s\nhead_sha=%s\n' \
"$base_ref" "$base_sha" "$head_ref" "$head_sha"
echo '== PR file patches from GitHub =='
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" \
--jq '.[] | "===== \(.filename) =====\n\(.patch // "[No textual patch returned]")"'
echo
echo '== Current changed-file outlines and content =='
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" --jq -r '.[].filename' |
while IFS= read -r file; do
echo "===== CURRENT: $file ====="
case "$file" in
*.ts|*.tsx|*.js|*.jsx)
ast-grep outline "$file" --items all || true
;;
esac
cat -n "$file"
done
echo
echo '== Base versions of changed implementation files =='
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" --jq -r '.[].filename' |
while IFS= read -r file; do
case "$file" in
*.ts|*.tsx|*.js|*.jsx|*.md)
echo "===== BASE: $file ====="
gh api "repos/$repo/contents/$file?ref=$base_sha" --jq .content |
base64 --decode | cat -n
;;
esac
done
echo
echo '== Related provider, remote parser, and credential-check references =='
rg -n -i -C 8 \
'(GiteaApi|GiteaPullRequestApi|GiteaSourceControlProvider|isGitea|GITEA_|accessToken|token|authorization|credential|remote.*host|host.*remote|repository.*url)' \
apps/server/src -g '*.ts' -g '*.tsx'Length of output: 12127 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
sha="$(gh api "repos/$repo/pulls/7" --jq .head.sha)"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
fetch_file() {
local path="$1"
local out="$tmp/$path"
mkdir -p "$(dirname "$out")"
gh api "repos/$repo/contents/$path?ref=$sha" --jq .content | base64 --decode >"$out"
}
echo '== Candidate files in source-control and pull-request modules =='
gh api "repos/$repo/git/trees/$sha?recursive=1" --paginate --jq \
'.tree[].path | select(test("^apps/server/src/(sourceControl|pullRequest)/.*\\.(ts|tsx)$"))' |
tee "$tmp/candidates.txt"
while IFS= read -r path; do
fetch_file "$path"
done <"$tmp/candidates.txt"
echo
echo '== GiteaPullRequestApi host validation and request flow =='
rg -n -i -C 20 \
'(validateHost|getPullRequest|GiteaPullRequestApiError|gitea\.request|request\(|host:|pull request host)' \
"$tmp/apps/server/src/pullRequest/GiteaPullRequestApi.ts"
echo
echo '== GiteaApi URL validation and request flow =='
rg -n -i -C 20 \
'(function validate|const validate|validate.*[Uu][Rr][Ll]|new URL|baseUrl|request\s*=|authorization|token|headers|path:)' \
"$tmp/apps/server/src/sourceControl/GiteaApi.ts"
echo
echo '== Pull-request reference parsing and Gitea API call sites =='
rg -n -i -C 12 \
'(getPullRequest\s*\(|GiteaPullRequestApi|giteaPullRequestNumber|parse.*[Pp]ull|pull.*[Uu][Rr][Ll]|host)' \
"$tmp/apps/server/src"
echo
echo '== Existing Gitea pull-request tests =='
cat -n "$tmp/apps/server/src/pullRequest/GiteaPullRequestApi.test.ts"
echo
echo '== Existing Gitea API and repository parser tests =='
cat -n "$tmp/apps/server/src/sourceControl/GiteaApi.test.ts"
cat -n "$tmp/apps/server/src/sourceControl/giteaRepository.test.ts"Length of output: 2141 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
sha="$(gh api "repos/$repo/pulls/7" --jq .head.sha)"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
fetch_file() {
local path="$1"
local out="$tmp/$path"
mkdir -p "$(dirname "$out")"
gh api "repos/$repo/contents/$path?ref=$sha" --jq .content | base64 --decode >"$out"
}
gh api "repos/$repo/git/trees/$sha?recursive=1" --paginate --jq \
'.tree[].path | select(test("^apps/server/src/(sourceControl|pullRequest)/.*\\.(ts|tsx)$"))' \
>"$tmp/candidates.txt"
echo '== Candidate files =='
cat "$tmp/candidates.txt"
while IFS= read -r path; do
fetch_file "$path"
done <"$tmp/candidates.txt"
echo
echo '== GiteaPullRequestApi host validation and request flow =='
rg -n -i -C 20 \
'(validateHost|getPullRequest|GiteaPullRequestApiError|gitea\.request|request\(|host:|pull request host)' \
"$tmp/apps/server/src/pullRequest/GiteaPullRequestApi.ts"
echo
echo '== GiteaApi URL validation and request flow =='
rg -n -i -C 20 \
'(function validate|const validate|validate.*[Uu][Rr][Ll]|new URL|baseUrl|request\s*=|authorization|token|headers|path:)' \
"$tmp/apps/server/src/sourceControl/GiteaApi.ts"
echo
echo '== Pull-request reference parsing and Gitea API call sites =='
rg -n -i -C 12 \
'(getPullRequest\s*\(|GiteaPullRequestApi|giteaPullRequestNumber|parse.*[Pp]ull|pull.*[Uu][Rr][Ll]|host)' \
"$tmp/apps/server/src"
echo
echo '== GiteaPullRequestApi test file =='
cat -n "$tmp/apps/server/src/pullRequest/GiteaPullRequestApi.test.ts"
echo
echo '== GiteaApi and repository parser test files =='
cat -n "$tmp/apps/server/src/sourceControl/GiteaApi.test.ts"
cat -n "$tmp/apps/server/src/sourceControl/giteaRepository.test.ts"Length of output: 185976 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
sha="$(gh api "repos/$repo/pulls/7" --jq .head.sha)"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
for path in \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/sourceControl/giteaRepository.ts
do
out="$tmp/$(basename "$path")"
gh api "repos/$repo/contents/$path?ref=$sha" --jq .content | base64 --decode >"$out"
echo "===== $path ====="
wc -l "$out"
done
echo
echo '== GiteaPullRequestApi validateHost and all Gitea request calls =='
rg -n -C 12 '(validateHost|gitea\.request\(|request\(\{)' "$tmp/GiteaPullRequestApi.ts"
echo
echo '== GiteaApi request URL construction and authorization =='
rg -n -C 16 '(const request|request =|new URL|authorization|redirect|apiRoot|configured|baseUrl)' "$tmp/GiteaApi.ts"
echo
echo '== Every giteaRepositoryFromRemote invocation in provider =='
rg -n -C 6 'giteaRepositoryFromRemote\(' "$tmp/GiteaSourceControlProvider.ts"
echo
echo '== Complete remote parser =='
cat -n "$tmp/giteaRepository.ts"
echo
echo '== PR checks and changed-file contents metadata =='
gh pr checks 7 --repo "$repo" || true
gh api "repos/$repo/pulls/7/files?per_page=100" --jq \
'.[] | {file: .filename, additions, deletions, patch_lines: ((.patch // "") | split("\n") | length)}'Length of output: 28948
I found no actionable findings. The change keeps the security boundary intact. The changed tests cover the important cases:
I could not independently run the focused tests, lint, or typecheck in this sandbox. The available GitHub check output only reports the CodeRabbit status. ✅ Action performedReview finished.
|
|
Warning Review limit reachedNext included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ 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 20841bcbd84e2e1348124e25385a9c25b3059fde and 0b6bf7c. 📒 Files selected for processing (3)
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 757361f171c7be7802ffb72174939e9470bdd8d2 and 20841bcbd84e2e1348124e25385a9c25b3059fde. 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughGitea now supports configured SSH host aliases for remote parsing, repository discovery, checkout validation, and pull-request access. Alias values are normalized, while API requests continue to use the configured HTTP(S) base URL. ChangesGitea SSH host aliases
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Gitea repositories can now use configured SSH host aliases while API calls and credentials remain restricted to the configured web address. The change includes alias, rejection, and pull-request access coverage, with no current merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant GiteaSourceControlProvider
participant giteaRepositoryFromRemote
participant GiteaPullRequestApi
participant Gitea HTTP API
GiteaSourceControlProvider->>giteaRepositoryFromRemote: parse remote with configured sshHosts
giteaRepositoryFromRemote-->>GiteaSourceControlProvider: resolve repository from SSH alias
GiteaSourceControlProvider->>GiteaPullRequestApi: request pull request
GiteaPullRequestApi->>Gitea HTTP API: GET configured API path
Gitea HTTP API-->>GiteaPullRequestApi: return pull-request data
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="7"
echo "== Pull request metadata =="
gh pr view "$pr" --repo "$repo" \
--json number,title,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,mergeable,changedFiles,additions,deletions
base_ref="$(gh pr view "$pr" --repo "$repo" --json baseRefName --jq .baseRefName)"
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
printf '\nbase_ref=%s\nbase_sha=%s\nhead_sha=%s\n' "$base_ref" "$base_sha" "$head_sha"
git fetch --no-tags origin "$base_ref" >/dev/null 2>&1 || true
merge_base="$(git merge-base "origin/$base_ref" HEAD)"
printf 'local_merge_base=%s\n' "$merge_base"
echo
echo "== Changed files =="
git diff --name-status "$merge_base"...HEAD
echo
echo "== Diff =="
git diff --find-renames --unified=60 "$merge_base"...HEAD
echo
echo "== Changed TypeScript outlines =="
git diff --name-only "$merge_base"...HEAD |
while IFS= read -r file; do
case "$file" in
*.ts|*.tsx)
echo "--- $file"
ast-grep outline "$file" --items all || true
;;
esac
done
echo
echo "== Related symbol call sites and configuration references =="
rg -n -C 8 --glob '*.ts' \
'(giteaRepositoryFromRemote\s*\(|new GiteaApi|GiteaPullRequestApi|T3CODE_GITEA_SSH_HOSTS|sshHosts|validateHost\s*\(|getPullRequest\s*\()' \
apps/server/src
echo
echo "== Changed and related test files =="
fd -t f -e ts . apps/server/src | rg '(Gitea.*\.test|giteaRepository.*\.test|SourceControlProvider.*\.test|PullRequest.*\.test)' |
sortLength of output: 2495 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="7"
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
echo "== Pull request patches =="
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" --jq \
'.[] | "===== \(.filename) =====\n\(.patch // "[no textual patch]")"'
echo
echo "== Current changed-file contents =="
gh api --paginate "repos/$repo/pulls/$pr/files?per_page=100" --jq -r '.[].filename' >"$tmp/changed.txt"
while IFS= read -r path; do
echo "===== HEAD: $path ====="
gh api "repos/$repo/contents/$path?ref=$head_sha" --jq .content | base64 --decode | cat -n
done <"$tmp/changed.txt"
echo
echo "== Base implementation contents =="
while IFS= read -r path; do
case "$path" in
apps/server/src/sourceControl/*.ts|apps/server/src/pullRequest/*.ts)
echo "===== BASE: $path ====="
gh api "repos/$repo/contents/$path?ref=$base_sha" --jq .content | base64 --decode | cat -n
;;
esac
done <"$tmp/changed.txt"
echo
echo "== Relevant head files outside the change set =="
for path in \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts
do
echo "===== HEAD: $path ====="
gh api "repos/$repo/contents/$path?ref=$head_sha" --jq .content | base64 --decode |
rg -n -C 18 '(request\s*=|request\(|validateHost|new URL|redirect|authorization|giteaRepositoryFromRemote|sshHosts|getPullRequest|baseUrl|apiRoot)'
done
echo
echo "== Relevant server call sites at head =="
gh api "repos/$repo/git/trees/$head_sha?recursive=1" --paginate --jq \
'.tree[].path | select(test("^apps/server/src/.*\\.ts$"))' >"$tmp/typescript.txt"
while IFS= read -r path; do
content="$(gh api "repos/$repo/contents/$path?ref=$head_sha" --jq .content | base64 --decode)"
if grep -qE 'giteaRepositoryFromRemote[[:space:]]*\(|GiteaPullRequestApi|T3CODE_GITEA_SSH_HOSTS' <<<"$content"; then
printf '===== %s =====\n' "$path"
grep -nE -C 6 'giteaRepositoryFromRemote[[:space:]]*\(|GiteaPullRequestApi|T3CODE_GITEA_SSH_HOSTS' <<<"$content"
fi
done <"$tmp/typescript.txt"Length of output: 12665 🏁 Script executed: #!/bin/bash
set -euo pipefail
base_sha="757361f171c7be7802ffb72174939e9470bdd8d2"
head_sha="20841bcbd84e2e1348124e25385a9c25b3059fde"
git fetch --no-tags origin "$base_sha" "$head_sha" >/dev/null 2>&1 || true
if git cat-file -e "${base_sha}^{commit}" 2>/dev/null &&
git cat-file -e "${head_sha}^{commit}" 2>/dev/null; then
echo "== Diff against current PR base =="
git diff --find-renames --unified=35 "$base_sha" "$head_sha" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts \
docs/user/source-control.md
echo
echo "== Complete changed implementation files at PR head =="
for path in \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/sourceControl/giteaRepository.ts
do
echo "===== $path ====="
git show "$head_sha:$path" | cat -n
done
echo
echo "== Relevant Gitea pull-request and reference code at PR head =="
git ls-tree -r --name-only "$head_sha" apps/server/src |
rg '\.ts$' |
while IFS= read -r path; do
if git show "$head_sha:$path" | grep -qE 'GiteaPullRequestApi|getPullRequest[[:space:]]*\(|giteaPullRequestNumber[[:space:]]*\('; then
echo "===== $path ====="
git show "$head_sha:$path" |
rg -n -C 10 'GiteaPullRequestApi|getPullRequest[[:space:]]*\(|giteaPullRequestNumber[[:space:]]*\('
fi
done
echo
echo "== Gitea-related test inventory at PR head =="
git ls-tree -r --name-only "$head_sha" apps/server/src |
rg '(Gitea|gitea).*\.test\.ts$' |
sort
else
echo "Could not fetch both immutable PR commits for local inspection." >&2
exit 1
fiLength of output: 214720
I found no actionable findings. The change keeps the authenticated API boundary intact:
The propagation in The tests cover configured aliases, case normalization, unconfigured hosts, SSH URL and SCP-style remote handling, and rejection of an HTTP request to an SSH-only host. I did not run tests, lint, or typecheck. The sandbox instructions prohibit execution of repository code. You are interacting with an AI system. |
20841bc to
0b6bf7c
Compare
|
@coderabbitai review Please review this PR at its exact current head in stack pingdotgg#6. Verify correctness, regressions, security boundaries, and focused coverage against its current base, and report any actionable findings with file references. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="7"
echo "== Current PR metadata =="
gh pr view "$pr" --repo "$repo" \
--json number,url,state,isDraft,title,baseRefName,baseRefOid,headRefName,headRefOid,mergeable,changedFiles,additions,deletions
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
printf '\nbase_sha=%s\nhead_sha=%s\n' "$base_sha" "$head_sha"
git fetch --no-tags origin "$base_sha" "$head_sha" >/dev/null 2>&1 || true
git cat-file -e "${base_sha}^{commit}"
git cat-file -e "${head_sha}^{commit}"
echo
echo "== Exact diff against current PR base =="
git diff --find-renames --unified=45 "$base_sha" "$head_sha"
echo
echo "== Changed files =="
git diff --name-status "$base_sha" "$head_sha"
echo
echo "== Changed TypeScript outlines =="
git diff --name-only "$base_sha" "$head_sha" |
while IFS= read -r path; do
case "$path" in
*.ts|*.tsx)
echo "--- $path"
git show "$head_sha:$path" >"/tmp/$(basename "$path")"
ast-grep outline "/tmp/$(basename "$path")" --items all || true
;;
esac
done
echo
echo "== Relevant current-head implementation and call sites =="
for path in \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts
do
if git cat-file -e "$head_sha:$path" 2>/dev/null; then
echo "===== $path ====="
git show "$head_sha:$path" | cat -n
fi
done
echo
echo "== All current-head Gitea parser and API call sites =="
git ls-tree -r --name-only "$head_sha" apps/server/src |
rg '\.(ts|tsx)$' |
while IFS= read -r path; do
if git show "$head_sha:$path" | rg -q \
'(giteaRepositoryFromRemote\s*\(|\.request\s*\(|getPullRequest\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS)'; then
echo "===== $path ====="
git show "$head_sha:$path" |
rg -n -C 8 \
'(giteaRepositoryFromRemote\s*\(|\.request\s*\(|getPullRequest\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS)'
fi
done
echo
echo "== Current GitHub checks =="
gh pr checks "$pr" --repo "$repo" || trueLength of output: 103365 🏁 Script executed: #!/bin/bash
set -euo pipefail
log="/tmp/coderabbit-shell-logs/shell-output-RSGFq9"
repo="RTVision/t3code"
pr="7"
echo "== Current immutable PR identity =="
gh pr view "$pr" --repo "$repo" \
--json url,baseRefName,baseRefOid,headRefName,headRefOid,isDraft,mergeable,changedFiles
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
echo
echo "== Changed paths and compact diff =="
git diff --name-status "$base_sha" "$head_sha"
git diff --unified=18 "$base_sha" "$head_sha" -- \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
docs/user/source-control.md
echo
echo "== Complete current parser and PR host-validation sections =="
git show "$head_sha:apps/server/src/sourceControl/giteaRepository.ts" | cat -n
git show "$head_sha:apps/server/src/pullRequest/GiteaPullRequestApi.ts" | sed -n '550,640p' | cat -n
git show "$head_sha:apps/server/src/sourceControl/GiteaApi.ts" | sed -n '1,270p' | cat -n
echo
echo "== Focused current-head call sites =="
git ls-tree -r --name-only "$head_sha" apps/server/src/sourceControl apps/server/src/pullRequest |
rg '\.ts$' |
while IFS= read -r path; do
matches="$(git show "$head_sha:$path" | rg -n -C 4 '(giteaRepositoryFromRemote\s*\(|GiteaPullRequestApi|sshHosts)')"
if [[ -n "$matches" ]]; then
printf '===== %s =====\n%s\n' "$path" "$matches"
fi
done
echo
echo "== Configuration documentation delta =="
git diff --unified=25 "$base_sha" "$head_sha" -- docs/user/source-control.md
echo
echo "== Relevant lines retained from prior output =="
rg -n -C 2 \
'Current PR metadata|base_sha=|head_sha=|^== Exact diff|^== Changed files|^===== apps/server/src/pullRequest/GiteaPullRequestApi.ts' \
"$log" | head -n 300Length of output: 46601
I found no actionable findings. The change preserves the API security boundary:
Propagation in The focused tests cover alias normalization, SCP-style and I did not run tests, lint, or typecheck because this sandbox cannot execute repository code. The available GitHub check output shows only the CodeRabbit status.
|
|
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. |
|
@coderabbitai approve The maintainer requests formal approval for the remaining PRs. Please assess the exact current head If branch configuration prevents formal approval, please state that explicitly. Independent Codex/Fable code verdicts are being refreshed separately; this request does not authorize merging or bypassing their findings. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="7"
requested_head="0b6bf7c20edb07f47180fd9385a2ac3375e73a2c"
echo "== Exact PR identity and merge state =="
gh pr view "$pr" --repo "$repo" \
--json number,url,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,mergeable,reviewDecision,reviews,statusCheckRollup
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
printf 'requested_head=%s\ncurrent_head=%s\ncurrent_base=%s\n' \
"$requested_head" "$head_sha" "$base_sha"
if [[ "$head_sha" != "$requested_head" ]]; then
echo "ERROR: The current PR head differs from the requested head." >&2
exit 2
fi
git fetch --no-tags origin "$base_sha" "$head_sha" >/dev/null 2>&1
git cat-file -e "${base_sha}^{commit}"
git cat-file -e "${head_sha}^{commit}"
echo
echo "== Exact changed paths and diff =="
git diff --name-status "$base_sha" "$head_sha"
git diff --find-renames --unified=50 "$base_sha" "$head_sha" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/giteaRepository.test.ts \
docs/user/source-control.md
echo
echo "== Current implementation outlines =="
for path in \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts
do
echo "--- $path"
git show "$head_sha:$path" > "/tmp/$(basename "$path")"
ast-grep outline "/tmp/$(basename "$path")" --items all || true
done
echo
echo "== Host validation, API request boundary, and parser call sites =="
git ls-tree -r --name-only "$head_sha" apps/server/src |
rg '\.(ts|tsx)$' |
while IFS= read -r path; do
content="$(git show "$head_sha:$path")"
if rg -q '(giteaRepositoryFromRemote\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS|validateHost\s*\(|GiteaPullRequestApi|new URL|redirect)' <<<"$content"; then
printf '===== %s =====\n' "$path"
rg -n -C 7 '(giteaRepositoryFromRemote\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS|validateHost\s*\(|GiteaPullRequestApi|new URL|redirect)' <<<"$content"
fi
done
echo
echo "== Focused tests at the exact head =="
for path in \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts
do
echo "===== $path ====="
git show "$head_sha:$path" | cat -n
done
echo
echo "== Repository CodeRabbit configuration candidates =="
fd -HI -t f '(^|/)(\.coderabbit\.ya?ml|coderabbit\.ya?ml)$|^\.github' . \
-x sh -c 'echo "===== $1 ====="; cat "$1"' sh {} 2>/dev/null || trueLength of output: 242207
I found no blockers.
The focused tests cover the changed security boundary and expected alias behavior. The repository configuration disables automatic review and review-status publication. It does not show a setting that prevents this explicit approval action. I did not execute repository tests, lint, or typecheck in this sandbox. [approve] You are interacting with an AI system. |
|
Merge verdict: NO-GO. This supersedes the earlier quota-only readiness comment. Reviewed head:
Validation: 339 focused integrated PR tests plus 502 cross-provider tests passed at integration head No merge is authorized while any blocker or required approval is outstanding. Recheck the resulting head and current base after corrections or stack merges. This PR also belongs to the native Gitea stack: merging it would merge lower open members, including blocked #4/#5. Those predecessor gates must pass too. |
|
GO on the individual change — merge blocked by stack Reviewed commit: Codex and Claude Fable 5.1 both approve the SSH-host recognition change: aliases widen remote recognition while API requests continue to use the configured base URL. GitHub native-stack merging includes preceding PRs. Merging this PR would also merge #5, whose required downstream fixes are not yet cleared. Hold the merge until that dependency is cleared. 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
repo="RTVision/t3code"
pr="7"
requested_head="63cb01d96dccba6a09435e03d9384418993c02bc"
echo "== PR identity, head, base, and review state =="
gh pr view "$pr" --repo "$repo" \
--json number,url,state,isDraft,title,baseRefName,baseRefOid,headRefName,headRefOid,mergeable,reviewDecision,reviews,statusCheckRollup
base_sha="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head_sha="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
printf '\nrequested_head=%s\ncurrent_head=%s\ncurrent_base=%s\n' \
"$requested_head" "$head_sha" "$base_sha"
if [[ "$head_sha" != "$requested_head" ]]; then
echo "ERROR: Requested commit is not the current PR head." >&2
exit 2
fi
git fetch --no-tags origin "$base_sha" "$head_sha" >/dev/null 2>&1 || true
git cat-file -e "${base_sha}^{commit}"
git cat-file -e "${head_sha}^{commit}"
echo
echo "== Changes against the exact current base =="
git diff --name-status "$base_sha" "$head_sha"
git diff --find-renames --unified=45 "$base_sha" "$head_sha"
echo
echo "== Changed TypeScript outlines =="
git diff --name-only "$base_sha" "$head_sha" |
while IFS= read -r path; do
case "$path" in
*.ts|*.tsx)
echo "--- $path"
git show "$head_sha:$path" >"/tmp/$(basename "$path")"
ast-grep outline "/tmp/$(basename "$path")" --items all || true
;;
esac
done
echo
echo "== Security-sensitive implementation and call sites at current head =="
for path in \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
do
if git cat-file -e "$head_sha:$path" 2>/dev/null; then
echo "===== $path ====="
git show "$head_sha:$path" | cat -n
fi
done
echo
echo "== All Gitea host-recognition and authenticated-request references =="
git ls-tree -r --name-only "$head_sha" apps/server/src |
rg '\.(ts|tsx)$' |
while IFS= read -r path; do
content="$(git show "$head_sha:$path")"
if rg -q '(giteaRepositoryFromRemote\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS|validateHost\s*\(|GiteaPullRequestApi|GiteaApi|new URL|redirect|authorization)' <<<"$content"; then
printf '===== %s =====\n' "$path"
rg -n -C 8 '(giteaRepositoryFromRemote\s*\(|sshHosts|T3CODE_GITEA_SSH_HOSTS|validateHost\s*\(|GiteaPullRequestApi|GiteaApi|new URL|redirect|authorization)' <<<"$content"
fi
done
echo
echo "== Repository CodeRabbit configuration =="
fd -HI -t f '(^|/)(\.coderabbit\.ya?ml|coderabbit\.ya?ml)$' . \
-x sh -c 'echo "===== $1 ====="; cat "$1"' sh {} 2>/dev/null || true
echo
echo "== Checks =="
gh pr checks "$pr" --repo "$repo" || trueLength of output: 107100 🏁 Script executed: #!/bin/bash
set -euo pipefail
log="/tmp/coderabbit-shell-logs/shell-output-PmPnHy"
repo="RTVision/t3code"
pr="7"
head="63cb01d96dccba6a09435e03d9384418993c02bc"
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
echo "== Extracted PR identity from prior log =="
rg -n -C 3 'requested_head=|current_head=|current_base=|ERROR: Requested|== Changes against' "$log" | head -n 80 || true
echo
echo "== Exact changed paths =="
git diff --name-status "$base" "$head"
echo
echo "== Exact compact diff =="
git diff --find-renames --unified=25 "$base" "$head" -- \
apps/server/src/sourceControl/GiteaApi.ts \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/sourceControl/GiteaApi.test.ts \
apps/server/src/sourceControl/giteaRepository.test.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.test.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
docs/user/source-control.md
echo
echo "== Exact parser, provider, and pull-request host validation =="
for path in \
apps/server/src/sourceControl/giteaRepository.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.ts
do
echo "===== $path ====="
git show "$head:$path" | cat -n
done
echo
echo "== Focused test cases added or modified by this PR =="
for path in \
apps/server/src/sourceControl/giteaRepository.test.ts \
apps/server/src/sourceControl/GiteaSourceControlProvider.test.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts \
apps/server/src/sourceControl/GiteaApi.test.ts
do
echo "===== $path ====="
git diff --unified=18 "$base" "$head" -- "$path"
done
echo
echo "== Calls that pass an optional sshHosts value =="
git grep -n -E 'giteaRepositoryFromRemote\(' "$head" -- apps/server/srcLength of output: 131516
I found no blockers. The SSH-host allowlist remains limited to SSH remote recognition and pull-request host validation. The provider passes I did not run repository tests, lint, or typecheck in this sandbox. [approve] You are interacting with an AI system. |
|
@coderabbitai approve Your completed source review reports no remaining blockers at |
Rate Limit Exceeded
|
|
Re-review: GO on the change; NO-GO for merging the current stack Reviewed head: SSH aliases remain confined to remote recognition; authenticated API requests retain the configured base URL. The head includes #5's repairs. Codex, Fable, and CodeRabbit approve the change. Fable 5.1: GO on the individual change. Its native-stack predecessor #5 conflicts with rtvision. GitHub's asynchronous stack merge includes that predecessor, so this PR cannot currently land independently. Reconcile and re-review the stack first. 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: The repaired head is tree-identical to rtvision; configured SSH-host support is already present and the earlier base conflict is resolved. 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: |
Gitea installations can use a separate SSH hostname or a local SSH alias. Add an explicit
T3CODE_GITEA_SSH_HOSTSsetting so repository discovery and pull-request reads recognize those remotes while API credentials remain restricted to the configured web root.Validation: 62 focused tests, targeted lint, and server typecheck passed.
Final stack validation at
256fd6fe5: 228 focused tests passed, followed by 61 API/workflow cases and the final team-recovery regression; server typecheck and targeted lint passed. The live settle-on-merge E2E previously passed with fixture cleanup. Companion Gitea backend and focused integration tests passed, including native revert across all five merge styles.Model: GPT-6 Astra. Harness: Codex.
Summary by CodeRabbit
New Features
T3CODE_GITEA_SSH_HOSTS, while API requests continue using the configured web address.Documentation