mova-topic-corpus-seed
The groupant beside tools/topic-corpus/src/seed.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.
| id | 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
The Whale hook: before a Whale asks its consultant, the closed corpus explains the terms it would ask about (whale reader gaps not yet known) from neighbour papers only; defining sentences only (score >= 3), defining facts only (stands_for, is_a, means), an expansion from a farther document only when all its words occur in the paper; the facts are retained in the Whale's knowledge store with provenance topic-corpus under its learner.lock. Source: tools/topic-corpus/src/seed.rs.
Forward approximant
lease learner.lock (refuse when held) -> Store::open -> reader::read(paper) -> gaps minus known minus self-defined -> explain(k=5) -> term_facts -> filters -> retain Item{source: topic-corpus, corpus, doc, sentence}.
Invariant
No write while the Whale learns; no web page or draft is a seed source; a known term is never seeded again.
Cost
One paper read plus lazy explains.
Composition
Parent: topic-corpus.
behavior_complement
Does not change Whale code, does not mark questions asked, does not write descriptions. Evidence status: source-derived model with finite checks, not a proof.
reverse_reconstruction
Each seeded item names its document and sentence; the explanation text is not stored in the item. No unique inverse is claimed.
tests.md
seed::tests (learner.lock red control, GEC seeded from the reference, not seeded twice). Live 2026-11-04 on a fresh Whale for bryant-2017: 1 term seeded (NTHU); dry learn round 3,124 words with and without it (the term occurs only in tables).
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.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/topic-corpus/src/seed.rs.groupant/