pub enum FeatureId {
EditDistance1,
EditDistance2,
TokenReorder,
SupersededToken,
BaseRateCommonMarking,
StrictContextClassification,
CorpusOverrideInEffect,
}Expand description
Closed enumeration of features the decoder can record.
New variants MUST bump the audit schema version (see
MARQUE_AUDIT_SCHEMA in crates/engine/build.rs). Treat this
enum as part of the on-the-wire audit contract.
Variants§
EditDistance1
Observed form is edit-distance 1 from a canonical token.
EditDistance2
Observed form is edit-distance 2 from a canonical token.
TokenReorder
Observed form is a token-order permutation of a canonical banner/portion shape.
SupersededToken
Observed form is a known CAPCO-2016-superseded token whose
replacement is unambiguous (e.g., COMINT → SI).
BaseRateCommonMarking
The candidate’s base rate in the target corpus dominates the posterior (common-marking prior).
StrictContextClassification
Strict-context classification floor (FR-011) applied — e.g., banner at TOP SECRET forces a strict posterior for classification tokens at ≥ that level on the same page.
CorpusOverrideInEffect
Corpus-override data (opt-in, non-WASM, non-server) shifted the posterior. Recorded so an auditor can identify fixes produced under organizational overrides vs. stock priors.
Implementations§
Source§impl FeatureId
impl FeatureId
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Canonical on-the-wire string label for this feature.
This is the single source of truth for FeatureId → audit-record-string projection. Audit emitters (CLI, WASM,
server) and snapshot tests MUST call this method rather than
re-implementing the match. A new FeatureId variant added
without a matching as_str arm fails the exhaustiveness check
here at compile time, so the on-the-wire contract cannot drift
silently across emitters.
Returns a &'static str so callers can embed the value in
zero-copy serialization paths (Serialize derives,
serde_json::json! etc.) without an allocation.