Skip to content

fix(gitlab): recognize SSH-over-443 remotes - #30998

Open
lorenzozanee wants to merge 1 commit into
stablyai:mainfrom
lorenzozanee:fix/gitlab-altssh-443
Open

lorenzozanee wants to merge 1 commit into
stablyai:mainfrom
lorenzozanee:fix/gitlab-altssh-443

Conversation

@lorenzozanee

Copy link
Copy Markdown

ELI5

When a GitLab project used SSH over port 443, Orca could send its web links to the SSH-only hostname. Those links now use the project's GitLab.com address while Git keeps the supplied SSH remote.

What Changed

The project parser, hosted-remote parser, and manual merge-request URL builder now recognize altssh.gitlab.com as GitLab.com. Regression tests cover the canonical project identity, web links, and unchanged SSH remote.

Why

altssh.gitlab.com is a transport endpoint, not the project's web identity. Reusing the existing GitLab host-normalization rule keeps links canonical without rewriting the remote used for Git operations.

Linked Issue

Fixes #30876

Visual Proof

N/A: no rendered UI change; the resulting project and review URLs are asserted by automated tests.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Passed: pnpm exec vitest run --config config/vitest.config.ts src/main/git/hosted-remote-url.test.ts src/main/gitlab/project-ref-parser.test.ts src/renderer/src/components/right-sidebar/source-control-manual-review-url.test.ts (40 tests); pnpm exec oxlint --deny-warnings on the six changed files; pnpm exec oxfmt --check on the six changed files; git diff --check. No live GitLab connection or upstream CI was tested.

AI Disclosure

OpenCode (gpt-6-luna) assisted with implementation review.

Review

Reviewed the exact six-file diff and the host-normalization call sites.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The caller-provided SSH remote remains unchanged. Cross-platform and SSH behavior is covered by parser tests; no live remote session was run.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32671f60-df15-4e73-9701-acb71aba4e2d
📥 Commits

Reviewing files that changed from the base of the PR and between c09af97 and 7f5b284.

📒 Files selected for processing: 6
  • src/main/git/hosted-remote-url.test.ts
  • src/main/git/hosted-remote-url.ts
  • src/main/gitlab/project-ref-parser.test.ts
  • src/main/gitlab/project-ref-parser.ts
  • src/renderer/src/components/right-sidebar/source-control-manual-review-url.test.ts
  • src/renderer/src/components/right-sidebar/source-control/review/remote-repo.ts

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

📝 Walkthrough

GitLab remote parsing now recognizes altssh.gitlab.com:443 as the GitLab host. Project references and source-control web links use the canonical gitlab.com host. Tests cover hosted remote parsing, project reference parsing, and merge-request URL generation while preserving the original remote string.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 7f5b2

The alternative SSH endpoint is covered for canonical merge-request links, including the GitLab provider hint. Normal validation remains appropriate before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: recognizing GitLab SSH-over-443 remotes.
Description check Passed The description covers the required sections, explains the user impact and implementation, links issue #30876, documents testing, and marks visual proof as not applicable. It also clearly reports unpe…
Linked Issues check Passed Issue #30876 is active and has coding requirements. The diff applies normalizeGitLabRemoteHost in the project parser, hosted-remote parser, and manual-review remote parser. The new tests verify that…
Out of Scope Changes check Passed All six changed files support issue #30876. The production changes add the requested host normalization and canonical web-origin handling. The added tests cover the requested parser and manual-review …
Full details: Description check

Explanation

The description covers the required sections, explains the user impact and implementation, links issue #30876, documents testing, and marks visual proof as not applicable. It also clearly reports unperformed manual testing and full validation commands.

Full details: Linked Issues check

Explanation

Issue #30876 is active and has coding requirements. The diff applies normalizeGitLabRemoteHost in the project parser, hosted-remote parser, and manual-review remote parser. The new tests verify that ssh://git@altssh.gitlab.com:443/team/project.git resolves to host gitlab.com, provider gitlab, and path team/project. The manual-review test verifies the canonical merge-request URL and the unchanged supplied remote value. Existing canonical-host behavior remains on the existing paths.

Full details: Out of Scope Changes check

Explanation

All six changed files support issue #30876. The production changes add the requested host normalization and canonical web-origin handling. The added tests cover the requested parser and manual-review behavior. No unrelated provider, self-hosted GitLab, Bitbucket alias, UI, or administrative changes appear in the reviewed diff.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

⚠️ This pull request shows signs of AI-generated slop (trivial_assertion). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GitLab SSH-over-443 remotes produce links to altssh.gitlab.com

1 participant