---
title: "mova-whale-readcache — Mova code model"
description: "Mova code model of tools/whale/src/readcache.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/whale/src/readcache.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/whale/src/readcache.rs.groupant/>

# mova-whale-readcache

The groupant beside tools/whale/src/readcache.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/readcache.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale/src/readcache.rs)
- **repository folder:** [`tools/whale/src/readcache.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale/src/readcache.rs.groupant)

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

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

Parse once, reuse across epochs: a content-addressed cache of Mova's readings (`reader::Reading`: sections, clause skeletons, restated clauses with their source tokens, lemmas with UPOS, nouns, unknown words, definitions). Used by the epoch driver (`mova.parse_cache`). Source: `tools/whale/src/readcache.rs`.

### Forward approximant

read(text, cap) = load(verified(key)) | load(parsed(key)) | store(parsed(key), reader::read_with(text, cap)), key = SHA-256(schema, model SHA-256, code SHA-256, cap, SHA-256(text)). Records: zstd-19 JSON {schema, key, sha256 of the canonical reading JSON, reading}.

### Invariant

For a fixed key, read returns the reading read_with computes (lossless record: every field including the serde-skipped lemmas and clause source tokens); a record whose schema, key or hash does not match is never used; a verified record never replaces a parsed one; records are written once (temporary file + rename).

### Cost

Hit: one file read, one zstd decompression and one JSON parse. Miss: the parse plus one level-19 compression. Model hash once per process (one read of the model file).

### Composition

Parent: whale-workers (epoch.rs reads the original and every neighbour text through it). Independent of the world tool, which stores its own parsed sentences.

### Behavior complement

Not done: no producer of verified readings; no CoNLL-U trees; not the treestore container; no eviction or size bound; no invalidation for changes in parse-relevant code outside the five hashed sources (e.g. `en` crate files other than annotate.rs) — such a change needs a schema bump. Evidence status: source-derived model with finite checks.

### Reverse reconstruction

From a record: the reading (sentences hold the source text sentence by sentence) and the key; the text itself only through its sentences, the model and code only by hash.

### tests.md


readcache::tests (2026-11-07): warm equals cold; another text, cap, model or code is a miss (negative controls); a damaged record is parsed again; a verified reading is preferred, a second one refused, the parsed one kept. Real-data check: epoch texts with a warm cache byte-identical to a cold run on ten papers (2026-11-07).

## History


#### 2026-11-07 · document

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

Created for the Sol epochs; measured on the ten Sol papers (see peta/owls/README.md, «Sol's texts in the epochs»).

## Provenance

- **source SHA-256:** `51d432ac17d4d92b…`
- **repository commit:** `c755aaec0159`
