refactor(source-control): GitLab lives in @t3tools/source-control-gitlab #17594
t3/source-control-azure-devops fromrefs/pull/17594/head·merged by juliusmarminge View on GitHubFourth layer of moving each source control host into its own package. It stacks on #17592.
GitLab support moves into @t3tools/source-control-gitlab, one subpath per module, and reaches the server only through SourceControlHost. The moved modules are:
- the
glabCLI client - the repository provider and auth parsing
- the merge request CLI and provider
- merge request JSON decoding
Wiring changes:
- Its
driverjoinsBUILT_IN_SOURCE_CONTROL_DRIVERS. - Neither registry,
server.ts,ws.ts, nor the title evaluation script names GitLab any more. - Discovery keeps its host order.
Tests move with their code, with only imports and wiring changed:
- The
glabclient test and theGitManagernested-fork test run againstTestSourceControlHostinstead of a mockedVcsProcess. - The registry tests mock
GitLabPullRequestClialongsideGitLabCli, because the registry now builds both facets from the one driver.
Verified with tsc (apps/server and the package), 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
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Approvability#
Verdict: Approved at
e00cbeaMacroscope's review found this PR approvable — This PR relocates the existing GitLab source-control implementation into its dedicated package and wires it through the established driver mechanism, with behavior and tests preserved. The remaining changes are dependency, documentation, and release/build metadata updates rather than a new capability or product-default change.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
ℹ️ No successful
mainbaseline artifact is available yet. This run establishes the initial measurement.Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire — 5.0 KiB — 6.8 KiB ✅ Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅ Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Codex Live turn WebSocket decoded — 20.9 KiB — 29.3 KiB ✅ Codex Live turn messages — 2 — 8 ✅ Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅ Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅ Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅ Claude Live turn messages — 2 — 8 ✅ Baseline: unavailable · PR result:
e00cbea· Source CI: successScenario 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.
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:
8727c388-48ff-474a-bcbe-7bdd859a88cc
📥 Commits
Reviewing files that changed from the base of the PR and between d876f7ffc0a81e4368d9e1bbadc24df66bc2c05f and 14eb50bc9317b4367f7010387b6bb6041aa7a126.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (28)
apps/server/package.jsonapps/server/scripts/evaluate-thread-titles.tsapps/server/src/git/GitManager.test.tsapps/server/src/pullRequest/PullRequestProviderRateLimit.test.tsapps/server/src/pullRequest/PullRequestProviderRegistry.tsapps/server/src/server.tsapps/server/src/sourceControl/SourceControlDiscovery.test.tsapps/server/src/sourceControl/SourceControlProviderRegistry.test.tsapps/server/src/sourceControl/SourceControlProviderRegistry.tsapps/server/src/sourceControl/builtInDrivers.tsapps/server/src/ws.tspackage.jsonpackages/source-control-gitlab/package.jsonpackages/source-control-gitlab/src/server/GitLabCli.test.tspackages/source-control-gitlab/src/server/GitLabCli.tspackages/source-control-gitlab/src/server/GitLabPullRequestCli.test.tspackages/source-control-gitlab/src/server/GitLabPullRequestCli.tspackages/source-control-gitlab/src/server/GitLabPullRequestProvider.test.tspackages/source-control-gitlab/src/server/GitLabPullRequestProvider.tspackages/source-control-gitlab/src/server/GitLabSourceControlProvider.test.tspackages/source-control-gitlab/src/server/GitLabSourceControlProvider.tspackages/source-control-gitlab/src/server/driver.tspackages/source-control-gitlab/src/server/gitLabAuthStatus.tspackages/source-control-gitlab/src/server/gitLabMergeRequestJson.test.tspackages/source-control-gitlab/src/server/gitLabMergeRequestJson.tspackages/source-control-gitlab/src/server/gitLabMergeRequests.tspackages/source-control-gitlab/tsconfig.jsonscripts/release-smoke.ts
💤 Files with no reviewable changes (5)
- apps/server/src/server.ts
- apps/server/src/sourceControl/SourceControlProviderRegistry.ts
- apps/server/scripts/evaluate-thread-titles.ts
- apps/server/src/pullRequest/PullRequestProviderRegistry.ts
- apps/server/src/ws.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
📝 Walkthrough
Walkthrough#
The pull request adds a standalone GitLab source-control package and registers its driver through the server’s built-in driver registry. It updates package consumers and tests to use the new package, and adds
packages/provider-acpto the knip workspace scan.Changes#
GitLab package and server integration
Layer / File(s) Summary Create the GitLab package
packages/source-control-gitlab/*The new package exposes GitLab server modules and adds a driver that combines source-control, discovery, and pull-request operations. GitLabCliusesSourceControlHostfor process execution.Register GitLab through built-in drivers
apps/server/package.json,apps/server/src/sourceControl/*,apps/server/src/pullRequest/PullRequestProviderRegistry.ts,apps/server/src/server.ts,apps/server/src/ws.ts,apps/server/scripts/evaluate-thread-titles.ts,apps/server/src/git/GitManager.test.ts,apps/server/src/pullRequest/PullRequestProviderRateLimit.test.ts,scripts/release-smoke.tsThe server adds the GitLab driver to its built-in driver list and removes direct GitLab provider registration. Server composition and tests use the package exports, and the release smoke fixture includes the package manifest. Workspace scan
Layer / File(s) Summary Update knip workspace scan
package.jsonThe knip:checkworkspace list addspackages/provider-acp.Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Merge Risk: ⚪ Minimal · up to
14eb5No actionable GitLab integration issue remains identified; the PR is mergeable after normal checks.
Pre-merge checks |
3 | 1❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Description check The description explains the change and lists specific verification results, but it does not provide the required Scope and approval information or use the template's section structure. Add the required Problem, Change, Scope and approval, and Verification sections. Include a link to the triaged issue or approved discussion, with the approval comment, or explain why the focused refactor qualifies for an exemption. ✅ Passed checks (3 passed)
Check name Status Explanation Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Title check The title clearly identifies the main change: moving GitLab source-control functionality into the @t3tools/source-control-gitlabpackage.
- Fix all pre-merge checks with AI
✨ Finishing Touches
📝 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.macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged thiseb459b5
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed