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

# mova-beaver-run

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

The Beaver's passes: scan (read only), apply (find, reuse cached Sol verdicts, one Sol call for the rest, cap, write with backup, ledger, attach and restore on refusal, inserts log, recommendations), status, watch (periodic pass over due papers), the state, journal, lock and ledger. Source: `tools/beaver/src/run.rs`.

### Forward approximant

process: cands -> Sol verdicts -> cap -> if inserts: sha check, backup, write, ledger, attach (refused -> restore source and ledger) -> inserts.tsv, recommendations file; pass: lock, per article process, state sha after; due: accepted papers whose source sha differs from the state.

### Invariant

A change is written only over the exact text the pass read; a refused attach leaves source and ledger as before; a Sol error stops the pass and pauses Sol; one pass at a time (flock); verdicts on the same text, span and target are reused.

### Cost

Per pass: one library load, one citations pass, at most max_sol_calls_per_pass Sol calls, one attach per changed article.

### Composition

Uses config, library, find, sol, text; writes the deep-dive source and links_dir read by tools/whale solhelp_dd.rs; runs the site's deepdive attach.

### Behavior complement

Not done: no deletion of anything, no retry of a failed Sol call or attach, no build of the site, no change to Sol-help's run files beyond links_dir. Evidence status: source-derived model with finite checks.

### Reverse reconstruction

From backups/<paper>/<unix>-<sha>.md and inserts.tsv every earlier source and every insert are recoverable; the ledger maps a linked source to its base.

### 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:** `b07218ebbed02229…`
- **repository commit:** `c755aaec0159`
