Skip to content

fix(server): clarify source control errors for unknown providers - #11131

Open
Guria wants to merge 2 commits into
pingdotgg:mainfrom
Guria:t3code/fix-source-control-error-wording
Open

Guria wants to merge 2 commits into
pingdotgg:mainfrom
Guria:t3code/fix-source-control-error-wording

Conversation

@Guria

@Guria Guria commented Sep 10, 2026 •

Copy link
Copy Markdown

Problem

When source control provider detection fails, the fallback provider stubs templated the literal unknown kind into their detail string, producing confusing errors like:

Source control provider unknown failed in listChangeRequests: No unknown source control provider is registered.

How this fixes it

  • The registry stub now reports No source control provider was detected for this project. when the kind is unknown, and keeps the provider-specific wording for registered kinds (github, gitlab, bitbucket, azure-devops).
  • SourceControlProviderError.message drops the awkward provider unknown prefix for the unknown case and reads Source control <operation> failed: <detail>.

Verified with the focused SourceControlProviderRegistry tests plus lint and typecheck on the touched packages.

Worked on by zai/glm-5.3-flash via the Codex harness in T3 Code.

Summary by CodeRabbit

  • Bug Fixes
    • Improved source control error messages when no provider is detected, avoiding incorrect provider names.
    • Errors now distinguish between unrecognized providers and registered providers that are unavailable.
    • Source control failures provide more consistent details and operation-specific messages.
    • Added clearer context when source control operations cannot be completed.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 1e870171-047e-42c9-97dc-ab9667dc0236

📥 Commits

Reviewing files that changed from the base of the PR and between 42d1b9ac23d9151afdab1507b19cbc9627ce86cf and 8cda5db6e8a74e9df4d061005b2a14b228caef8b.

📒 Files selected for processing (3)
  • apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts
  • apps/server/src/sourceControl/SourceControlProviderRegistry.ts
  • packages/contracts/src/sourceControl.ts

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


📝 Walkthrough

Walkthrough

The registry now returns distinct details for unknown and unregistered providers. Error messages omit the provider name for unknown providers. Tests validate the updated detail and message.

Changes

Source control error handling

Layer / File(s) Summary
Unknown-provider error messages
apps/server/src/sourceControl/SourceControlProviderRegistry.ts, packages/contracts/src/sourceControl.ts, apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts
The registry uses a dedicated detail for unknown providers across seven error-returning methods. SourceControlProviderError.message omits the provider name for unknown providers. The test validates the detail and message formats.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 8cda5

The PR clarifies unknown-provider errors and updates focused coverage; no merge-blocking issue remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: clarifying source control errors for unknown providers.
Description check ✅ Passed The description clearly explains the problem, the implementation, and verification steps. It covers the required change and rationale, although it uses Problem and How this fixes it instead of the tem…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec85885b08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/sourceControl/SourceControlProviderRegistry.ts
@Guria

Guria commented Sep 10, 2026

Copy link
Copy Markdown
Author

Pushed 50df63fcb to address the P1: SourceControlProviderRegistry.test.ts now asserts the unknown-provider detail ("No source control provider was detected for this project.") and the full conditional message ("Source control getChangeRequest failed: …") so reverting either change fails the suite.

@Guria

Guria commented Sep 10, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@Guria

Guria commented Sep 10, 2026

Copy link
Copy Markdown
Author

@codex review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c718e1693f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Guria

Guria commented Sep 10, 2026

Copy link
Copy Markdown
Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@Guria
Guria force-pushed the t3code/fix-source-control-error-wording branch 4 times, most recently from 4cc477f to 0c6734c Compare September 18, 2026 17:11
@Guria
Guria force-pushed the t3code/fix-source-control-error-wording branch 2 times, most recently from 03ab229 to 37a6d01 Compare September 27, 2026 15:43
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
@macroscopeapp

macroscopeapp Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 37a6d01

Macroscope's review found this PR approvable — This is a small, self-contained error-message bug fix: it improves wording only for undetected providers, preserves named-provider behavior, and adds focused assertions. It does not change schemas, control flow, product defaults, or production infrastructure.

You can add or adjust custom eligibility rules. Learn more.

- Clarify errors when no source control provider is detected
- Preserve provider-specific wording for registered provider failures
@Guria
Guria force-pushed the t3code/fix-source-control-error-wording branch from 37a6d01 to 64d3bbe Compare October 1, 2026 05:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants