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
A repo with no forge host checks gh auth against every host, about 6 s per PR lookup #172
In a repo whose origin is a local path (a scratch or test repo), RepoHost() returns "", so Authed() runs a bare gh auth status. That validates every host gh is logged in to. With github.com plus one enterprise host configured, it takes about 6 s here, against 0.2 s for gh auth status --hostname github.com.
Authed() is not cached, and PRForBranch calls it on every lookup. So wt clean in a scratch repo with two worktrees took 17 s, and a 17-step smoke of wt clean <name> (#171) took about 4 minutes per run.
A real repo is not affected in the same way: there the check is host-scoped (#100), and wt clean over 9 worktrees took 10 s.
Why it matters
Only a repo with no forge host hits this, but that is where wt's own e2e smokes run: the CLAUDE.md ship gate asks for a smoke against a scratch repo, and a bare local origin is the natural way to build one.
Suggestion
When RepoHost() is "", there is no forge to ask. Treat PR state as unresolvable without calling gh. Every lookup reaches that result anyway, because gh cannot resolve a repo from a local-path remote.
Cache Authed() for the process; it cannot change during one run.
⚠ If the first is done, check what wt doctor says for such a repo. Reporting "not authenticated" there would be the #100 shape again: a warning that cannot tell "you are broken" from "the check does not apply".
Activity
doctor: outside a repo, read gh auth per host, not the aggregate (#183)…
gh auth: read --json (an unreachable host is not a dead token); decid…