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

# mova-whale-pool

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

Crab-owned launch and observation of a prepared Whale worker cohort. Source: `tools/whale/src/pool.rs`. Public, domain-agnostic: concrete prompts, schemas, gate parameters and deployments come from pinned configuration.

### Forward approximant

Context pins the Crab root, master config hash, Whale executable hash and worker count (1..8). start: private pool dir under crab/whale-pools/<sha(master)>, short operation mutex, prepare or verify the pool manifest, observe existing journals, refuse PAUSE/STOP, take the lifetime workers lease, write launching journal and per-child reservations, spawn `exe whale CFG` in its own session with the lease descriptor inherited, record PID start ticks, mark launched. status/observe: PID identity, worker status, bounded receipt counts, uncertainty. marker: owned PAUSE/STOP files; resume removes only an owned PAUSE and refuses after STOP.

### Invariant

Each cohort launches at most once; prior journals are observed, never replayed; foreign markers are never modified; changed master/worker configs or executable are refused; lease held without live children reads uncertain.

### Cost

O(workers) spawns; status O(workers + min(receipts,128)).

### Composition

Called by WhaleRoles for Crab legacy pool control; prepares through whale::prepare; children run whale::run.

### behavior_complement

Excluded: relaunch after any journal, launch under PAUSE/STOP, overwrite of foreign markers, resume after STOP, operations during another operation, changed identities. Counterexample: a recorded `launching` journal with a reserved child yields state uncertain and no new process. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

From observed state one recovers launch phases and PID identities; an `uncertain` state admits several histories (crash between reservation and spawn, surviving descendant with the lease). No unique inverse is claimed.

### tests.md


7 tests with a fake executable: two disjoint workers once, uncertain launch, owned markers, identity changes, short versus lifetime lease semantics, descendant lease uncertainty and manifest tamper, cohort separation.

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.
