Repository navigation
fix(pull-requests): require affirmative Gitea action metadata - #16
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reachedNext included review available in 2 minutes. 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: 📒 Files selected for processing (2)
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 b70a0f92d28a98304f278e5f019755492fac6915 and 9256637b38e46d9ec4cd70055481b0a22c90c8b2. 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe Gitea pull-request API now requires explicit repository permissions for access capabilities and returns no checks for blank commit revisions without making a request. ChangesGitea API validation
Merge Risk: ⚪ Minimal · up to Gitea pull requests now expose write and merge actions only when affirmative metadata is available, and missing head revisions no longer trigger invalid status requests. The changed behaviors are covered by focused regression tests and present no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
9256637 to
dfd06ae
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. |
|
|
|
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
echo "== revision =="
git rev-parse HEAD
git status --short
git branch --show-current
git remote -v | head -4
echo "== refs and merge base candidates =="
git show -s --format='HEAD %H%nparents %P%nsubject %s' HEAD
git branch -a --contains HEAD || true
git for-each-ref --format='%(refname:short) %(objectname)' refs/remotes refs/heads | sed -n '1,160p'
echo "== changed files against candidate base =="
for ref in origin/gitea/revert gitea/revert origin/main main; do
if git rev-parse --verify -q "$ref" >/dev/null; then
mb="$(git merge-base HEAD "$ref")"
echo "--- $ref (merge-base $mb) ---"
git diff --stat "$mb"..HEAD
git diff --name-status "$mb"..HEAD
fi
done
echo "== affected file outlines =="
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --view expanded
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.test.ts --view expanded
echo "== implementation and test excerpts =="
nl -ba apps/server/src/pullRequest/GiteaPullRequestApi.ts | sed -n '1,360p'
nl -ba apps/server/src/pullRequest/GiteaPullRequestApi.test.ts | sed -n '1,460p'
echo "== exact diff against gitea/revert when present =="
if git rev-parse --verify -q origin/gitea/revert >/dev/null; then
mb="$(git merge-base HEAD origin/gitea/revert)"
git diff --find-renames --find-copies --unified=80 "$mb"..HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
elif git rev-parse --verify -q gitea/revert >/dev/null; then
mb="$(git merge-base HEAD gitea/revert)"
git diff --find-renames --find-copies --unified=80 "$mb"..HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
fi
echo "== targeted symbol references =="
rg -n -C 4 -P '\b(listChecks|repositorySettings|canMerge|canUpdate|permissions)\b' \
apps/server/src/pullRequest --glob '*.ts'Length of output: 20851 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== GitHub PR metadata =="
gh api repos/RTVision/t3code/pulls/16 \
--jq '{number, state, draft, head: {ref: .head.ref, sha: .head.sha}, base: {ref: .base.ref, sha: .base.sha}, mergeable, mergeable_state}'
echo "== commit scope relative to first parent =="
parent="$(git rev-parse HEAD^)"
printf 'parent=%s\n' "$parent"
git diff --stat "$parent"..HEAD
git diff --name-status "$parent"..HEAD
git diff --find-renames --find-copies --unified=100 "$parent"..HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
echo "== API schemas, conversion, and service methods =="
sed -n '45,345p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '630,1100p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '1100,1600p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '1600,2085p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
echo "== focused test sections =="
sed -n '1,260p' apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
sed -n '260,700p' apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
sed -n '700,1250p' apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
sed -n '1250,1800p' apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
echo "== Gitea API request and repository schemas =="
ast-grep outline apps/server/src/sourceControl/GiteaApi.ts --view expanded
sed -n '1,340p' apps/server/src/sourceControl/GiteaApi.ts
echo "== consumer call sites for affected service APIs =="
rg -n -C 5 -P '\.(getRepositoryAccess|listChecks|merge|updateBranch)\s*\(' \
apps/server/src --glob '*.ts'Length of output: 206161 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Gitea provider access and action mapping =="
sed -n '175,275p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
sed -n '310,380p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
echo "== permission model types =="
rg -n -C 5 -P '\b(interface|type)\s+(ProviderChangeRequestDetail|ProviderViewerPermissions|PullRequestMergeCapabilities)|\b(canWrite|mergeCapabilities|updateMethods)\b' \
apps/server/src/pullRequest packages/contracts/src --glob '*.ts'
echo "== current PR checks and review state =="
gh api repos/RTVision/t3code/commits/dfd06aec5894829f715dac7d8584f62bfe7588c4/check-runs \
-H 'Accept: application/vnd.github+json' \
--jq '{total_count, check_runs: [.check_runs[] | {name, status, conclusion, started_at, completed_at, details_url}]}'
gh api repos/RTVision/t3code/pulls/16/reviews \
--jq '[.[] | {user: .user.login, state, commit_id, submitted_at, body}]'
gh api repos/RTVision/t3code/branches/gitea/revert/protection \
--jq '{required_pull_request_reviews: .required_pull_request_reviews, required_status_checks: .required_status_checks}' \
2>&1 || trueLength of output: 109363
I reviewed head The change correctly requires affirmative Gitea metadata before it exposes write, merge, or branch-update capabilities. The permission mapping preserves this restriction. The blank head-SHA guard prevents the invalid commit-status request in the pull-request detail path. Focused tests cover both cases. I found no remaining actionable blockers. GitHub currently reports no check runs for this commit. I could not execute repository tests 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. |
|
NO-GO now — inherited type failures Reviewed commit: The affirmative permission metadata and empty-SHA guards are correct and necessary. This head still inherits the type failures fixed by #22. Fable gives conditional GO with #22; Codex holds the current merge candidate. Include the type fixes and rerun the scoped server typecheck. Clear the native-stack predecessors before merging. 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
requested_sha='51126d39ea6a258f6b1dd86912a7a7ddea37a762'
echo '== Repository and requested commit =='
git rev-parse HEAD
git status --short
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$requested_sha"
git merge-base --is-ancestor "$requested_sha" HEAD && echo 'requested_sha_is_ancestor_of_checked_out_HEAD=true' || true
echo '== Pull request metadata =='
gh api repos/RTVision/t3code/pulls/16 \
--jq '{number,state,draft,head:{ref:.head.ref,sha:.head.sha},base:{ref:.base.ref,sha:.base.sha},mergeable,mergeable_state}'
base_sha="$(gh api repos/RTVision/t3code/pulls/16 --jq '.base.sha')"
head_sha="$(gh api repos/RTVision/t3code/pulls/16 --jq '.head.sha')"
printf 'base_sha=%s\nhead_sha=%s\n' "$base_sha" "$head_sha"
echo '== Diff summary and changed paths at requested head =='
git diff --stat "$base_sha...$requested_sha"
git diff --name-status "$base_sha...$requested_sha"
git diff --find-renames --find-copies --unified=100 "$base_sha...$requested_sha" -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
echo '== File outlines =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --view expanded
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.test.ts --view expanded
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestProvider.ts --view expanded
ast-grep outline apps/server/src/sourceControl/GiteaApi.ts --view expanded
echo '== Relevant implementation, schema, and provider mapping =='
rg -n -C 12 -P '\b(listChecks|getRepositoryAccess|repositorySettings|canMerge|canUpdate|permissions|allow_merge|head\.sha|headSha)\b' \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.ts \
apps/server/src/sourceControl/GiteaApi.ts
echo '== Relevant tests =='
rg -n -C 14 -P '\b(listChecks|getRepositoryAccess|repositorySettings|canMerge|canUpdate|permissions|allow_merge|blank|empty|head)\b' \
apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
echo '== Call sites and permission contracts =='
rg -n -C 6 -P '\.(getRepositoryAccess|listChecks|merge|updateBranch)\s*\(|\b(canWrite|mergeCapabilities|updateMethods)\b' \
apps/server/src packages/contracts --glob '*.ts'
echo '== Requested-head checks and reviews =='
gh api "repos/RTVision/t3code/commits/$requested_sha/check-runs" \
-H 'Accept: application/vnd.github+json' \
--jq '{total_count,check_runs:[.check_runs[]|{name,status,conclusion}]}'
gh api repos/RTVision/t3code/pulls/16/reviews \
--jq '[.[]|{user:.user.login,state,commit_id,submitted_at}]'Length of output: 194970 🏁 Script executed: #!/bin/bash
set -euo pipefail
log='/tmp/coderabbit-shell-logs/shell-output-8CjgtJ'
requested_sha='51126d39ea6a258f6b1dd86912a7a7ddea37a762'
previous_sha='dfd06aec5894829f715dac7d8584f62bfe7588c4'
echo '== Extracted first-command metadata =='
sed -n '1,180p' "$log"
echo '== Requested-head commits since the prior reviewed head =='
git log --format='%H%n%P%n%s%n%b%n---' "$previous_sha..$requested_sha"
echo '== Complete changed paths, prior head to requested head =='
git diff --name-status "$previous_sha..$requested_sha"
git diff --stat "$previous_sha..$requested_sha"
git diff --find-renames --find-copies --unified=60 "$previous_sha..$requested_sha"
echo '== Current PR comparison at requested head =='
base_sha="$(gh api repos/RTVision/t3code/pulls/16 --jq '.base.sha')"
git diff --name-status "$base_sha...$requested_sha"
git diff --stat "$base_sha...$requested_sha"
echo '== TypeScript project configuration and affected type references =='
fd -a 'tsconfig.*json|package.json' apps/server | sort | sed -n '1,120p'
rg -n -C 8 -P '\b(GiteaRepositoryAccess|GiteaPullRequestApi|PullRequestUpdateMethod|PullRequestMergeCapabilities)\b' \
apps/server/src/pullRequest packages/contracts/src --glob '*.ts'
echo '== Review state at requested head =='
gh api repos/RTVision/t3code/pulls/16 \
--jq '{head:.head.sha,base:.base.sha,state,mergeable,mergeable_state}'
gh api "repos/RTVision/t3code/commits/$requested_sha/status" \
--jq '{state,total_count,statuses:[.statuses[]|{context,state,description,target_url}]}' || trueLength of output: 202048 🏁 Script executed: #!/bin/bash
set -euo pipefail
requested_sha='51126d39ea6a258f6b1dd86912a7a7ddea37a762'
previous_sha='dfd06aec5894829f715dac7d8584f62bfe7588c4'
echo '== Commit sequence =='
git log --reverse --format='%H %P%n%s%n%b%n---' "$previous_sha..$requested_sha"
echo '== Changed paths after previous head =='
git diff --name-status "$previous_sha..$requested_sha"
echo '== Per-file changed line ranges =='
git diff --unified=0 "$previous_sha..$requested_sha" -- \
| rg -n '^(diff --git|@@)' || true
echo '== Exact post-fix diff =='
git diff --find-renames --find-copies --unified=25 "$previous_sha..$requested_sha"
echo '== Full PR changed-path list =='
base_sha="$(gh api repos/RTVision/t3code/pulls/16 --jq '.base.sha')"
git diff --name-status "$base_sha...$requested_sha"
echo '== Exact RawRepository declaration =='
rg -n -A70 -B10 '^const RawRepository\b|^export const RawRepository\b|^const Raw.*Repository\b' \
apps/server/src/pullRequest/GiteaPullRequestApi.ts
echo '== Exact viewer-permission assembly =='
sed -n '65,95p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
sed -n '190,250p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
sed -n '325,370p' apps/server/src/pullRequest/GiteaPullRequestProvider.tsLength of output: 96281
I reviewed this head against current base The current PR diff is limited to The access mapping now requires affirmative Gitea metadata before it enables write, merge, or branch-update capabilities. The provider preserves that restriction when it creates viewer permissions. The blank-SHA guard returns no checks before any commit-status request is made. Focused tests cover incomplete settings, permission variants, and the blank-SHA path. I found no remaining actionable blockers. GitHub reports the PR as clean and mergeable. The only status is the skipped CodeRabbit status. I could not run repository tests in this sandbox. [approve] You are interacting with an AI system. |
|
Re-review: GO on the access guards; NO-GO for merging now Reviewed head: The affirmative permission mapping and blank-head-SHA check are correct. The inherited inference fixes are now present. CodeRabbit approves the incremental change. Fable 5.1: GO on the individual change. Clear the inherited #9/#10/#12 behavior defects and the #5 integration conflict before merging the native-stack prefix. 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. |
# Conflicts: # apps/server/src/pullRequest/GiteaPullRequestApi.test.ts
|
GO — merged after Codex, Fable 5.1, and CodeRabbit review. Reviewed head: Affirmative permission and capability metadata guards are retained; this head adds no new tree changes over its predecessor. 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: |
Incomplete Gitea repository responses no longer advertise write access or enabled merge/update methods without affirmative metadata. A PR whose head revision is unavailable can still open its detail without requesting an invalid commit-status URL.
Focused regression cases cover incomplete repository metadata and a missing head revision. Final integrated server typecheck and targeted lint pass.
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