Skip to content

release(v8.7.0): forward-direction lossless verification (MR-ROUNDTRIP) - #95

Merged
aimsise merged 3 commits into
mainfrom
impl/forward-lossless-mr
Jun 23, 2026
Merged

release(v8.7.0): forward-direction lossless verification (MR-ROUNDTRIP)#95
aimsise merged 3 commits into
mainfrom
impl/forward-lossless-mr

Conversation

@aimsise

@aimsise aimsise commented Jun 23, 2026

Copy link
Copy Markdown
Owner

v8.7.0 — forward-direction lossless verification (MR-ROUNDTRIP)

TL;DR. Adds the write-side counterpart to the parse-side MR-CANONICAL in the executed accept-set sweep. When a ticket pairs a reader (parse / decode) with a canonical writer (format / serialize / encode) that advertises a round-trip / lossless / exact / canonical guarantee, the ac-evaluator drives exactly-representable values through the real writer and verifies parse(format(x)) === x over a grammar-derived inter-anchor intermediate band — catching a writer that silently rounds an exactly-representable value to a lossy canonical string at rc=0, a class invisible to every parse-side relation.

What's in it (commits b07871e + acd735e + release 9fa5022)

  • MR-ROUNDTRIP (W axis) — fifth metamorphic relation; corpus from the writer's own first-principles grammar, inter-anchor + just-below-promotion extremes, independent parse∘format oracle. New persisted fields roundtrip= / intermediate-sampled=. Twins mirrored byte-identically. CT-AASC-15..22.
  • Deterministic W-axis writer-pairing trigger (/impl Step 3a) — a paired reader+writer advertising round-trip is itself the trigger even when the only lexical cue sits on the reader (parallel to the K-axis clause); the evaluator MUST encode boundary=W roundtrip=y, never an improvised label.
  • Hook forward-depth backstopsP5 (shallow forward: roundtrip=y intermediate-sampled=n) and P6 (round-trip-bearing sweep under a non-W label) block recognition-independently. Fail-OPEN. CT-AASC-23.
  • Gate 4 representation-foreclosure + Gate 9 R1 forward-losslessness (AC authoring) + planner Gate-4 self-audit + Out-of-Scope ENDS-not-MEANS note.
  • Producer generative property-test lock-in (P0-3) — a found leak is locked RED in the committed suite.

Verification

  • test-skill-contracts 865/865 (+ CT-AASC-15..23, CT-MODE-13/14, twin byte-identity CT-EV-MODEL-1, CT-DECONTAM-1 0 hits)
  • test-accept-set-verify 32/32 · test-path-consistency 144/144 · shellcheck clean · twins byte-identical · plugin.json 8.7.0 == newest CHANGELOG [8.7.0]
  • Hook P5/P6 covered by CT-AASC-23 + functional probes; dedicated cases in test-accept-set-verify.sh are a tracked follow-up.

Dogfood evidence

  • dogfood58 (paired byte-size converter) — SPLIT: product correct + forward sweep authored, but the W-axis runtime gate did not engage (round-trip recorded under an off-grammar label) → motivated the deterministic W-trigger + hook P6.
  • dogfood59 (paired parse + format, chain=on / uc=off) — confirmed end-to-end: orchestrator recognized the paired parse/format as the W axis, evaluator encoded canonical boundary=W roundtrip=y intermediate-sampled=y across three tickets, a 9190 IEC + 9004 SI MR-ROUNDTRIP ran with 0 divergences, the shipped format was correct + doc-truthful (README "Round-trip fidelity (caveat)"), committed suite 208/208 locks the round-trip + Unicode-digit complement RED. Zero product defects shipped.

Additive + kill-switched

The W-axis relation only ADDS coverage; absent a paired canonical-writer boundary it never triggers; parse-side relations + A/U/K axes are byte-unchanged; the hook predicates are fail-OPEN. SW_ACCEPT_SET_CONFORMANCE_MODE=off / constraints.accept_set_conformance: off reverts byte-for-byte to v8.6.0.

See CHANGELOG.md ## [8.7.0].

🤖 Generated with Claude Code

aimsise and others added 3 commits June 22, 2026 12:28
…Gate 4 representation-foreclosure

P0/P1 from the dogfood56/57 A/B: a writer that rounds an exactly-representable value
to a lossy canonical string (format(x) lossy at rc=0) slipped through every parse-side
check. Adds forward-direction coverage as a property-based mechanism across the executed
sweep, AC-authoring, producer lock-in, and the determinism hook.

P0-1 (forward MR-ROUNDTRIP, the central fix):
- accept-set-conformance-harness.md: MR-ROUNDTRIP relation + worked shape
  (run_writer_roundtrip / make_value_corpus; grammar-derived inter-anchor band;
  independent parse oracle) as the W-axis forward counterpart to MR-CANONICAL.
- ac-evaluator.md (+ -hi twin, byte-identical): L-ROBUSTNESS MR-ROUNDTRIP duty;
  persisted sweep fields roundtrip=/intermediate-sampled=; intermediate-sampled=n
  self-incrimination on a triggered W boundary.
- accept-set-verify.sh: P5 forward-depth gate (W boundary roundtrip=y
  intermediate-sampled=n -> BLOCK), parallel to P2 astral, same kill-switch/fail-open.

P0-2 (authoring): Gate 9 R1 round-trip clause requires a forward generator sampling
the inter-anchor intermediate band; an anchors-only grid no longer satisfies R1.

P0-3 (durable lock-in): producer (test-writer/implementer/test-authoring-guidance)
commits a GENERATIVE property-test on TRIGGER, unconditional on a found leak, not a
leak-conditional literal -- closes the generation gap both A/B builds reproduced.

P1 (confound): Gate 4 representation-foreclosure rule (a foreclosed numeric type /
precision model under an advertised lossless/exact END is a FAIL) + planner self-audit
wiring + brief Out-of-Scope ENDS-not-MEANS guidance.

Property-based + product-agnostic (CT-DECONTAM-1 = 0 hits); meet-or-beat (additive;
parse-side MRs untouched). Verification: test-skill-contracts 862/862 (+CT-AASC-15..20),
test-accept-set-verify 32/32, test-path-consistency 144/144, ShellCheck clean,
ac-evaluator twins byte-identical (CT-EV-MODEL-1).

P2 (plateau early-exit cost optimization) deferred to a separate increment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKqmv9NH3naVcoWAB3fr22
…ed round-trip sweep (dogfood58)

dogfood58 (efficacy test of b07871e on a data-size format writer) found a SPLIT: the
product was correct (format(1023)="1023 B", trap fixed) and authoring propagated (Gate 9
R1 intermediate-band reached the round-trip AC), but the new W-axis RUNTIME gate never
engaged on the writer -- the round-trip was recorded under an off-grammar label
(boundary=numeric-external roundtrip=n/a) instead of canonical boundary=W, so hook P5 was
structurally un-triggerable. Root cause: the orchestrator's accept-set trigger had a K-axis
recognition clause but NO W-axis sibling for the writer-pairing, and the evaluator was free
to improvise a boundary label -- recognition-variance (the exact failure the AASC determinism
hook exists to remove) re-entered at the label layer.

Defense-in-depth, all property-based (no unit/format vocabulary):
- #1a orchestrator (SKILL Step 3a): a W-axis trigger clause parallel to the K-axis one -- a
  ticket pairing a reader (parse/decode) with a canonical writer (format/serialize/encode)
  advertising round-trip/lossless/exact/canonical MUST include that AC in triggered-on= for
  the W axis, and the evaluator MUST encode boundary=W roundtrip=y.
- #1b ac-evaluator (+ -hi twin, byte-identical): a deterministic label rule on MR-ROUNDTRIP --
  a round-trip/invertibility sweep IS the W axis; never an improvised non-canonical label.
- #2 hook accept-set-verify.sh: new P6 -- a round-trip-bearing sweep (roundtrip=y or
  intermediate-sampled=y) under any non-W boundary is non-conformant by construction -> BLOCK,
  closing the mislabel bypass of P5. Canonical A/U/K lines carry roundtrip=n/a
  intermediate-sampled=n/a so they never trip.
- #3 harness: the MR-ROUNDTRIP corpus MUST deterministically include the maximal-mantissa
  magnitudes below promotion (not random samples that cap short) -- closes the dogfood58
  [MEDIUM] just-below-next-anchor corpus gap.

Verification: test-skill-contracts 865/865 (+CT-AASC-21/22/23), ShellCheck clean, ac-evaluator
twins byte-identical (CT-EV-MODEL-1), CT-DECONTAM-1 0 hits. Functional hook proof
(SW_ACCEPT_SET_CONFORMANCE_MODE=on): the dogfood58 line boundary=numeric-external ...
intermediate-sampled=y now BLOCKS (P6); canonical boundary=W roundtrip=y intermediate-sampled=y
passes; shallow boundary=W intermediate-sampled=n still blocks (P5); canonical boundary=A passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKqmv9NH3naVcoWAB3fr22
Bump plugin.json to 8.7.0 and add the CHANGELOG [8.7.0] entry for the
forward-direction lossless verification feature (commits b07871e + acd735e):
the W-axis MR-ROUNDTRIP relation in the executed accept-set sweep, the
deterministic W-axis writer-pairing trigger (/impl Step 3a), the hook P5/P6
forward-depth backstops, Gate 4 representation-foreclosure + Gate 9 R1, and
the producer generative property-test lock-in.

Pre-flight: test-skill-contracts 865/865 (+ CT-AASC-15..23, CT-MODE-13/14),
test-accept-set-verify 32/32, test-path-consistency 144/144, ShellCheck clean,
ac-evaluator / ac-evaluator-hi byte-identical sans name:/model:.

Validated live by dogfood59 (paired parse+format subject): boundary=W
roundtrip=y intermediate-sampled=y fired end-to-end across three tickets
(corpus 9190 IEC + 9004 SI, 0 divergences), the shipped writer was correct
+ doc-truthful, and the committed suite (208/208) locks the round-trip +
Unicode-digit complement RED.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZoJM8ViKq39XLyYrWRVjx
@aimsise
aimsise merged commit bf6042e into main Jun 23, 2026
2 checks passed
@aimsise
aimsise deleted the impl/forward-lossless-mr branch June 23, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant