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

# mova-whale-dossier

The groupant beside tools/whale/src/dossier.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/src/dossier.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale/src/dossier.rs)
- **source SHA-256:** `d76208ddaa942c09…`
- **repository folder:** [`tools/whale/src/dossier.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale/src/dossier.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 epoch's one integration point with two stores it does not own: the document dossiers (`ROOT/<doc>/texts/<epoch>-<kind>-<n>.md` + `texts.jsonl`) and the global world's neighbourhood of a document (CLI `neighbourhood DOC --radius R --max-docs N`, a closed topic corpus, or a fixture). Source: `tools/whale/src/dossier.rs`.

### Forward approximant

register(NewText) -> TextRow: under texts.lock, an existing row with the same (epoch, kind, sha256) is returned; else n = rows of (epoch, kind) + 1, the file is created (create_new, 0600, synced) and the row appended (fsynced). public_ok = open && kind not in {mova, sol}. licence_class(kind, licence) in {internal, cc0, pd, by, restricted, unknown}. WorldConfig::neighbourhood(doc) -> [NearDoc] nearest first (distance, then the source's own order), the document itself left out; topic_corpus: graph.json lists references, similar, same_author, cited_by with registry texts, at most max_docs.

### Invariant

A text file is never rewritten; generated texts are never public; document ids are single safe path components; no neighbour order is alphabetical (the source's order is kept, a stable sort by distance only).

### Cost

register: O(rows) to read texts.jsonl plus one file write; neighbourhood: one child process (cli) or reading graph.json and documents.jsonl (topic_corpus).

### Composition

Parent: whale-workers. Used by epoch.rs only. The dossier contract is shared with the global world's builder; the CLI format is parsed leniently (`documents` or `neighbours`, `doc` or `id`, `relations` or `relation`).

### behavior_complement

Not done: building the world or the dossier's original/site-old/web texts (another tool registers them; the epoch registers only the original when missing, and its own mova and sol texts), deleting or rewriting texts, paging a neighbourhood, timeouts on the world CLI, locking across machines. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

Every row names its file by id, its sha256 and its inputs; a text's provenance is recovered from `source`, `inputs` and `citations`; the neighbourhood is recomputed from the world, not stored.

### Epoch 2026-11-05 (created)

Coded against the stated dossier contract and an assumed neighbourhood JSON while the global world's CLI did not exist yet; measured with the topic_corpus adapter on five papers (12 nearest documents each).

### Epoch 2026-11-05 (world tool)

The world tool appeared during the work: `DossierConfig` (`files` | `world`: its CLI `dossier list|text|add`; texts read through it because its originals may be zstd) opens a `Store` with rows/file/read/register (idempotent by (epoch, kind, sha256) before `add`; a generated text it marks public is an error). `WorldConfig::World` replaces the generic CLI: `world neighbourhood … --epoch N` (meta), `world related` (edge kinds), `world neighbourhood … --content` (sentences grouped per text id, rebuilt as Markdown under one `## Text` heading, five sentences per paragraph); the document itself stays at distance 0. `NearText` holds a path or content. Measured read-only on a world of 85 documents: 3 child calls per document, 8–10 s per paper including Mova's writing.

### tests.md


dossier::tests (2026-11-05): a text registered twice gives one row; numbering per (epoch, kind); a consultant text is never public while an original with the same flag is (negative control: public_ok = open turns the test red); unknown kinds and path-escaping ids refused; a neighbourhood is nearest first without the document.
