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

# mova-topic-corpus-corpus

The groupant beside tools/topic-corpus/src/corpus.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
- **status:** partial source bound model
- **source:** [`tools/topic-corpus/src/corpus.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/topic-corpus/src/corpus.rs)
- **source SHA-256:** `569c654dc5133078…`
- **repository folder:** [`tools/topic-corpus/src/corpus.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/topic-corpus/src/corpus.rs.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 | [Forward approximant](#forward-approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Descriptant](#descriptant) |
| **invariant** | partial | [Invariant](#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.

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

## Model text


### Descriptant

Stage 3: the closed topic corpus, lazy: a registry of documents (paper, author note, web page, consultant draft) whose originals stay where they are and stay compressed (library texts, Sea Spider's zstd store, zstd originals/), parsed on request whole (one discourse context per document) into UD words, frames and issues; the hot neighbourhood parsed at build and pinned; a bounded LRU parse cache; explanations of terms; the public gate and export. Source: `tools/topic-corpus/src/corpus.rs`.

### Forward approximant

register(doc,text): internal_only := true, public_admissible := licence rule, sha256, stored originals compressed. parsed(id): cache hit (sha, reader) -> decode; else text -> sha check -> annotate (whale reader parts/admitted sentences -> frames::read with one Ctx -> words with original forms, frames, issues incl. no_skeleton) -> zstd cache -> evict LRU non-hot over cap -> hard cases recorded. explain: text prefilter, then parse only documents containing the term; score definitional patterns and roles.

### Invariant

Every document is internal; only open-licensed library texts are public-admissible; a changed original is refused, not silently re-read; hot documents are never evicted; files are 0600 in 0700 directories.

### Cost

Build: ~16 s for 80 registered and 12 hot documents (2,508 sentences) on bryant-2017; explain parses documents lazily (first ERRANT query 49 s, cached afterwards).

### Composition

Parent: `topic-corpus`.

### behavior_complement

Does not copy library texts, does not parse documents nobody asks for, does not export web pages, drafts or notes, does not publish anything itself. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

Originals are recoverable through the registry (path, Sea Spider URL+store, zstd original) and their hash; parses are recoverable from the cache only while cached. No unique inverse is claimed.

### tests.md


corpus::tests (lazy registration, hot parse only, explain parses on request, byte-identical rebuild, cache cap keeps only hot, changed original refused; web page under CC BY stays internal and is refused by public_export; forged web/sol/note records refused). Negative controls 2026-11-04: assert_public without origin checks, ignoring the hot pin each turn tests red.

cargo test --manifest-path tools/topic-corpus/Cargo.toml --offline with WORLD_EN_MODEL=$MOVA_DATA/download/0/0.4/en.bin (18 unit tests; fixture library, fake `papers` binary, fake terminal, local Sea Spider store; two identical runs on 2026-11-04). Without the model the model-dependent tests report a skip.

Negative controls 2026-11-04 (each red, then restored): public admission without the origin condition; assert_public without the Sea Spider/draft/note refusals; seeding without the learner lock; shadow-library filter off; public citing that ignores refusals; cache eviction ignoring the hot pin.

These are finite fixtures and live samples; not a proof.
