Skip to content

Preserve self-hosted GitLab origins through API and account routing #1951

Closed

Description

@currentbits

At main baseline 8876c11, gitlabRemote('http://gitlab.example:8080/group/repo.git') returns only host/path, dropping scheme and port. A neutral hostname such as https://code.example/group/repo.git is rejected without explicit configuration. The existing probe confirms parser behavior only; no live API failure was tested.

Scope checked against #1882 (labels/reviewer filters) and #1884 (reference navigation/watchers). This is a focused reliability fix, separate from those features.

Plan:

  • Trace parsing, API/URL construction and account selection; reproduce failures using isolated fixtures.
  • Preserve an explicit HTTP(S) origin, including ports. Map SSH/scp remotes to the configured web origin without treating SSH ports as HTTP ports. Accept neutral self-hosted names only via explicit host configuration.
  • Verify public GitLab behavior and credential host isolation with fake CLI/config fixtures; never contact private hosts or modify real credentials.
  • Run relevant checks and annotate the final diff for review.

Preserve unrelated WIP and the pending #1924 checkout.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Nov 8, 2026
  2. currentbits commented on Nov 8, 2026

    @currentbits
    OwnerAuthor

    Implementation is on fix/gitlab-origins, based on 8876c11. Parsing now retains a web origin and port-qualified account authority. Neutral names require explicit glab host/environment configuration; SSH/scp uses a unique configured web origin and never its transport port. REST and GraphQL receive child-only host/protocol overrides and environment tokens are stripped on authority changes. Cross-project issue lookup and comment/repository links retain the origin; pasted issue URLs for another origin are refused. Isolated regression fixtures passed the initial 18 cases; broader clean-environment checks are running. No private hosts or real credentials were accessed or changed.

  3. currentbits commented on Nov 8, 2026

    @currentbits
    OwnerAuthor

    Review additions: repository links also used hostname-only HTTPS construction, so they now retain the GitLab origin and full subgroup path while preserving existing owner/repo fields. Added regressions for bare environment hosts using per-host protocol, uppercase SSH names, and environment tokens scoped by glab's default host. Production build/typecheck passed; 61 focused checks passed. A full run encountered sandbox loopback/sips restrictions, so it is being rerun outside the sandbox with isolated CLI/config paths. The final diff review itinerary is written.

  4. currentbits commented on Nov 8, 2026

    @currentbits
    OwnerAuthor

    Committed as 69c0e7b4 on fix/gitlab-origins. All 196 targeted checks passed, including GitLab parser/API fixtures, issues/Planboard, MR checkout/review and repository links; the public GitLab fixture rerun also passed after isolating its inherited configuration. Production build/typecheck passed. The full isolated suite is still running and has surfaced failures in unchanged queued-followup renderer tests and ACP fixtures; a separate follow-up suggestion records those without expanding this fix. Keeping this issue open/in progress until the fix is merged.

  5. added
    duplicate
    plan:done
    on Nov 8, 2026
  6. currentbits commented on Nov 8, 2026

    @currentbits
    OwnerAuthor

    Duplicate of #1943, which already contains the exact origin-preservation acceptance criteria. Implementation and validation are now tracked there. Closing only this redundant tracker; #1943 stays open pending merge.

  7. removed
    plan:doing
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions