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

# mova-whale-agent

The groupant beside tools/whale/src/agent.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/agent.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/whale/src/agent.rs)
- **source SHA-256:** `5021f28a278bf679…`
- **repository folder:** [`tools/whale/src/agent.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/whale/src/agent.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 bounded agent session in an isolated Git worktree with configured prompt, scopes and protected files. Source: `tools/whale/src/agent.rs`. Public, domain-agnostic: concrete prompts, schemas, gate parameters and deployments come from pinned configuration.

### Forward approximant

parse: validate model/effort, absolute paths, full commit, branch under branch_prefix, pin counts, write directories (pinned source sidecars or pinned scope manifest directories), write files (pinned, matching write_file_rule). run: job operation lock, cached report or refuse unresolved reservation, render template (all slots once), verify pins at base, refuse non-new worktree/inside-repo/retention cap/storage floor, reserve, add worktree branch, run the transport (workspace-write sandbox, network off, credentials cleared, timeout/output limit -> uncertain), finalize (HEAD unchanged, pins, protected blob hashes, changed paths inside scopes, staged guard, patch and candidate commit), optionally archive the clean worktree, write report.

### Invariant

At most one agent call per job identity; any report is final (cached); production files with protected suffixes outside scopes are byte-identical in admitted candidates; nothing is merged or pushed; completion is not test evidence.

### Cost

One external agent session bounded by timeout and 8 MiB output; Git observations O(tree) for protected hashing.

### Composition

Launched by swarm agent lanes as `whale-research CONFIG`; standalone via CLI.

### behavior_complement

Excluded: writes outside scopes, symlinks, escaped or oversized files, protected byte changes (including assume-unchanged tricks), HEAD changes, guard rejection, altered template, forged scope pins, mismatched scope manifest fields, non-Codex models, branches outside the prefix. Counterexample: a hidden assume-unchanged edit to a protected file is detected by raw blob hashes. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

From a candidate commit and patch one reconstructs the exact changed files on the pinned base; from a quarantine reason only the failing gate is known; uncertain sessions admit several partial edit histories and are never replayed. No unique inverse is claimed.

### tests.md


14 tests with a fake agent executable and fixture Git repositories.

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.
