Repository navigation
fix(pull-requests): preserve Gitea schema inference - #22
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reachedNext included review available in 18 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 (1)
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: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughGitea pull-request searches and feature lookups now use explicit boolean and read-only string-array types. Permission flags use explicit booleans. Workflow tests encode mocked responses with Effect Schema. ChangesGitea type normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change makes Gitea capability and permission fallbacks type-safe and updates workflow mocks to use schema-based JSON encoding. No current merge-blocking product or production risk is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review The final typed error-recovery fix is pushed. Server typecheck, targeted lint, and the affected team-endpoint regression pass. |
|
|
|
@coderabbitai approve |
✅ Action performedComments resolved. Approval is disabled; enable |
|
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 '== Checked-out commit =='
git rev-parse HEAD
git status --short
echo '== Pull request metadata =='
gh pr view 22 --repo RTVision/t3code --json number,headRefOid,baseRefName,headRefName,state,mergeStateStatus,statusCheckRollup,reviews \
--jq '{number, headRefOid, baseRefName, headRefName, state, mergeStateStatus, reviews: [.reviews[] | {author: .author.login, state, commit: .commit.oid}], checks: [.statusCheckRollup[] | {name, status: .status, conclusion: .conclusion}]}'
echo '== Requested commit and PR diff =='
git cat-file -e 256fd6fe51ce3e481eaed824fa585becd6bb9e2f^{commit}
git diff --check origin/gitea/team-reviewers...256fd6fe51ce3e481eaed824fa585becd6bb9e2f
git diff --find-renames --find-copies --unified=80 origin/gitea/team-reviewers...256fd6fe51ce3e481eaed824fa585becd6bb9e2f -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.ts \
apps/server/src/pullRequest/GiteaWorkflows.test.ts
echo '== Affected file outlines =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestProvider.ts --items all
ast-grep outline apps/server/src/pullRequest/GiteaWorkflows.test.ts --items all
echo '== Recovery and includeTracking contexts =='
rg -n -C 8 --glob 'GiteaPullRequestApi.ts' --glob 'GiteaPullRequestProvider.ts' \
'getFeatures|includeTracking|ReadonlyArray<string>|catch|orElse' apps/server/src/pullRequest
echo '== JSON encoding test contexts =='
rg -n -C 8 --glob 'GiteaWorkflows.test.ts' \
'Schema|JSON\.stringify|encode|Gitea' apps/server/src/pullRequestLength of output: 2617 ⚙️ CodeRabbit configuration inspected Length of output: 5505 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="22"
echo '== PR changed-file metadata =='
gh api "repos/${repo}/pulls/${pr}/files?per_page=100" \
--jq '.[] | {filename, status, additions, deletions, previous_filename, patch}'
echo '== PR patch =='
gh pr diff "$pr" --repo "$repo" --patch
echo '== Commit parent and changed paths =='
git show -s --format='commit=%H%nparents=%P%nsubject=%s' HEAD
git diff-tree --no-commit-id --name-status -r HEAD
echo '== File outlines =='
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestApi.ts --items all
ast-grep outline apps/server/src/pullRequest/GiteaPullRequestProvider.ts --items all
ast-grep outline apps/server/src/pullRequest/GiteaWorkflows.test.ts --items all
echo '== Changed source contexts =='
git diff-tree --no-commit-id --name-only -r HEAD | while IFS= read -r file; do
echo "----- ${file} -----"
git diff --unified=100 HEAD^ HEAD -- "$file"
done
echo '== Relevant implementation contexts =='
rg -n -C 12 --glob 'GiteaPullRequestApi.ts' --glob 'GiteaPullRequestProvider.ts' \
'(getFeatures|includeTracking|listReactions|createReaction|deleteReaction|setDraft|autoMerge|ReadonlyArray<string>)' \
apps/server/src/pullRequest
echo '== Workflow fixture encoding contexts =='
rg -n -C 12 --glob 'GiteaWorkflows.test.ts' \
'(Schema\.encode|JSON\.stringify|HttpServerResponse|Gitea)' \
apps/server/src/pullRequestLength of output: 97408
I found no code blocker in this diff. The boolean and feature-array recovery changes preserve the intended types. The team recovery change retains the 405-only fallback. The workflow fixtures now use the Effect Schema JSON encoder. I cannot submit a formal APPROVED review. The current CodeRabbit configuration has The sandbox could not run the server typecheck, lint, or tests. GitHub also returned no usable build or test result for this PR. Enable 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 schema-inference fixes. They resolve the inherited type errors, and the scoped server typecheck passes on the integrated candidate containing them. GitHub native-stack merging includes preceding PRs, including rejected #21. Hold this merge until the prefix is cleared; approval of this fix does not approve that preceding behavior. Validation by Codex: the exact #36 integration head Reviewers: Codex and Claude Fable 5.1 (Claude CLI). |
# Conflicts: # apps/server/src/pullRequest/GiteaPullRequestApi.ts
|
@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="22"
requested="08cce87833d3fae642240f7efaa2eb0947f4ee09"
echo '== Repository state and requested commit =='
git rev-parse HEAD
git status --short
git cat-file -e "${requested}^{commit}"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$requested"
echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" \
--json number,state,headRefName,headRefOid,baseRefName,mergeStateStatus,statusCheckRollup,reviews \
--jq '{number,state,headRefName,headRefOid,baseRefName,mergeStateStatus,checks:[.statusCheckRollup[]|{name,status,conclusion}],reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}]}'
base_ref=$(gh pr view "$pr" --repo "$repo" --json baseRefName --jq .baseRefName)
git fetch --quiet origin "$base_ref"
base=$(git merge-base "origin/$base_ref" "$requested")
printf 'merge_base=%s\n' "$base"
echo '== Diff integrity and changed paths =='
git diff --check "$base" "$requested"
git diff --name-status "$base" "$requested"
git diff --stat "$base" "$requested"
git diff --find-renames --find-copies --unified=100 "$base" "$requested"
echo '== Changed-file outlines =='
git diff --name-only "$base" "$requested" | while IFS= read -r file; do
case "$file" in
*.ts|*.tsx|*.js|*.jsx)
echo "----- $file -----"
ast-grep outline "$file" --items all
;;
esac
done
echo '== Gitea recovery, feature, and request contexts =='
rg -n -C 15 --glob 'GiteaPullRequestApi.ts' --glob 'GiteaPullRequestProvider.ts' \
'(getFeatures|includeTracking|ReadonlyArray<string>|catch|orElse|autoMerge|setDraft|listReactions|createReaction|deleteReaction)' \
apps/server/src/pullRequest
echo '== Workflow encoding and assertions =='
rg -n -C 15 --glob 'GiteaWorkflows.test.ts' \
'(Schema|encode|JSON\.stringify|HttpServerResponse|Gitea|includeTracking)' \
apps/server/src/pullRequest
echo '== Focused test definitions and call contexts =='
rg -n -C 8 --glob '*.test.ts' --glob '*.spec.ts' \
'(Gitea|includeTracking|getFeatures|autoMerge|setDraft|reaction)' \
apps/server/src/pullRequestLength of output: 3026 ⚙️ CodeRabbit configuration inspected Length of output: 5504 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RTVision/t3code"
pr="22"
requested="08cce87833d3fae642240f7efaa2eb0947f4ee09"
echo '== Authoritative pull request file list and patches =='
gh api --paginate "repos/${repo}/pulls/${pr}/files?per_page=100" \
--jq '.[] | "----- \(.filename) [\(.status)] +\(.additions)/-\(.deletions) -----\n\(.patch // "(patch unavailable)")"'
echo '== Authoritative pull request patch =='
gh pr diff "$pr" --repo "$repo" --patch
echo '== Merge-commit parent diffs =='
for parent in $(git show -s --format=%P "$requested"); do
echo "----- parent ${parent} -----"
git diff --check "$parent" "$requested"
git diff --name-status "$parent" "$requested"
git diff --unified=80 "$parent" "$requested"
done
echo '== Changed files from GitHub API, with local outlines =='
gh api --paginate "repos/${repo}/pulls/${pr}/files?per_page=100" --jq -r '.[].filename' |
while IFS= read -r file; do
if [ -f "$file" ]; then
echo "----- $file -----"
case "$file" in
*.ts|*.tsx|*.js|*.jsx) ast-grep outline "$file" --items all ;;
*) sed -n '1,260p' "$file" ;;
esac
else
echo "----- $file is absent from the checkout -----"
fi
done
echo '== Gitea implementation contexts =='
rg -n -C 20 --glob 'GiteaPullRequestApi.ts' --glob 'GiteaPullRequestProvider.ts' \
'(getFeatures|includeTracking|ReadonlyArray<string>|catch|orElse|autoMerge|setDraft|listReactions|createReaction|deleteReaction|listTeamMembers)' \
apps/server/src/pullRequest
echo '== Workflow fixture contexts =='
rg -n -C 20 --glob 'GiteaWorkflows.test.ts' \
'(Schema|encode|JSON\.stringify|HttpServerResponse|Gitea|includeTracking|getFeatures)' \
apps/server/src/pullRequest
echo '== Focused Gitea test definitions and assertions =='
rg -n -C 12 --glob '*.test.ts' --glob '*.spec.ts' \
'(includeTracking|getFeatures|listTeamMembers|autoMerge|setDraft|listReactions|createReaction|deleteReaction)' \
apps/server/src/pullRequestLength of output: 17933 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Changes introduced since the earlier reviewed head =='
git diff --check 256fd6fe51ce3e481eaed824fa585becd6bb9e2f HEAD
git diff --name-status 256fd6fe51ce3e481eaed824fa585becd6bb9e2f HEAD
git diff --unified=100 256fd6fe51ce3e481eaed824fa585becd6bb9e2f HEAD -- \
apps/server/src/pullRequest/GiteaPullRequestApi.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.ts \
apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts \
apps/server/src/pullRequest/GiteaWorkflows.test.ts
echo '== API: search request normalization =='
sed -n '820,940p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
echo '== API: feature-recovery call sites =='
sed -n '1490,1605p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '1610,1685p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
sed -n '2130,2205p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
echo '== API: team recovery, error types, and getFeatures definition =='
sed -n '1960,2050p' apps/server/src/pullRequest/GiteaPullRequestApi.ts
rg -n -C 10 --glob 'GiteaPullRequestApi.ts' \
'(const getFeatures|function getFeatures|export const getFeatures|isGiteaApiError|class GiteaPullRequestApiError|GiteaPullRequestApiError)' \
apps/server/src/pullRequest
echo '== Provider: permission normalization and recovery call sites =='
sed -n '100,225p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
sed -n '295,350p' apps/server/src/pullRequest/GiteaPullRequestProvider.ts
rg -n -C 10 --glob 'GiteaPullRequestProvider.ts' \
'(function giteaViewerPermissions|const giteaViewerPermissions|workflowApprovalSupported|revertSupported)' \
apps/server/src/pullRequest
echo '== Tests: workflow JSON encoding =='
sed -n '1,130p' apps/server/src/pullRequest/GiteaWorkflows.test.ts
echo '== Tests: provider recovery fixture and behavior =='
sed -n '1,145p' apps/server/src/pullRequest/GiteaPullRequestProvider.test.ts
rg -n -C 10 --glob 'GiteaPullRequestProvider.test.ts' \
'(workflowApprovalSupported|revertSupported|include_tracking|getAutoMergeEnabled|405|features)' \
apps/server/src/pullRequestLength of output: 214241
I found no actionable code blocker. The feature-discovery recovery paths preserve The sandbox could not run typecheck, lint, or tests. GitHub returned no completed build or test result in the retrieved status rollup.
[approve] You are interacting with an AI system. |
|
Re-review: GO on the inference fixes; NO-GO for merging now Reviewed head: The inference fixes are carried in the current head. Its tree equals the declared base tree, and CodeRabbit reports no incremental blocker. Fable 5.1: GO on the individual change. This candidate inherits #21's coverage issue as well as #9/#10/#12 and the #5 integration conflict. Clear the prefix before merging. 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 schema-inference fixes remain intact, and the head carries the corrected team-coverage behavior. 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: |
The integrated Gitea adapter now preserves exact optional booleans and string-array types when recovering from failed capability discovery. Workflow fixtures use Effect Schema for JSON encoding, matching the server’s static checks.
These corrections came from the affected server typecheck after the 228 focused behavior tests passed. 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