mova-elephant-work
The groupant beside tools/elephant/src/work.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
The Elephant's standing loop, the store's only writer: requests, add, tamp, view, papers, consult, one journal line a step. Source: tools/elephant/src/work.rs.
Forward approximant
step: take requests; add up to add_per_step finished parts of the configured passes (parts refused under the current key not hashed again); tamp when due or requested; view when stale and the share or a refresh says so, at most once per view_min_secs; papers: elephant-tamp read and build when min_new papers are new; consult: one question, alternating purposes, round-robin over paced terminals; append work.jsonl. run: steps until STOP or STEPS, an error journaled and the loop stopped.
Invariant
Bounded work per step; the only writer of the store (the writer lock is taken by main); no question without the operator's word; nothing retried blindly.
Cost
Per step: the hashes of at most add_per_step parts, one tamp, one view build, one external papers build, one question.
Composition
Parent: elephant. Uses store, suspect, consult and the elephant-tamp binary.
Behavior complement
Never deletes, never admits a proposal, never writes the hand lists, never asks without the word. Evidence status: source-derived model with finite checks, not a proof.
Reverse reconstruction
work.jsonl and the store's history recover every step.
Tests
Checks
work test: adds 2 + 1 parts, tamps, rebuilds the view, takes a request once, finds the planted edge, holds the question without the word, keeps one proposal, leaves the graph unchanged. 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 Elephant made incremental and an animal on Mova).
Provenance
This page in Markdown ā https://md.groupants.elamur.ai/free/en/mova/tools/elephant/src/work.rs.groupant/