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

# 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

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`tools/treestore/src/dir.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/treestore/src/dir.rs)
- **repository folder:** [`tools/treestore/src/dir.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/treestore/src/dir.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 | [Approximant](#approximant) |
| **Ast** | partial | `syntax.json` |
| **Composition** | partial | [Composition](#composition) |
| **Cost** | symbolic source derived | [Invariant](#invariant) |
| **Descriptant** | present | [Descriptant](#descriptant) |
| **Invariant** | partial | [Invariant](#invariant) |
| **Tests** | executed bounded checks | [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

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

- **source SHA-256:** `46f35e6a8bc9a664…`
- **repository commit:** `f55191f0d47f`
