The docs say a label name with no / is in no scope (collaboration.md,
Labels). But Label::scope() returns None for such a name
(crates/knotless/src/records.rs). The exclusivity checks compare
other.scope() == label.scope(): labelled (crates/knotless/src/forge.rs,
about line 489), label (about line 1398) and the triage rival check
(crates/knotless/src/triage.rs, about line 139). Two unscoped labels both
give None, which compares equal. So every exclusive label without a
scope competes with every other one, as if they shared a scope. Nothing
refuses --exclusive on an unscoped label.
urgent is taken off, and readers keep only the newer of the two.
What you expected
Either an unscoped exclusive label displaces nothing, or exclusive is
refused on a label with no scope. The scope compare should match only
Some(a) == Some(b).
Where
Client and triage, on main at b191acef. Found by the docs audit.
What happened
The docs say a label name with no
/is in no scope (collaboration.md, Labels). ButLabel::scope()returnsNonefor such a name (crates/knotless/src/records.rs). The exclusivity checks compareother.scope() == label.scope():labelled(crates/knotless/src/forge.rs, about line 489),label(about line 1398) and the triage rival check (crates/knotless/src/triage.rs, about line 139). Two unscoped labels both giveNone, which compares equal. So every exclusive label without a scope competes with every other one, as if they shared a scope. Nothing refuses--exclusiveon an unscoped label.How to see it
knotless labels <url> add urgent --exclusiveandknotless labels <url> add blocked --exclusive.urgenton an issue, thenblocked.urgentis taken off, and readers keep only the newer of the two.What you expected
Either an unscoped exclusive label displaces nothing, or
exclusiveis refused on a label with no scope. The scope compare should match onlySome(a) == Some(b).Where
Client and triage, on main at b191acef. Found by the docs audit.
🤖 Generated with Claude Code