Elamur GroupantsโŒ•
โ˜ฐ

roundtrip-site-dictionary-codec-literal-transport

The groupant beside tools/roundtrip/src/blocks/site_learn.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

Facts

Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

Components

componentlabelwhere
approximantpartialapproximant
astpartial../syntax.json
costsymbolic source derivedinvariant-and-cost
descriptantpresentdescriptant
invariantpartialinvariant-and-cost
testsexecuted bounded checkstests

Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
slash_orderslash_orderpartial source derived modelslash_order
unknown_escapeunknown_escapepartial source derived modelunknown_escape
trailing_slashtrailing_slashpartial source derived modeltrailing_slash
piece_mark_orderpiece_mark_orderpartial source derived modelpiece_mark_order

Model text

descriptant

Description and epoch memory

Sequential escape replacements and scalar unescape; markup extraction concatenates Markup pieces then blocks' mark strings.

Epoch 2026-10-31

Prospective model retained externally before edits. Existing production bytes preserved; only bounded inline tests appended to six owned files. Models distinguish byte reconstruction with residual from semantic understanding and persistent learning. Finite tests and compiled mutants support selected boundaries only. Source inspection identified noninjective projections and explicit admissibility restrictions; no bug repair or performance claim.

Combiner input is this source snapshot, syntax projection, models, costs and retained receipts. Proposed next epoch: target the stated unexecuted branches with bounded witnesses before expanding any claim. AST remains partial, macros opaque; no name resolution or proof.

approximant

Forward relation

Sequential escape replacements and scalar unescape; markup extraction concatenates Markup pieces then blocks' mark strings.

Domain: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

No executable percentage surrogate is supplied: these categorical codec/effect observations have no justified lossy metric. Future caps are 1/2/5/10% only after defining metric, zero behavior and differential reference.

catalog

Source-bound typed models

Each section is a partial source-derived relation on the bound snapshot and declared domain; finite checks are falsification evidence, not a universal proof. Observation horizon is one call unless history is explicitly named.

behavior_complement

Encoded text has no literal tab/newline; extraction omits Layout, Meta and text bodies.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

reverse_reconstruction

Encoded-domain left inverse recovers exact strings; arbitrary escape preimage includes unknown escape variants. Extraction preimage contains all placement/class assignments yielding same ordered list.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

slash_order

Original backslash becomes two before control escaping.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

unknown_escape

unesc of slash plus q yields q; no validation error.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

trailing_slash

A final solitary slash is emitted literally.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

piece_mark_order

All qualifying pieces precede inline marks in block order.

Domain and held state: String codec all UTF-8. Count/saved-byte products representable. Pure helpers only; CLI learning, model adaptation, global installation and filesystem writes unexecuted.

Status: partial source-derived model. Oracle: the named scoped tests in tests.md; unexercised branches remain inspection hypotheses.

tests

Actual checks

The listed parent/source tests exercise only their named mechanisms; other model statements are source inspection. Sixteen selected actual roundtrip library tests passed twice debug and twice release (64 exact-name executions), with identical sorted test outcomes. Eight compiled production-behavior mutants, one per source, failed assertions; exact originals were restored and the selected check passed. No assertion-only mutants or surviving compiled mutants. An initial mutation selector was ambiguous and stopped before writing that source; corrected selector retained separately.

Raw logs, numeric statuses, original/restored hashes, prospective.md, native-commands.json and syntax pairs: $MOVA_DATA/runs/octopus-wave32-rt_blocks-2026-10-31. No live model/corpus/site/learning workflow or full pipeline was executed.

invariant-and-cost

Invariants and cost

Encoded text has no literal tab/newline; extraction omits Layout, Meta and text bodies.

Encoded-domain left inverse recovers exact strings; arbitrary escape preimage includes unknown escape variants. Extraction preimage contains all placement/class assignments yielding same ordered list.

Cost

O(B) codec time/space and O(P+M+B) extraction.

Integer additions/products and allocation sizes must fit native types. Floating costs require finite values; no throughput or all-input guarantee follows from synthetic tests.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/blocks/site_learn.rs.groupant/literal-transport.groupant/