Documentation
¶
Overview ¶
Package corpus turns captured records into the browsable golden tree: one directory per scenario, one file per emitted moment, named so an ordered fan-out is self-describing (watch.deleted.cm-a.yaml, ...). A single recorded observation drives both lab layers; this package owns the corpus (golden YAML) layer. The corpus changes only when behavior changes, because the normalizer has already rewritten every volatile field.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare verifies the built moments match the committed files under dir. It returns a non-nil error describing the first divergence — a missing file, a content drift (with a unified diff), or a stray file — and writes nothing. A corpus diff in a PR is a signal, not noise: Kubernetes behavior changed, the capture changed, or the cluster version moved.
Types ¶
type Moment ¶
Moment is one normalized record rendered to a single corpus file.
func Build ¶
func Build(records []mutationlab.Record) ([]Moment, error)
Build normalizes a scenario's records into one shared placeholder space and renders each to a deterministically named YAML moment. Records are expected in observation order; that order — and the per-base discriminator — make the fan-out and event sequencing self-describing on disk.