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

# mova-nightingale-frozen

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

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

The frozen layout of a Nightingale model: `model.ngl` laid out once on disk as sorted keys `kind \t payload` with offsets, counts per label, examples, the bigrams' left-word sums, the spelling counts and the trend's bucket totals, in the Elephant's sectioned file format (`wordgraph::graph`), read through a memory map. Source: `tools/nightingale/src/frozen.rs`.

### Forward approximant

build(body, meta, out): one zstd stream per label over the body, a k-way heap merge on the key with ties in label order (counts per label, examples deduplicated up to the kind's cap); f records feed the character pair/context/triple counts, b records the left sums per first form, y records the bucket totals; the left words are sorted by an index over a map of their temporary file and equal words summed; sections are concatenated 8-aligned under a section table, written to a temporary name and renamed. Frozen::open: section table, head (format, body SHA-256, labels) against the meta, section lengths and final offsets, the record range of every kind byte by binary search. Queries: find(kind, payload), lower_bound, counts, examples, left(v), pair/from/tri/ctx, buckets — each a binary search or an offset read in place.

### Invariant

The same body gives the same frozen bytes; a frozen file opens only for the body whose SHA-256 its head names, with the meta's labels; keys are strictly increasing (the build refuses an unsorted body); every record's counts are the sum over the body's lines of its key per label, and its examples are the first distinct ones in label then body order up to the kind's cap — exactly the resident loader's map.

### Cost

Build: one pass per label over the body, memory one record per label plus the spelling counts of the kept forms (2026-11-07: 54 MB peak and 53 s for the 50.0 M-record English generation 9; 23 MB for generation 1); disk about 74 bytes a record (3.72 GB for 50.0 M records, 522 MB for 7.1 M). Open: O(256 log N) plus the section checks. A query: O(log N) page reads; the pages are file-backed and reclaimable, so resident memory is what the queries touch (2026-11-07, generation 9: the dev sample's bits 14 MB anonymous and 379 MB of mapped pages; four English questions 11 MB mapped).

### Composition

Parent: nightingale. Used by model (`Model::open`), which keeps the resident loader as the reference.

### Behavior complement

Never writes outside its output and its own temporary directory (removed after the build); never modifies a frozen file in place; does not verify the frozen file's own bytes beyond the structure (its identity is the body hash in the head and the atomic rename); does not prune, interpret labels or compute probabilities. Evidence status: source-derived model with finite checks, not a proof.

### Reverse reconstruction

The records, counts and examples are recoverable from the frozen file (the body's line order within a key is not: label order is kept, the body's repeated lines are summed); the body itself is named by its SHA-256 only.

### Tests

#### Checks

tests/model.rs `the_frozen_store_answers_as_the_resident`: a hand-written three-label body with a `</s>` form, a form with a character below the space (non-contiguous left words), trend buckets and foreign lemmas — every count, entry, prefix listing, p1, p2, spelling and orthography log-probability and bits per token equal to the resident store's bits; two freezes give the same bytes; negative controls: a frozen file of another body is refused, and one smuggled in under this body's name opens and the comparison shows red. Real models 2026-11-07 (old binary against new): held-out bits on generations 1 and 2, the round report on generations 1 and 2, 66 judgements and four signals on each — byte for byte.
These are finite fixtures and measurements; not a proof.

## History


#### 2026-11-07 · document

##### Epoch 2026-11-07

First model, written with the source (the resident map took about 360 bytes a record: 19 GB for the English serve of generation 9; the frozen layout keeps only touched pages).

## Provenance

- **source SHA-256:** `d301cb30752d681c…`
- **repository commit:** `c755aaec0159`
