Elamur GroupantsโŒ•
โ˜ฐ

treestore-dir

The groupant beside tools/treestore/src/dir.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

componentlabelwhere
ApproximantpartialApproximant
Astpartialsyntax.json
CompositionpartialComposition
Costsymbolic source derivedInvariant
DescriptantpresentDescriptant
InvariantpartialInvariant
Testsexecuted bounded checksTests

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.

relationtypelabelwhere
Behavior complementbehavior complementpartial source derived modelBehavior complement
Reverse reconstructionreverse reconstructionpartial source derived modelReverse reconstruction

Model text

Descriptant

A store directory: model.bin, .mts files and index.tsv (title, file stem, article number, sorted by the title's bytes and searched in place), with get-by-title and sentence-by-number; also the readers of the sources (wikicorpus shards listed by their .tsv, or a directory of per-article .zst records). Epoch 2026-11-06.

Approximant

get(title) = binary search of index.tsv (O(log size) seeks) โ†’ Shard (opened once, cached) โ†’ article. sentence(title, n) = get + store::sentences.

Invariant

index.tsv lists every article of every file exactly once, sorted by bytes; files are opened with the directory's model id.

Composition

Uses store::Shard and model::Model; used by main.rs.

Behavior complement

No title normalisation (exact bytes), no redirect resolution, no duplicate-title handling beyond returning the first match found by the search.

Reverse reconstruction

From the index row the file and position are recovered; from a title not in the index nothing.

Tests

Exercised by treestore get/sent/index on the tier-1 store (README measurements); the sorted search mirrors wikicorpus's tested sorted_get.

Provenance

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/tools/treestore/src/dir.rs.groupant/