Skip to main content

Module gff_compare

Module gff_compare 

Source
Expand description

Comparing a rewritten GFF tree against its original. Comparing a GFF tree against the one it was derived from.

A typed view reads a GFF, models some of it, and writes it back. Two questions decide whether that was faithful, and neither can be answered by looking at the view alone:

  • Did every field it rewrote keep the value the original had?
  • Did it write a label the original never had?

Both are pure tree work: which labels are present, and whether the values under them match. Nothing here knows what a module or a creature is, which is why it sits in this crate rather than above it.

Both the test suite and vanilla-inspector use these. That is the point: if the tool and the tests grew separate implementations, the tool’s verdict would quietly stop meaning what the tests’ verdict means, which is the same parallel-definition drift that has produced real defects here before.

§What this does not decide

Whether a difference is a defect. A view is a projection and is entitled to drop fields, and a label written but absent from every file may be a field the engine omits at its default rather than a wrong label. The caller supplies that judgement; this module supplies the observation.

Structs§

CaseVariantGroup
A family of labels that differ only by letter case.
LabelCensus
Which labels a view writes that no file was seen to contain, accumulated over a corpus.
LabelObservation
What a corpus was seen to carry under one label.
LeafPathSplit
One leaf label the view models at some of its corpus paths and not others.
ValueDifference
One field whose value changed between the original and the rewrite.

Enums§

InventedLabels
Whether a corpus can decide the invented-label question at all.

Functions§

value_differences
Reports every field the rewrite changed the value of.