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

# mova-whale-world-store

The groupant beside tools/whale-world/src/world.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/whale-world/src/world.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale-world/src/world.rs)
- **source SHA-256:** `1a56e1510a3636ee…`
- **repository folder:** [`tools/whale-world/src/world.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale-world/src/world.rs.groupant)
- **repository commit:** `9057160b1fff`

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

The global world store (mova-whale-world-v1): every text of every dossier and the cached parses of topic-corpus neighbours, parsed once by Mova (with a heading fallback), as zstd shards; 256 word buckets and 64 entity buckets (FNV-1a), per-document entity counts, library and corpus-role edges, docs/texts tables; world(e) = texts of epochs < e; incremental adds under a lock with a pending marker; an in-process LRU for shards and buckets. Source: `tools/whale-world/src/world.rs`.

### Forward approximant

add(cfg, E, docs): lock -> refuse pending or another reader -> collect new texts (dossier rows epoch < E, hash-checked; cached corpus neighbours) -> library graph edges for new dossier docs -> pending.json -> per text: annotate_text -> sentences with statement kind and entities (acronyms, names, terms, compounds; acronym expansions) -> shard -> postings per bucket -> merge into touched buckets -> doc-entities -> append texts.jsonl, rewrite docs/edges/world.json -> pending -> last-build.

### Invariant

Text indices are dense and append-only; a text is parsed once; existing shards are never rewritten; world(e) views only texts of earlier epochs; the same dossiers and corpora built in the same order give byte-identical stores (checked twice live and in tests).

### Cost

Dominated by parsing new texts (about 25-32 s for six papers' 14 texts plus 79 cached neighbours, 19,260 sentences); index merge rewrites each touched bucket, so it grows with the store; queries read three small tables and the buckets/shards they touch.

### Composition

Parent: whale-world; uses topic_corpus::corpus::{annotate, Corpus, write_private, file_of, READER}, topic_corpus::world::{acronym, kind}, topic_corpus::graph::build, mova_whale::knowledge::{norm_term, expansion}; read by query.

### behavior_complement

Does not drop, rank away or summarize content; does not repair an interrupted build, re-read an indexed text, parse uncached corpus neighbours, fetch, or decide truth; statement kinds are lexical. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

Every sentence's text, words and frames are kept in its shard and every posting names (text, sentence), so a citation recovers its sentence and the text row recovers the dossier text id and hash; the original wording of a dossier text is recovered from the dossier, not from the world.

### tests.md


cargo test --manifest-path tools/whale-world/Cargo.toml --offline with WORLD_EN_MODEL=$MOVA_DATA/download/0/0.4/en.bin (9 unit tests: dossier append-only/select/changed files, licence negative controls, citation markers, importers incl. a topic corpus with a Sea Spider page and a consultant draft, entity extraction, LRU, two byte-identical world builds with cited queries, incremental epochs with old worlds intact and a changed file refused; 2026-11-05). Live 2026-11-05 on six papers: two independent imports and builds byte-identical.

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