Skip to content

feat(source-control): recognize configured Gitea SSH hosts - #7

Merged
kalvenschraut merged 2 commits into
gitea/pull-requestsfrom
gitea/ssh-hosts
Sep 8, 2026
Merged

kalvenschraut merged 2 commits into
gitea/pull-requestsfrom
gitea/ssh-hosts

Conversation

@kalvenschraut

@kalvenschraut kalvenschraut commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

Gitea installations can use a separate SSH hostname or a local SSH alias. Add an explicit T3CODE_GITEA_SSH_HOSTS setting 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

    • Gitea integrations now support configured SSH hostnames and aliases for repository discovery, validation, pull requests, and checkouts.
    • SSH aliases can be configured through T3CODE_GITEA_SSH_HOSTS, while API requests continue using the configured web address.
    • SSH host configuration supports comma- or whitespace-separated values and is case-insensitive.
  • Documentation

    • Added guidance for supported Gitea SSH remote formats and hostname configuration.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please evaluate correctness, regressions, security boundaries, and test coverage against the existing source-control and pull-request integrations. For this fork, main is the clean upstream mirror and rtvision is the integration branch. Review the changes in this PR against its current base; report actionable findings with file references.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
🧩 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


@kalvenschraut I reviewed #7 against its current base, gitea/pull-requests.

I found no actionable findings.

The change keeps the security boundary intact. T3CODE_GITEA_SSH_HOSTS applies only to SSH remote recognition and the pull-request host identity. GiteaApi.request still constructs authenticated requests from T3CODE_GITEA_BASE_URL. It rejects cross-origin URLs, paths outside the configured API root, and redirects.

The changed tests cover the important cases:

  • SSH alias and separate SSH hostname recognition.
  • Case normalization.
  • Rejection of unconfigured SSH hosts.
  • Rejection of HTTP API requests to SSH-only hosts.
  • Pull-request reads through relative API paths.

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

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit 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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b6853d03-bc80-4d7b-b4b4-2c6522b870b7

📥 Commits

Reviewing files that changed from the base of the PR and between 20841bcbd84e2e1348124e25385a9c25b3059fde and 0b6bf7c.

📒 Files selected for processing (3)
  • apps/server/src/sourceControl/GiteaApi.test.ts
  • apps/server/src/sourceControl/GiteaApi.ts
  • apps/server/src/sourceControl/GiteaSourceControlProvider.ts

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: 62ceba1b-b062-4bfd-9f92-17a32a3ff097

📥 Commits

Reviewing files that changed from the base of the PR and between 757361f171c7be7802ffb72174939e9470bdd8d2 and 20841bcbd84e2e1348124e25385a9c25b3059fde.

📒 Files selected for processing (8)
  • apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
  • apps/server/src/pullRequest/GiteaPullRequestApi.ts
  • apps/server/src/sourceControl/GiteaApi.test.ts
  • apps/server/src/sourceControl/GiteaApi.ts
  • apps/server/src/sourceControl/GiteaSourceControlProvider.ts
  • apps/server/src/sourceControl/giteaRepository.test.ts
  • apps/server/src/sourceControl/giteaRepository.ts
  • docs/user/source-control.md

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


📝 Walkthrough

Walkthrough

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

Changes

Gitea SSH host aliases

Layer / File(s) Summary
Alias configuration and remote parsing
apps/server/src/sourceControl/GiteaApi.ts, apps/server/src/sourceControl/giteaRepository.ts, apps/server/src/sourceControl/giteaRepository.test.ts, docs/user/source-control.md
T3CODE_GITEA_SSH_HOSTS is normalized into SSH aliases. SCP-style and ssh: remotes accept the configured aliases. HTTP API requests continue to use the configured web address.
Repository and checkout integration
apps/server/src/sourceControl/GiteaSourceControlProvider.ts
Repository discovery, resolution, workspace scanning, and pull-request checkout pass the configured SSH aliases to remote validation.
API host validation
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestApi.test.ts, apps/server/src/sourceControl/GiteaApi.test.ts
Pull-request host validation accepts configured aliases. Tests verify alias-based pull-request reads, HTTP destination separation, authentication targeting, and rejected network calls.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 20841

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (1 skipped: 1 …
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.
Title check ✅ Passed The title clearly and concisely describes the main change: recognizing configured Gitea SSH hosts.
Description check ✅ Passed The description explains what changed, why it changed, and reports validation results. It does not use the template headings or include the checklist, but the required change rationale is present and …
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gitea/ssh-hosts

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

@coderabbitai

coderabbitai Bot commented Sep 5, 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

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)' |
sort

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

Length of output: 214720


@kalvenschraut I reviewed #7 against its current base, gitea/pull-requests.

I found no actionable findings.

The change keeps the authenticated API boundary intact:

  • T3CODE_GITEA_SSH_HOSTS is used only for SSH remote recognition and pull-request host identity.
  • GiteaApi.request still builds authenticated requests from T3CODE_GITEA_BASE_URL.
  • GiteaApi.request rejects cross-origin URLs and paths outside the configured API root.
  • GiteaApi.request does not follow redirects.
  • HTTP(S) remotes on SSH-only hosts remain rejected.

The propagation in apps/server/src/sourceControl/GiteaSourceControlProvider.ts covers discovery, repository resolution, remote scanning, and PR checkout validation.

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.

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

Copy link
Copy Markdown
Member Author

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

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
🧩 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" || true

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

Length of output: 46601


@kalvenschraut I reviewed #7 at current head 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c against current base bb83768f193c152ca34e5e8afba5b8fb2aef7d7c (gitea/pull-requests).

I found no actionable findings.

The change preserves the API security boundary:

  • T3CODE_GITEA_SSH_HOSTS applies to SSH remote recognition and pull-request host identity.
  • apps/server/src/sourceControl/GiteaApi.ts still sends authenticated requests only to T3CODE_GITEA_BASE_URL.
  • GiteaApi.request rejects cross-origin URLs, paths outside the configured API root, credential-bearing URLs, and redirects.
  • apps/server/src/sourceControl/giteaRepository.ts accepts configured aliases only for SCP-style and ssh: remotes. HTTPS remotes remain restricted to the configured web origin and path.

Propagation in apps/server/src/sourceControl/GiteaSourceControlProvider.ts covers remote discovery, explicit repository resolution, remote scanning, and pull-request checkout validation.

The focused tests cover alias normalization, SCP-style and ssh: alias remotes, case normalization, unconfigured aliases, traversal rejection, and rejection of HTTP requests to SSH-only hosts.

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.

⚠️ 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

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

Head: 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c.

  • 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: No formal APPROVED review. The successful CodeRabbit status check does not satisfy the requested approval gate. This branch has not enabled reviews.request_changes_workflow; the existing CodeRabbit replies on this series identify that configuration as preventing formal approvals.
  • GitHub merge state: MERGEABLE / CLEAN against gitea/pull-requests.
  • 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

Copy link
Copy Markdown
Member Author

@coderabbitai approve

The maintainer requests formal approval for the remaining PRs. Please assess the exact current head 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c and submit APPROVED only if your review has no remaining blockers. If there is a blocker, leave its concrete reason and the fix required instead. A successful status check alone does not meet this merge gate.

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.

@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

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 || true

Length of output: 242207


@kalvenschraut I reviewed #7 at head 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c against base bb83768f193c152ca34e5e8afba5b8fb2aef7d7c.

I found no blockers.

T3CODE_GITEA_SSH_HOSTS is limited to SSH remote recognition and pull-request host validation. Authenticated API requests remain limited to T3CODE_GITEA_BASE_URL and its API root. Cross-origin URLs, paths outside that root, credential-bearing URLs, and redirects remain rejected.

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.

@kalvenschraut

Copy link
Copy Markdown
Member Author

Merge verdict: NO-GO. This supersedes the earlier quota-only readiness comment.

Reviewed head: 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c; declared destination: gitea/pull-requests.

  • Codex: GO. SSH aliases remain confined to SSH remote recognition; API credentials remain scoped to the configured Gitea origin. No blocking defect found in this change.
  • Fable 5.1 / Claude CLI: GO, completed independent review of 0b6bf7c20edb.
  • CodeRabbit: No formal GitHub APPROVED review on this head. Approval was requested. Some bot replies say “Approved” or contain [approve], but the GitHub review records do not contain an approval; this does not pass the requested gate. The original branch configuration does not enable reviews.request_changes_workflow.

Validation: 339 focused integrated PR tests plus 502 cross-provider tests passed at integration head 6114cf39; the integrated server typecheck passed. These checks validate the integrated implementation, not every earlier PR snapshot. The original #12 compiler failure was reproduced separately.

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.

@kalvenschraut

Copy link
Copy Markdown
Member Author

GO on the individual change — merge blocked by stack

Reviewed commit: 0b6bf7c20edb07f47180fd9385a2ac3375e73a2c.

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 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 63cb01d96dccba6a09435e03d9384418993c02bc 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

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" || true

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

Length of output: 131516


@kalvenschraut I reviewed #7 at current head 63cb01d96dccba6a09435e03d9384418993c02bc against current base ed9291396d36a3b71106512e7a44dafc2273e8c7.

I found no blockers.

The SSH-host allowlist remains limited to SSH remote recognition and pull-request host validation. GiteaApi.request continues to send authenticated requests only to T3CODE_GITEA_BASE_URL and its API root. The implementation still rejects cross-origin URLs, paths outside the API root, credential-bearing URLs, and redirects.

The provider passes sshHosts through discovery, repository resolution, remote scanning, and PR checkout validation. The focused tests cover alias normalization, alias pull-request reads, SSH URL parsing, unconfigured hosts, traversal paths, and rejection of HTTP requests to SSH-only hosts.

I did not run repository tests, lint, or typecheck in this sandbox.

[approve]

You are interacting with an AI system.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

Your completed source review reports no remaining blockers at 63cb01d96dccba6a09435e03d9384418993c02bc. Please record that completed review as a formal GitHub approval on this exact head, as your reply instructed. If the head changed or you identify a remaining blocker, do not approve; explain the outstanding issue instead.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

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

@kalvenschraut

Copy link
Copy Markdown
Member Author

Re-review: GO on the change; NO-GO for merging the current stack

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

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 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: 497b223b85869d7d41b5c5374f2eb8622ee202f0. This supersedes my previous decision on the older 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 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: f787a611cffccbdf0fd5e593bba8f615c607f532 at 2026-09-08T04:42:45Z. This PR merged in the 17-member Gitea batch into rtvision; the six dependency PRs followed as one reviewed batch. Final rtvision commit is 20926b20ed4ea72618f7608f70b1d4cea8e40053; its tree 9a0e0253b515456f6a117be5ebccf2cd8e911b01 exactly matches tested integration head #36.

@kalvenschraut
kalvenschraut merged commit f787a61 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