---
title: "roundtrip-markdown-layout-inline-layout — Mova code model"
description: "Mova code model of tools/roundtrip/src/blocks/site_md.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/roundtrip/src/blocks/site_md.rs.groupant/inline-layout.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/roundtrip/src/blocks/site_md.rs.groupant/inline-layout.groupant/>

# roundtrip-markdown-layout-inline-layout

The groupant beside tools/roundtrip/src/blocks/site_md.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

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`tools/roundtrip/src/blocks/site_md.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/roundtrip/src/blocks/site_md.rs)
- **source SHA-256:** `ced26c9c453717c6…`
- **covers:** Byte scanner handles escapes, link opens/closes, star/backtick runs and HTML/autolink tags; otherwise advances by next scalar. link_close balances brackets and skips escaped bytes. (bytes 6318–9596)
- **part of:** [roundtrip-markdown-layout](https://md.groupants.elamur.ai/free/en/mova/tools/roundtrip/src/blocks/site_md.rs.groupant/)
- **repository folder:** [`tools/roundtrip/src/blocks/site_md.rs.groupant/inline-layout.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/roundtrip/src/blocks/site_md.rs.groupant/inline-layout.groupant)
- **repository commit:** `48f2e6f74146`

> **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

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant-and-cost](#invariant-and-cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant-and-cost](#invariant-and-cost) |
| **tests** | executed bounded checks | [tests](#tests) |

## 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.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `escaped_ascii` | escaped_ascii | partial source derived model | [escaped_ascii](#escaped-ascii) |
| `link_stack` | link_stack | partial source derived model | [link_stack](#link-stack) |
| `tag_heuristic` | tag_heuristic | partial source derived model | [tag_heuristic](#tag-heuristic) |
| `scalar_step` | scalar_step | partial source derived model | [scalar_step](#scalar-step) |

## Model text


### descriptant

#### Description and epoch memory

Byte scanner handles escapes, link opens/closes, star/backtick runs and HTML/autolink tags; otherwise advances by next scalar. link_close balances brackets and skips escaped bytes.

##### 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

Byte scanner handles escapes, link opens/closes, star/backtick runs and HTML/autolink tags; otherwise advances by next scalar. link_close balances brackets and skips escaped bytes.

Domain: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

Generated offsets never fall inside emitted UTF-8 scalars; no normalization of ordinary prose characters. Not a full CommonMark parser.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

### reverse_reconstruction

with_marks(text,marks)=input for admitted generated layout. text alone does not recover links, emphasis or tags; equal-offset sequence remains required.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

### escaped_ascii

Backslash before ESCAPABLE is markup; following ASCII character is prose.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

### link_stack

Only balanced bracket with following '(' and a later ')' opens; closing target ends at first ')'.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

### tag_heuristic

HTML recognition depends on first character/no-space or http prefix or '='; arbitrary angle prose may remain.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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

### scalar_step

Non-special bytes are decoded as one scalar and advance len_utf8, so offsets refer to valid boundaries.

Domain and held state: UTF-8 strings; generated marks in nondecreasing valid byte coordinates; finite representable sums. Environment chrome/repeat flags held fixed; actual filesystem listing/sampling not exercised.

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


### tests

#### Actual checks

- `blocks::site_md::tests::a_page_gives_itself_back_and_its_prose_goes_up`
- `blocks::site_md::tests::inline_marks_and_order`

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

Generated offsets never fall inside emitted UTF-8 scalars; no normalization of ordinary prose characters. Not a full CommonMark parser.

with_marks(text,marks)=input for admitted generated layout. text alone does not recover links, emphasis or tags; equal-offset sequence remains required.

##### Cost

O(B²) worst-case repeated suffix searches; O(B) text+marks output.

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.
