---
title: "latex-test-gate-stage1 — Mova code model"
description: "Mova code model of latex/tests/gate.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/latex/tests/gate.rs.groupant/stage1.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/latex/tests/gate.rs.groupant/stage1.groupant/>

# latex-test-gate-stage1

The groupant beside latex/tests/gate.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:** [`latex/tests/gate.rs`](https://github.com/ElamurAI/mova-free/blob/main/latex/tests/gate.rs)
- **source SHA-256:** `710172ffe064b1fe…`
- **covers:** Golden cases compare exact LaTeX or text. Unknown test checks ordered names and source slices for two command spans, then roundtrip and canonical output. Malformed cases compare expected ErrorKind/position plus Unicode column/context. Fault test requires some of SwapFrac/DropSup/DropLast to turn each affected fixture red, then verifies an unaffected swap stays green. (bytes 5303–10189)
- **part of:** [latex-test-gate](https://md.groupants.elamur.ai/free/en/mova/latex/tests/gate.rs.groupant/)
- **repository folder:** [`latex/tests/gate.rs.groupant/stage1.groupant`](https://github.com/ElamurAI/mova-free/tree/main/latex/tests/gate.rs.groupant/stage1.groupant)
- **repository commit:** `855da7bd4a7b`

> **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` |
| **composition** | partial | [composition](#composition) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **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) |
| `fault_quantifier` | fault_quantifier | partial source derived model | [fault_quantifier](#fault-quantifier) |
| `coordinate_oracle` | coordinate_oracle | partial source derived model | [coordinate_oracle](#coordinate-oracle) |

## Model text


### descriptant

#### latex-test-gate-stage1

Golden cases compare exact LaTeX or text. Unknown test checks ordered names and source slices for two command spans, then roundtrip and canonical output. Malformed cases compare expected ErrorKind/position plus Unicode column/context. Fault test requires some of SwapFrac/DropSup/DropLast to turn each affected fixture red, then verifies an unaffected swap stays green.

Epoch 2026-10-31: replaced stage topic lists with concrete transitions, exclusions and compatible antecedents. Four meaningful typed views replace the previous six-view bookkeeping catalog. Shared syntax and source byte bounds are unchanged.

### approximant

#### Scoped forward relation

Golden cases compare exact LaTeX or text. Unknown test checks ordered names and source slices for two command spans, then roundtrip and canonical output. Malformed cases compare expected ErrorKind/position plus Unicode column/context. Fault test requires some of SwapFrac/DropSup/DropLast to turn each affected fixture red, then verifies an unaffected swap stays green.

This is an exact source-derived partial model, not an executable approximate replacement.

### invariant

#### Scoped invariants

A corrupt printer that alters no listed affected observation may escape this test; red is not required for every fault/fixture pair. Unknown order or checked source coordinates cannot change while those assertions still pass.

For each affected fixture exists a fault producing non-Ok; this is not for every fixture every fault. Symmetric fraction arguments can also hide a swap in general.

Unlike structural gate, source slicing explicitly validates stored start/end for norm and R commands; Unicode column/context asserts conversion from byte positions for one malformed formula.

### composition

#### Scoped interaction

These tests constrain three distinct observations: canonical bytes, lossy text and structural/coordinate behavior. Their results cannot be substituted for each other.

The manifest binds this stage to the unchanged parent syntax projection and exact source byte range. Parent cost remains an upper accounting context; no independent whole-file invocation or execution count is assigned to this fragment.

### models

### behavior_complement

A corrupt printer that alters no listed affected observation may escape this test; red is not required for every fault/fixture pair. Unknown order or checked source coordinates cannot change while those assertions still pass.

### reverse_reconstruction

A green faulty-gate result on x+y with SwapFrac is compatible with a no-op because no fraction exists; red on a/b does not identify whether numerator/denominator or another structural component changed. Expected byte errors constrain those literals but not all equal-kind inputs.

### fault_quantifier

For each affected fixture exists a fault producing non-Ok; this is not for every fixture every fault. Symmetric fraction arguments can also hide a swap in general.

### coordinate_oracle

Unlike structural gate, source slicing explicitly validates stored start/end for norm and R commands; Unicode column/context asserts conversion from byte positions for one malformed formula.

### tests

#### Evidence — 2026-10-31

7 integration tests via --test gate with document and soup skipped

Selected library filters ast:: lex:: macros:: parse:: print:: table:: and integration gate excluding document_extraction_with_preamble_macros and random_token_soup_never_panics_and_roundtrips. Direct rustc --test latex/build.rs exercises private helpers. All selected tests twice debug/release with identical sorted names. Four compiled mutants at build/AST/parser/printer boundaries fail assertions then exact restoration passes. These do not individually cover every source. Build-main failure effects, allocation failures and universal roundtrip are unproved. Strict Clippy reports existing lints. No corpus/live VMM/API/GPU/full-school/held-out tests.
