Skip to main content

CANONICAL_RELATIONS

Constant CANONICAL_RELATIONS 

Source
pub const CANONICAL_RELATIONS: &[&str];
Expand description

The 12 well-known relation types, in the ONE spelling this crate stores.

v1.2.8: kebab-case. The list used to be snake_case while the JSON Schema handed to the extraction model (enrich::schemas) declared the same twelve names in kebab-case, and enrich::extraction_body persisted the model’s answer verbatim. The result was a store split across two spellings of the same relation — measured at 67 651 kebab edges against 3 578 snake ones over three production databases, so the spelling this constant called canonical was the one 5% of the data used.

The split was invisible because every read filter normalises before a LITERAL WHERE: related --relation applies-to returned zero rows, exit 0, on a hub that has applies-to edges. Instruments read the wrong scale for the same reason — health.applies_to_ratio reported 0.0085% where the true share is 17.8%, a factor of 2098.

Only the three multi-word relations can differ at all, and those are exactly the ones carrying hierarchy: applies-to, depends-on, tracked-in.

Non-canonical relations are accepted but emit a tracing::warn!.