mova-whale-world-export-tests
The groupant beside tools/whale-world/src/export/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 | partial | Forward approximant |
| Ast | partial | syntax.json |
| Composition | partial | Composition |
| Cost | partial | Cost |
| Descriptant | present | Descriptant |
| Invariant | partial | Invariant |
| Tests | finite evidence | tests.md |
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.
| relation | type | label | where |
|---|---|---|---|
| Behavior complement | behavior complement | partial source derived model | Behavior complement |
| Reverse reconstruction | reverse reconstruction | partial source derived model | Reverse reconstruction |
Model text
Descriptant
Tests of the texts export on a fixture: a batch log with an early batch, a passed and a stopped paper, one learner state with a passing and a later failing round and a terminal knowledge item, and a dossier holding the original, a CC BY-SA page, an earlier description, a consultant draft and a Mova draft equal to the description. Source: tools/whale-world/src/export/tests.rs.
Forward approximant
fixture -> passed (from_batch 13, control 12) ; export -> files -> asserts on citations, body, shadows -> export again -> no writes, same bytes -> fresh repository -> same bytes ; edit article and seo.json, change upstream -> export -> kept and reported twice -> undo edit -> upstream written ; foreign file -> kept ; every file free of held sentences ; ref_mentions and seal/intact with controls.
Invariant
No model and no network; each test uses its own temporary directory.
Cost
About 20 ms.
Composition
Parent: mova-whale-world-export; cfg(test) only; uses the dossier test helpers (cfg, tmp).
Behavior complement
Does not exercise the library (no refs.json, no library works), topic-corpus provenance, pod items or paragraph mode; not a proof. Evidence status: source-derived model with finite checks, not a proof.
Reverse reconstruction
Not applicable beyond the fixtures, which are rebuilt in each run.
tests.md
cargo test --release --manifest-path tools/whale-world/Cargo.toml --offline (export::tests, 5 tests, no model needed; whole crate 14 tests green with WORLD_EN_MODEL=en.bin.2026-11-05-redact, 2026-11-05): selection by batch and gates with a from_batch negative control; sentence-run citations, markers stripped equal to the description, shadows without the duplicate Mova draft, second run writes nothing, a fresh repository byte-identical; an edited article and an edited seo.json kept on two runs, the upstream change let through once the edit is undone, a foreign file kept; a CC BY-SA page and the original cited by URL/file name and licence, their sentences absent from every file (the dossier holds them: control); reference mentions with wrong-year and no-surname controls; seal and intact.
Negative controls 2026-11-05 (each red, then restored): edit gate disabled (edited test red); held original and page texts written as shadows (idempotence and never-copied tests red); a clock value in the front matter (idempotence test red).
Live 2026-11-05: 83 papers into a texts-repository worktree, second run 0 written / 272 unchanged; a fresh export into a scratch directory identical by diff -r.
These are finite fixtures and live samples; not a proof.
Provenance
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/whale-world/src/export/tests.rs.groupant/