epiphany/crates/epiphany-testkit/src
Levi Neuwirth a9a57120e9 Text Projection: whole-document conformance, and a corpus with teeth
Thirteen drift-locked document vectors -- four accept, nine reject, one per
implemented rejection class -- gated as conformance step [7e] beside [7d]'s 65
decode vectors.

The checker distinguishes three outcomes, and that distinction is the whole
point. `Rejected`, `AcceptedCanonical`, and `AcceptedNonCanonical` are separate
verdicts, and every one of the four wrong pairings is a failure: an accept vector
that merely normalizes fails, and a reject vector that is accepted -- whether as
canonical or after normalization -- fails. The decode corpus learned this the
expensive way, where collapsing "rejected" with "accepted but normalized" let a
corpus pass against the exact decoders it was written to catch.

Accept vectors assert the byte-checkable equation `project(serialize(parse(T)))
== T`, which quantifies over TEXTS. The comments say plainly that it must not be
replaced with bundle identity, and name the three deliberate binary losses --
duplicate blobs collapsing under derived-ordering, regenerated physical layout,
and dropped accelerators -- so the next reader does not "fix" it into a bundle
comparison and then chase a phantom.

Reach is asserted exactly, not merely non-zero: two documents each carrying an
extension, a canonical base, a custom profile, a lineage, and more than one
envelope; and every reject class must have exactly one vector the parser really
refused. A mislabelled reject drops its class to zero rather than collecting
credit from its label.

The corpus was verified by breaking the implementation, not the checker: making
`parse_document` silently tolerate a missing trailing LF is caught three ways,
and the suite reports "declared reject, but was ACCEPTED and normalized".

Review fixed one defect in the semantic harness. It claimed to check
`semantics(parse(project(B))) == semantics(B)` but compared `parse(project(B))`
against `document_from_bundle(B)` -- and `project_bundle` *is*
`project_text_document(document_from_bundle(..))`, so both sides flowed through
one function and any bug in it cancelled out. Dropping an envelope there passed.
It now compares against the envelopes the test itself serialized in, which is
independent of the projection path; the same mutation fails.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 15:44:25 -04:00
..
budget.rs Push 4: Binary Format companion, F1 benches, subquadratic reduction order 2026-07-02 19:02:07 -04:00
bundle_harness.rs Phase B follow-up: real acceleration-snapshot path + base role bound 2026-07-07 16:54:06 -04:00
convergence.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
corpus.rs Schema major 2 Phase B: snapshot side + honest stamps (data-model fills) 2026-07-07 16:30:07 -04:00
editloop.rs Stop the conformance suite from authoring the frozen operation 2026-07-09 15:50:22 -04:00
equivocation.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
fixtures.rs Two more glyph-members assumptions in the vertical-density axis (QMC 0.3.0) 2026-07-09 11:39:28 -04:00
generators.rs Schema major 2 Phase D: the repeat-authoring pair (code tranche) 2026-07-07 20:06:18 -04:00
layout_stub.rs P13-I2: Staff::default_clef is the fallback, not decoration 2026-07-09 14:47:42 -04:00
lib.rs Text Projection: whole-document conformance, and a corpus with teeth 2026-07-21 15:44:25 -04:00
migration.rs Agent K M1 review follow-up: correct two doc-accuracy findings 2026-06-24 13:06:22 -04:00
negative.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
prepass_harness.rs G-pass follow-up: unsupported pre-pass algorithm ids error 2026-07-07 11:32:05 -04:00
reference_suite.rs Straighten the QMC version story in the docs that assert it 2026-07-09 11:54:25 -04:00
rng.rs A B C D F 2026-06-19 12:42:31 -04:00
roundtrip.rs Phase B follow-up: real acceleration-snapshot path + base role bound 2026-07-07 16:54:06 -04:00
textproj.rs Text Projection: whole-document conformance, and a corpus with teeth 2026-07-21 15:44:25 -04:00
vectors.rs One tag vocabulary the compiler owns, and ratify the corpus in the companion 2026-07-09 20:32:35 -04:00