You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Widen the forge diagnostic to hosts that lost exact-label classification #3671
Since 0.71.0, forge hosts are classified by exact DNS label (#3662). That correctly rejects lookalikes like evil-github.com and dev.azure.com.attacker.example, but it also drops legitimately-named self-hosted instances whose hostname carries the forge name only as part of a label:
gitlab-internal.company.com
github-enterprise.acme.com
mygithub.com
Those lose CI status in wt list --full, wt switch --prs, and repo.provider in wt list --format=json. The remedy is one line — forge.platform in .config/wt.toml — but nothing tells the user to set it.
Only one shape announces itself today. LegacyForgeAlias::from_url (src/git/ci_platform.rs) requires an SSH URL and a dotless host and a github-/gitlab-/gitea- prefix, so it catches the branded multi-account alias (git@github-personal:owner/repo.git) and nothing else. A dotted hyphenated host gets no message at all — CI simply stops appearing, which reads as a bug rather than a configuration gap.
Proposal
Widen the diagnostic to any host that would have matched the pre-0.71.0 substring rule but no longer classifies: if forge.platform is unset, the host has no exact forge label, and a case-insensitive substring of the host is github/gitlab/gitea, emit the existing forge.platform hint with the inferred platform.
That is additive — it changes no classification and needs no further breaking change — and it keeps dispatch on the exact-label boundary, which is the security property #3662 bought. The LegacyForgeAlias doc comment already states the rule that matters here: the type is diagnostic-only and must not be used to select a provider.
Worth checking whether the same widening should cover Azure DevOps, where the equivalent case is a host ending in neither dev.azure.com nor visualstudio.com but containing one of them.
Context
Found during the 0.71.0 release review. The behavior is deliberate and documented in the changelog with the remedy; this issue is only about making the affected user aware without having to read release notes.
This was written by Claude Code on behalf of @max-sixty
LegacyForgeAlias detection now fires for any host the pre-0.71.0 substring rule would have matched but the exact-label boundary no longer classifies — so gitlab-internal.company.com, github-enterprise.acme.com, and mygithub.com get the forge.platform hint instead of silently losing CI. The diagnostic carries a shape, wording itself as "SSH host alias …" for the branded alias (unchanged) and "Host …" for a hyphenated/forge-named hostname. Per the aside, the widening also covers Azure DevOps service domains carried as substrings. It stays additive: no classification changes and it never feeds provider dispatch, so the exact-label boundary from #3662 holds.
Activity
worktrunk-bot commentedon Jul 30, 2026
Implemented in #3672.
LegacyForgeAliasdetection now fires for any host the pre-0.71.0 substring rule would have matched but the exact-label boundary no longer classifies — sogitlab-internal.company.com,github-enterprise.acme.com, andmygithub.comget theforge.platformhint instead of silently losing CI. The diagnostic carries a shape, wording itself as "SSH host alias …" for the branded alias (unchanged) and "Host …" for a hyphenated/forge-named hostname. Per the aside, the widening also covers Azure DevOps service domains carried as substrings. It stays additive: no classification changes and it never feeds provider dispatch, so the exact-label boundary from #3662 holds.fix(forge): classify a forge by the brand in the hostname, not by DNS…