mova-nightingale-count
The groupant beside tools/nightingale/src/count.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 |
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 |
| Reverse reconstruction | reverse reconstruction | partial source derived model | Reverse reconstruction |
Model text
Descriptant
Counting CoNLL-U sentences into part records (forms, lemmas, foreign tags, bigrams, dependency patterns both ways, trend buckets) and the streaming k-way merge of parts into a model with pruning and lineage. Source: tools/nightingale/src/count.rs.
Forward approximant
Counter: doc -> dev split by SHA-256(key) mod m; sentence -> records keyed kind\tpayload with up to 3 example sentence numbers; finish sorts; store_part writes records, docs, dev sentences, then the sidecar. merge: verify part hashes and language, heap merge by key bytes, sum counts, examples in part-name order, prune by kind, pruned form mass per label, meta last.
Invariant
Dev documents are never counted; the same parts give the same model bytes in any order; a part exists only with its sidecar; the shuffled control keeps every form count and sentence length.
Cost
Counting O(tokens) with one map of records (1.15 GB for a 6.2 M-token tier-1 shard, 2026-11-06); merge O(R log P) time, one record per part in memory.
Composition
Parent: nightingale.
Behavior complement
Never deletes or rewrites a part; never mixes languages in a model. Evidence status: source-derived model with finite checks, not a proof.
Reverse reconstruction
A model's meta lists its parts and their hashes; a part's docs file recovers its train and dev documents; counts are not inverted to sentences.
Tests
Checks
tests/model.rs determinism and refusals; the shuffled control. These are finite fixtures and measurements; not a proof.
History
2026-11-06 · document
Epoch 2026-11-06
First model, written with the source (the Nightingale: one per language under the Eel; a standard naturalness model with variety deltas).
Provenance
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/nightingale/src/count.rs.groupant/