Skip to content
Source
Sign inSign up
pingdotgg/t3code

refactor(source-control): Azure DevOps lives in @t3tools/source-control-azure-devops #17592

Mergedjuliusmarmingemerged 2 commits intot3/source-control-forgejo fromrefs/pull/17592/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Third layer of moving each source control host into its own package. It stacks on #17581.

The Azure DevOps support moves out of apps/server into @t3tools/source-control-azure-devops, one subpath per module:

  • the az CLI client (AzureDevOpsCli)
  • the repository provider
  • the pull request CLI and provider
  • JSON decoding and diff reconstruction

The package reaches the server only through SourceControlHost.

  • Its driver joins BUILT_IN_SOURCE_CONTROL_DRIVERS. Neither registry, server.ts, nor ws.ts names Azure DevOps any more.
  • The built-in list is now typed by the union of its drivers' requirements, as BUILT_IN_DRIVERS is for agent providers, so the registry's R channel stays honest as more hosts join.
  • Discovery keeps its existing host order (github, gitlab, azure-devops, bitbucket, forgejo). The order is pinned until every host is a driver, and the discovery test asserts it.
  • The diff dependency moves from apps/server to the package, which is now its only user.

Tests move with their code, with only imports and wiring changed. The az client test runs against TestSourceControlHost.

Verified with tsc (apps/server and the packages), knip, a frozen-lockfile install, release smoke, and 59 test files (1405 tests).

🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at caa3dfd

      Macroscope's review found this PR approvable — This is a bounded Azure DevOps package extraction with existing implementation and tests moved intact. Server wiring, service dependencies, and discovery ordering preserve the prior runtime path without introducing schema, deployment, security, or default-behavior changes.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire—5.0 KiB—6.8 KiB✅
      CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
      CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
      CodexLive turn messages—2—8✅
      ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
      ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
      ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
      ClaudeLive turn messages—1—8✅

      Baseline: unavailable · PR result: caa3dfd · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    5. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Team
      • Run ID: 399db524-be94-4f87-8986-ba6b4ddaa3c0

      📥 Commits

      Reviewing files that changed from the base of the PR and between d876f7ffc0a81e4368d9e1bbadc24df66bc2c05f and caa3dfda660437c282c9c8462ec9b4c5291c337a.


      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

      📒 Files selected for processing (29)
      • apps/server/package.json
      • apps/server/scripts/evaluate-thread-titles.ts
      • apps/server/src/pullRequest/PullRequestProviderRateLimit.test.ts
      • apps/server/src/pullRequest/PullRequestProviderRegistry.ts
      • apps/server/src/server.ts
      • apps/server/src/sourceControl/SourceControlDiscovery.test.ts
      • apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts
      • apps/server/src/sourceControl/SourceControlProviderRegistry.ts
      • apps/server/src/sourceControl/builtInDrivers.ts
      • apps/server/src/ws.ts
      • docs/internals/pull-request-file-revisions.md
      • package.json
      • packages/source-control-azure-devops/package.json
      • packages/source-control-azure-devops/src/server/AzureDevOpsCli.test.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsCli.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestCli.test.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestCli.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestProvider.test.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestProvider.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.test.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsDiff.test.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsDiff.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsPullRequestJson.test.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsPullRequestJson.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsPullRequests.ts
      • packages/source-control-azure-devops/src/server/driver.ts
      • packages/source-control-azure-devops/tsconfig.json
      • scripts/release-smoke.ts

      💤 Files with no reviewable changes (12)
      • packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsPullRequests.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsDiff.test.ts
      • apps/server/src/ws.ts
      • apps/server/scripts/evaluate-thread-titles.ts
      • apps/server/src/server.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestProvider.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsDiff.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestProvider.test.ts
      • apps/server/src/pullRequest/PullRequestProviderRegistry.ts
      • packages/source-control-azure-devops/src/server/azureDevOpsPullRequestJson.test.ts
      • packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.test.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.



      📝 Walkthrough

      Walkthrough

      Azure DevOps source-control and pull-request services are defined in a workspace package and exposed through a driver. The server registers that driver with its built-in drivers. Direct Azure DevOps provider wiring is removed from the server registries.

      Changes

      Azure DevOps package integration

      Layer / File(s)Summary
      Package services and driver
      packages/source-control-azure-devops/*, package.json, scripts/release-smoke.ts, docs/internals/pull-request-file-revisions.md
      The package defines server exports and a driver that combines source-control and pull-request providers. Azure DevOps CLI process execution uses SourceControlHost. Workspace analysis, release smoke fixtures, and the documentation link include the package.
      Server provider registration
      apps/server/package.json, apps/server/src/sourceControl/*, apps/server/src/pullRequest/*, apps/server/src/server.ts, apps/server/src/ws.ts, apps/server/scripts/evaluate-thread-titles.ts
      The built-in driver registry includes Azure DevOps. The source-control registry sorts registrations before creating providers. Direct Azure DevOps provider and CLI wiring is removed from server registries. Related tests use package exports and mock the Azure DevOps pull-request CLI.

      Priority: ➖ Normal

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Refactor


      Merge Risk: ⚪ Minimal · up to caa3d

      Azure DevOps registration and service wiring appear intact. No actionable merge-blocking risk remains after normal checks.

      Pre-merge checks | Passed 3 | Failed 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Description checkWarningThe description explains the implementation and provides detailed verification results, but it does not use the required Problem, Change, Scope and approval, and Verification sections. It also does no…Rewrite the description using all required section headings. Add the problem, expected behavior, and relevant reproduction or environment details. Explain the change under Change. Under Scope and approval, link the triaged issue or maintain…
      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely identifies the main change: moving Azure DevOps support into the dedicated @t3tools/source-control-azure-devops package.
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.

      Full details: Description check

      Explanation

      The description explains the implementation and provides detailed verification results, but it does not use the required Problem, Change, Scope and approval, and Verification sections. It also does not document the underlying problem or provide a triaged issue or explicit maintainer approval.

      Resolution

      Rewrite the description using all required section headings. Add the problem, expected behavior, and relevant reproduction or environment details. Explain the change under Change. Under Scope and approval, link the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. Keep the detailed verification results under Verification.



      • Fix all pre-merge checks with AI
      ✨ Finishing Touches 💡 1
      🛠️ Fix failing CI checks 💡
      • Commit to this branch
      • Create a new PR

      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR

      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR


      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Comment `@coderabbitai help` to get the list of available commands.
    6. juliusmarminge merged thisd01febb

    7. juliusmarminge closed this

Sign in to join this conversation.