Expand description
The language a policy’s predicate is written in — an open union, the same
shape bot.did.registration’s actor union already uses and the same
shape this crate gave SubjectKind:
Known plus Unknown.
The owner’s framing: “an open union of known types. This includes at
least like… regex, and cedar? And then people who want something
different need to patch the binary and write a new policy type.” This is
that union. It names nothing about how a wrapper record spells its
language — plan/policy.md leaves the wrapper’s shape unsettled — only
which languages a build can turn into a working
Evaluator.
§What a build does with a language it does not have
It holds the policy and refuses what it covers; it does not fail to
parse the record. A loader resolving a wrapper’s declared language to a
Predicate turns Language::Unknown into
Predicate::Unusable — that
variant’s doc comment names an unknown language as its motivating case —
never into a parse failure for the record as a whole. The rest of the
record (its applicability) is still known-good data even when its
language is not, and Predicate::Unusable is what lets the tree deny
exactly that applicability instead of everything or nothing.
Enums§
- Known
Language - The evaluator languages this workspace names. Naming a member here is
naming a sibling crate that implements
Evaluatorfor it — a decision for whoever maintains this workspace, not something a policy record can request into existence — but naming one ahead of the crate that implements it is exactly what an open union is for: it makes that crate’s later arrival an addition to this list, not a change to its shape. - Language
- A policy language, known to this build or not.