Expand description
Resolve user-facing selectors to stable rule_id values.
One resolver serves rules export, delete, enable, and state commands.
This keeps ambiguous-name and empty-match behavior consistent.
Identity is always rule_id. Names only find IDs.
Constants§
- NAME_
SEARCH_ LIMIT - Same-named candidates to consider in one page. The cap prevents a pathological name lookup from becoming a corpus read.
- UNREADABLE_
RULE_ ID - Displays an unreadable
rule_id, such as a non-string value from the server.
Functions§
- pick_
by_ name - Match names exactly. A prefix match could target the wrong rule.
- pick_
by_ name_ capped - Run
pick_by_nameon a candidate page with the server’s candidate total. - resolve
- Resolve selectors, an optional tag, and an optional search to
rule_idvalues. ReturnsNonewhen none is given and the caller should act on every rule. - to_
rule_ id - Resolve a
rule_idor display name against the stack. Tryrule_idfirst because it is unambiguous.