mova-json-tests
The groupant beside tools/mova-json/src/tests.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
| component | label | where |
|---|---|---|
| approximant | source derived partial | forward |
| ast | partial | syntax.json |
| cost | source derived partial | cost |
| descriptant | present | epoch-memory |
| invariant | source derived partial | invariant |
| tests | bounded native evidence | checks |
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 |
|---|---|---|---|
mova-json-tests-behavior-complement | behavior_complement | partial source model | behavior-complement |
mova-json-tests-reverse-reconstruction | reverse_reconstruction | partial source model | reverse-reconstruction |
Model text
domain
The crate's library under cargo test, the repository's real JSON files (peta files optional in public checkouts) and temporary git repositories under the system temp directory.
forward
Twelve tests: real-file round trip with layout mutation controls; escape/lexeme preservation; path edits with ambiguity/missing controls; sorted insertion; replace_str; JSONL; merge clean cases; merge true conflicts with a same-change control; offset mapping with an identity control; rebind with stale/missing/non-canonical controls; rebind_groupant with a TEXT CHANGED control; merge3_file inside a real conflicting git merge.
invariant
Each positive check has a paired red control in the same test or a recorded mutation run; temporary directories are per-process and removed by the test that made them.
cost
About 0.1 s release (2026-11-05), dominated by parsing contracts.json and git subprocesses.
behavior-complement
Not covered: concurrent writers, files over hundreds of MB, Windows paths, criss-cross merges with several merge bases, non-UTF-8 JSON.
reverse-reconstruction
A failing test name identifies the violated property; it does not identify the mutated line.
checks
cargo test --offline --release --manifest-path tools/mova-json/Cargo.toml: 12 passed (2026-11-05, two identical runs).
epoch-memory
2026-11-05: initial suite with mutation controls recorded in merge.rs.groupant/model.md.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/mova-json/src/tests.rs.groupant/