Skip to content

fix(pull-requests): preserve Gitea schema inference - #22

Open
kalvenschraut wants to merge 2 commits into
gitea/team-reviewersfrom
gitea/adapter-types
Open

fix(pull-requests): preserve Gitea schema inference#22
kalvenschraut wants to merge 2 commits into
gitea/team-reviewersfrom
gitea/adapter-types

Conversation

@kalvenschraut

@kalvenschraut kalvenschraut commented Sep 5, 2026

Copy link
Copy Markdown
Member

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

  • Bug Fixes
    • Improved pull request search behavior by sending tracking options only when explicitly enabled.
    • Ensured feature availability fallbacks are handled consistently across pull request workflows and permission checks.
  • Tests
    • Updated workflow test responses to use consistent JSON encoding.

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 18 minutes.

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: 432bc2c5-d0ea-4618-b9ce-501c8e29e20c

📥 Commits

Reviewing files that changed from the base of the PR and between 169019e and 256fd6f.

📒 Files selected for processing (1)
  • apps/server/src/pullRequest/GiteaPullRequestApi.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: c8423a65-cad7-490d-b60d-68afa2d79df2

📥 Commits

Reviewing files that changed from the base of the PR and between bf2bdc7 and 169019e.

📒 Files selected for processing (3)
  • apps/server/src/pullRequest/GiteaPullRequestApi.ts
  • apps/server/src/pullRequest/GiteaPullRequestProvider.ts
  • apps/server/src/pullRequest/GiteaWorkflows.test.ts

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


📝 Walkthrough

Walkthrough

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

Changes

Gitea type normalization

Layer / File(s) Summary
Normalize API and provider types
apps/server/src/pullRequest/GiteaPullRequestApi.ts, apps/server/src/pullRequest/GiteaPullRequestProvider.ts
Search requests normalize includeTracking to a strict boolean. Feature fallbacks use ReadonlyArray<string>. Permission values use explicit booleans.
Encode workflow test responses
apps/server/src/pullRequest/GiteaWorkflows.test.ts
Mocked API responses use an encodeJson helper backed by Effect Schema instead of direct JSON.stringify calls.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 16901

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)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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 summarizes the main change: preserving Gitea schema inference in pull-request handling.
Description check ✅ Passed The description clearly explains the type-preservation changes, the workflow fixture update, and validation results. It does not use the template headings or checklist, but it includes the required ch…
✨ 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/adapter-types

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

@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

The final typed error-recovery fix is pushed. Server typecheck, targeted lint, and the affected team-endpoint regression pass.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

@kalvenschraut I will review the final typed error-recovery fix and the updated tests.

⚠️ 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
kalvenschraut marked this pull request as ready for review September 5, 2026 05:57
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

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