Expand description
Motif grammar layer.
The grammar consumes a crate::residual::ResidualStream and emits a
sequence of episodes: typed, time-bounded structural events that
correspond to operator-recognisable database health states. The grammar
is deterministic (same input → same output, bytewise) and
observer-only (no engine state is touched).
Each motif class is a small state machine over a single residual class, parameterised by:
- the DSFB observer (drift / slew thresholds via
dsfb::DsfbObserver) - an envelope (deterministic threshold band)
- a minimum dwell time (debounce against single-sample blips)
Parameters are loaded from spec/motifs.yaml (see MotifGrammar::from_yaml)
so that the paper, the crate, and the operator’s deployment all share the
same numbers.
Modules§
- envelope
- Drift / slew envelope semantics.
- motifs
- Per-motif state machines, all driven by
dsfb::DsfbObserver. - replay
- Deterministic replay.
Structs§
- Episode
- A single motif episode: a typed structural event with an explicit boundary. The CLI emits these as JSON; the paper figures plot them.
- Motif
Engine - The thing that runs the grammar over a stream and emits episodes.
- Motif
Grammar - The whole grammar: one parameter set per motif class.
- Motif
Params - Per-motif tunable parameters. Loaded from
spec/motifs.yaml.
Enums§
- Motif
Class - One of the five motif classes the paper claims.