ux(whoami): auth whoami green-lights a split-brain repo - no cross-check between resolved forge, origin host, and the resolved repo #200
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Repro
In the #197 split-brain repo (local
madtea.url-> gitea.example from repo config, origin -> codeberg.org):Everything reads green while every repo-scoped command in this checkout 404s. whoami is the diagnostic command - the one thing a stuck user runs - and it displayed the contradiction (gitea URL next to a codeberg-parsed slug) without noticing it, in the exact session where noticing it would have ended the incident.
Gaps
madtea.url's host differs from the origin remote's host, that is a five-alarm configuration smell (a poisoned override per #197, or a deliberate-but-unusual setup) and deserves a loud warning naming both hosts, both sources, and the remedy.GET /repos/<slug>against the resolved URL would have turned "all green" into "repo sixfold_space/madtea does not exist on gitea.example". Scope-OK plus repo-404 is precisely the split-brain signature.Repository: <slug>, reading as "this repo is good to go". With gap 2 closed, the repo line can carry its own verified status.Expected
One extra GET per whoami run (repo-scoped invocations only) buys the diagnosis; the mismatch warning itself is free - both hosts are already resolved in-process.
Related