Expand description
Endpoint-id charset contract — the addressable-name validator.
Every addressable endpoint id/name is restricted to a deliberately narrow charset so that:
:and@stay reserved as the future address delimiters of the canonical qualified form[subnet:]id[@node](ADR-0006 / REQ-INST-10) — no bare id can ever contain them, so qualified-address parsing is unambiguous and no permissive id-data accumulates that would need a later migration;- path separators, whitespace, and control characters cannot smuggle into a perch directory name or a wire target string.
Allowed: ASCII alphanumeric, -, _, and the Japanese script blocks
(Hiragana, Katakana, CJK Unified Ideographs). Nothing else. The existing
Psyche (<parent>-psyche) and Worker (<parent>-w<N>) suffix scheme uses
only - + alphanumerics, so composite ids validate cleanly.
Enums§
- IdError
- Why an endpoint id was rejected.
Constants§
- MAX_
ENDPOINT_ ID_ LEN - Maximum endpoint-id length, in Unicode scalar values.
Functions§
- is_
allowed_ id_ char - True if
cis permitted in an endpoint id. - is_
valid_ endpoint_ id - Convenience boolean form of
validate_endpoint_id. - validate_
endpoint_ id - Validate an addressable endpoint id/name against the charset contract.
Returns
Ok(())if every scalar is allowed and the length is in1..=MAX.