Elamur GroupantsโŒ•
โ˜ฐ

mova-whale-animal

The groupant beside tools/whale/src/animal.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

componentlabelwhere
approximantpartialForward approximant
astpartialsyntax.json
compositionpartialComposition
costpartialCost
descriptantpresentDescriptant
invariantpartialInvariant
testsfinite evidencetests.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.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction

Model text

Descriptant

The Whales as one of Mova's animals: a persistent singleton service on a private socket; English prompts through the native deputy (describe/count/status/show/pause/resume), English answers; each admitted request becomes a new one-item pinned Whale run in a child of the pinned mova-whale executable; request journal with no replay. Source: tools/whale/src/animal.rs.

Forward approximant

serve: load AnimalConfig (survey skeleton without run_root/items/workers, pinned executable and catalog) and deputy config, check whale capabilities, Deputy::load, Service::start (service.lock, executable hash, Spec::load, Catalog::load with pin check, recover requests.jsonl, spawn workers), angel_prioritized with answer(). Hands: describe -> resolve each URL/id in the catalog; already running/waiting/failed/described -> said, nothing queued; else hash the source, journal queued, push Job; count -> store buckets with complete versions + journal totals; status/show -> state, journal, store bucket versions (opening of the length-field artifact); pause/resume -> PAUSE marker. Worker: while not paused pick (!urgent, seq), journal started, run_job: create runs/<job>, whale::prepare one-item survey, check executable hash, spawn whale CONFIG --once (MOVA_CODEX_BIN from config), read the terminal receipt -> Finished; journal finished.

Invariant

A running request is never interrupted by a prompt; waiting order is urgent first then arrival; started is journaled before preparation; a started request without a receipt is uncertain and never relaunched; a source with a failed attempt is not attempted again by a prompt; no existing queue, manifest or bundle is rewritten; refused prompts queue nothing.

Cost

Start: one pass over the catalog (hash + index; 186,435 rows read in ~10 s on 2026-11-04). Answers: O(log n) catalog lookups, one bucket directory read; count: one directory read of the store kind. Work: one child per request, at most one teacher call.

Composition

Parent: whale-workers. Uses whale::prepare and the Whale run (child process), spec::Spec for the bundle layout, util pins/leases, mova_octopus Deputy/socket/realize, answer.rs for English.

behavior_complement

Not done: fetching URLs (catalog only), preemption, cancellation, retrying failed or uncertain sources, scheduling by time, non-English answers, writing descriptions itself (the configured teacher writes; Mova only reads prompts and realizes answers). Counterexample: an urgent request arriving during a running description waits for it (unit and served tests; arrival-only ordering turns them red). Evidence status: source-derived model with finite checks, not a proof.

reverse_reconstruction

From requests.jsonl one recovers each request's source item (path, sha256, format), priority, sequence, start/launch/finish times, outcome, bundle manifest and word count; from runs/<job>/survey the prepared prompt, reservation and receipt; from the deputy ledger the prompt and plan per request id. The interleaving of answers with work and the child's wall timings inside its call are not recoverable. No unique inverse is claimed.

Epoch 2026-11-04 (Sea Spider live: singleton and callers)

Epoch 2026-11-04: Optional seaspider_socket (absolute) in AnimalConfig; unset by default.

tests.md

Command: cargo test --manifest-path tools/whale/Cargo.toml --offline --locked with MOVA_OCTOPUS_TEST_MODEL=$MOVA_DATA/download/0/0.4/en.bin (unit tests incl. 5 service tests, 2 realizer tests, 3 length-gate tests; 2 English tests: 18 prompts, 10 refusals, a served end-to-end run with the real mova-whale child and a fake Codex executable; two identical runs on 2026-11-04)

Negative controls 2026-11-04: arrival-only ordering, recovery that ignores started lines, length bounds widened by one word, and dropping not/if from the deputy's scope check each turn the corresponding tests red; restored afterwards. These are finite fixtures; no live teacher or Whale run; not a proof.

2026-11-04: cargo test --manifest-path tools/whale/Cargo.toml --offline with MOVA_OCTOPUS_TEST_MODEL (85 unit incl. the Sea Spider client test, 2 English tests; 2026-11-04)

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/tools/whale/src/animal.rs.groupant/