epiphany/spec
Levi Neuwirth fdb4a57885 Text Projection: the operation layer, and the tests that can see it fail
Projection and strict parse for the whole Chapter-6 operation vocabulary: the 31
kind productions, the envelope with its stamp and causal context, the four
payload variants, and the sub-vocabularies for actions, undo policies, tuplet
compensation, cross-cutting values and position remapping. Written against the
grammar, per `req:textproj:operation-vocabulary`, calling `TextValue` only where a
production says `value`.

Names are generated, never spelled: `OperationKindTag::catalog_name()` comes from
the same vocabulary macro as the wire discriminant and the decoder, and `parse`
dispatches through an exhaustive match, so a kind added to the vocabulary and not
to the projector fails to compile.

Six sequences are order-constrained because their encoders normalize. Both halves
of each are enforced and both halves are tested, which turned out to matter. The
rejecting half was straightforward -- `TransposeOp.targets` mirrors the frozen
multiset exactly, rejecting a strict decrease while accepting a duplicate, and
getting that backwards would silently break a frozen operation's replay. The
*normalizing* half was written correctly by every agent and tested by none: every
fixture was already sorted, so all five outbound sorts survived deletion with the
suite green. The consequence was real -- with one removed, the projector emits
descending targets that its own parser then rejects, and that disagree with the
canonical bytes.

`textproj_conformance.rs` closes that. Each of the five builds a value unsorted in
memory, asserts the fixture pair really is descending before relying on it, then
checks the projection sorts, parses, and matches what encode-then-decode produces
-- pinning text and bytes to one normalization rather than merely to each other.

It also carries a structural injectivity sweep: 3319 mutants of projected
envelopes, of which 259 parse, all re-projecting byte-identically. That is
`req:textproj:roundtrip`'s second equation, and it is the evidence that no
whole-line re-project guard is needed -- every path that could normalize is
pre-empted by a per-site check. The sweep asserts its own reach, because one that
rejected everything would prove nothing. Deleting any per-site order check makes
it fail independently of the dedicated test.

And it locks the companion's worked example byte-for-byte. It was correct and
nothing kept it so, which is how a "machine-checked" claim became true of one run
and of nothing durable at 0.3.0.

All seven checks mutation-verified, each killed by exactly its own named test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 13:43:09 -04:00
..
vectors One tag vocabulary the compiler owns, and ratify the corpus in the companion 2026-07-09 20:32:35 -04:00
CONTRACT_TEXTPROJ_OPS.md Text Projection: the operation layer, and the tests that can see it fail 2026-07-21 13:43:09 -04:00
PASS11_RATIFICATION_LOG.md P12-I2: wire the ratified MUSCLOID layout-object id derivation 2026-06-27 12:46:19 -04:00
PASS11_WORKLIST.md Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
PASS12_BATCH.md Pass 12 G-pass: ratify the full batch (28 rows) — spec tranche 2026-07-07 10:23:30 -04:00
PASS12_RATIFICATION_LOG.md Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
PASS12_WORKLIST.md Pass 12 G-pass: ratify the full batch (28 rows) — spec tranche 2026-07-07 10:23:30 -04:00
PASS13_CANDIDATES.md P13-S3: the engraved spelling set is a shared undo key, not the transpose's 2026-07-09 17:29:05 -04:00
PHASE2_F_WEEK0_WORKLIST.md Phase 2: spelling + decomposition pre-passes (Agent H) with F merge gate 2026-06-23 16:33:39 -04:00
PHASE2_QUICKSTART.md Phase 2: spelling + decomposition pre-passes (Agent H) with F merge gate 2026-06-23 16:33:39 -04:00
PLAN_TEXTPROJ_OPS.md Text Projection: the operation layer, and the tests that can see it fail 2026-07-21 13:43:09 -04:00
QUICKSTART.md Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
binary_format.pdf Text Projection design gate: the companion the core spec delegates to 2026-07-09 21:13:40 -04:00
binary_format.tex Text Projection design gate: the companion the core spec delegates to 2026-07-09 21:13:40 -04:00
core_spec.pdf Text Projection 0.2.0: the gate was lossy, and the cause was one missing rule 2026-07-09 21:34:36 -04:00
core_spec.tex Text Projection 0.2.0: the gate was lossy, and the cause was one missing rule 2026-07-09 21:34:36 -04:00
operation_catalog.pdf The pitch/spelling undo unit is broader than the transpose, on purpose 2026-07-09 18:15:43 -04:00
operation_catalog.tex The pitch/spelling undo unit is broader than the transpose, on purpose 2026-07-09 18:15:43 -04:00
quality_metric_catalog.pdf Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
quality_metric_catalog.tex Two-sided inter-staff renegotiation, and the cascade defect it uncovered 2026-07-09 13:32:37 -04:00
reference_suite.pdf Schema major 1 Phase A: ratify the v1 wire form + migration (spec only) 2026-07-05 18:05:38 -04:00
reference_suite.tex Schema major 1 Phase A: ratify the v1 wire form + migration (spec only) 2026-07-05 18:05:38 -04:00
text_projection.pdf Text Projection 0.6.0: the operation vocabulary is grammar-directed 2026-07-21 13:42:21 -04:00
text_projection.tex Text Projection 0.6.0: the operation vocabulary is grammar-directed 2026-07-21 13:42:21 -04:00