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

# mova-whale-run

The groupant beside tools/whale/src/whale.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/whale/src/whale.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale/src/whale.rs)
- **source SHA-256:** `e05173e0d788fe1a…`
- **repository folder:** [`tools/whale/src/whale.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale/src/whale.rs.groupant)
- **repository commit:** `48f2e6f74146`

> **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.

| id | 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

One Whale run: pinned task queue, at most one teacher call per task, contract gates and immutable versioned bundles. Source: `tools/whale/src/whale.rs`. Public, domain-agnostic: concrete prompts, schemas, gate parameters and deployments come from pinned configuration.

### Forward approximant

prepare: load Spec and teacher identity, validate items (kind, format, binding rule, metadata), read pinned export rows, compute admission, extract context, render prompt, write per-task prompt/context/metadata and a manifest with disjoint worker indices (index mod workers). run_with: honor STOP/PAUSE and storage floor, take the worker lease, pick the first own task without receipt, refuse unresolved reservations, withhold local-only items when the kind says so, verify source/prompt/context hashes, create the reservation, call the teacher once, store the reply, then admit (identity check, verbatim guard, projection, validate, publish) into a completed or quarantined receipt. publish: originality on the raw reply, status rewrite, artifacts, staged directory renamed into store/<prefix>/<kind>/<sha(id)>/<version>. project_quarantined_lengths: re-gate retained length quarantines without a teacher.

### Invariant

Per task: at most one reservation and one teacher call; outcomes in {completed, quarantined, uncertain, local_only_no_remote_teacher}; uncertain or unreceipted reservations stop the worker; a published version directory is never overwritten; identity changes require a new run root; original receipts/replies are never modified by projection.

### Cost

Preparation O(sum source bytes + prompts); per task one teacher call plus O(reply) validation and O(corpus) originality; status O(tasks).

### Composition

Uses spec, source, contract, originality and util; launched by pool (workers) and swarm survey lanes (one-item runs).

### behavior_complement

Excluded: calls without teacher/spec configuration, altered template/spec, changed sources, duplicate leases, unknown receipt outcomes, replies from another model/provider, any contract/originality failure (quarantine, no reprompt). Counterexample: a failed transport records uncertain and a second run makes no call. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

A bundle manifest pins task, reply, spec and artifact hashes, so its reply and prompt are recoverable from the retained job directory; a receipt alone admits many replies; a quarantine reason partitions the failing gate but not the reply content. No unique inverse is claimed.

### tests.md


16 tests with a fake teacher: missing configuration, altered template, word profile measures, disjoint immutable outputs, terminal quarantine, transport uncertainty, local-only withholding, pinned export, EPUB adapter, pause/stop, projection receipts and isolation, binding scope, queue bounds/unknown receipts, originality tail, lease and source changes.

Command: cargo test --manifest-path tools/whale/Cargo.toml --offline --locked (74 tests, fake teachers/executables; two identical runs on 2026-11-03).
These are finite fixtures; no live run, model call or deployment was exercised.
