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

# mova-beaver-text

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

Markdown of a deep dive as the Beaver sees it: the mask of bytes that are not linkable prose (description, headings, fences, math, tables, HTML, figure lines, code spans, brackets and links, bare URLs), words with byte spans and folded forms, sections, sentences, links and the link inserter. Source: `tools/beaver/src/text.rs`.

### Forward approximant

mask: per line state machine (fence, $$ math, \\[ math) then inline spans; tokens: alphanumeric runs; insert_links: sorted non-overlapping free spans -> '[anchor](https://md.groupants.elamur.ai/free/en/mova/tools/beaver/src/text.rs.groupant/)'.

### Invariant

insert_links writes only spans whose every byte is unmasked, refuses overlaps, brackets or newlines in anchors and spaces or parentheses in targets; the rest of the text is unchanged byte for byte.

### Cost

Linear in the text length.

### Composition

Used by find.rs and run.rs.

### Behavior complement

Not done: no full CommonMark parse (reference links, nested emphasis, HTML blocks spanning lines are approximated conservatively by masking); no rendering. Evidence status: source-derived model with finite checks.

### Reverse reconstruction

From the linked text and the insert list the source is recovered exactly by removing '[', '](https://md.groupants.elamur.ai/free/en/mova/tools/beaver/src/text.rs.groupant/)' around each anchor.

### tests.md


cargo test --release --offline --manifest-path tools/beaver/Cargo.toml (2026-11-07): 9 unit tests and 4 end-to-end tests on a fake site tree. Negative control 2026-11-07: switching off heading masking turned the masking test red; restored. Pilot 2026-11-07 on five real deep dives: 13 inserts, 5 Sol calls, all pages re-attached.

## History


#### 2026-11-07 · document

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

Created with the Beaver for the operator's ask of 2026-11-07 (too few internal and external links in the research site's paper texts).

## Provenance

- **source SHA-256:** `13948b10f1bae0f5…`
- **repository commit:** `c755aaec0159`
