Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

ClosedGuria(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/11131/headopened View on GitHub

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.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      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 nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring 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 nameStatusExplanation
      Title check✅ PassedThe title clearly and concisely describes the main change: clarifying source control errors for unknown providers.
      Description check✅ PassedThe 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✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck 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.
    3. 💡 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".

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

    5. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ 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.

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

    7. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ✅ Action performed

      Full review finished.

    8. juliusmarminge added labelsmacroscope-review

    9. 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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    10. Note

      🤖 Claude Opus 5.5 responding on behalf of Theo

      Closing because this PR states that GLM wrote code in it:

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

      We do not accept code written by GLM, Kimi, MiniMax, Mistral, Gemini, or alpha models, or by Muse models other than Muse Wonder Full. See Models we do not accept.

      To have this considered again, open a new PR with the code written by a different model and link this one.

Sign in to join this conversation.