Specificity
Scoring and tie behavior by subsystem
Tagged URN Score
TaggedUrn::specificity uses graded scores:
K=v= 3K=*= 2K=!= 1K=?= 0
specificity_tuple() exists, but it is not universally used by CAP selection paths.
CAP URN Score
CapUrn::specificity counts:
- Input media tag count, unless
in=media:(wildcard, contributes 0) - Output media tag count, unless
out=media: - +1 for each non-
*non-direction tag
Tie Behavior Matrix
UrnMatcher::find_all_matches: sorts by score descending only.CapMatrix::find_best_cap_set: replaces best only on strict>. Score ties keep first encountered match.CapBlock::find_best_cap_set: strict>across registries. Score ties keep first registry in registration order.