Elamur Groupants⌕
☰

mova-whale-pod

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

A pod's shared knowledge: one store for all Whales of a batch pod, keyed by normalized term (knowledge::norm_term), with provenance per Whale, paper, item and answer. A term one Whale asked is not asked by another; what one Whale learned, every Whale explains with. Bare-category facts go to review instead of knowledge. Source: tools/whale/src/pod.rs.

Forward approximant

open(dir): terms.jsonl (entries), claims.jsonl (first claim per term wins), review.jsonl, answers/. publish(whale, store): under pod.lock, every term item of the store not yet published -> non-bare facts as an entry, bare facts to review, the answer file copied; every asked term key -> a claim. claim(term, whale, paper): under pod.lock, reload; true and recorded only when no claim and no facts exist for the normalized term. items(exclude): entries of other Whales as knowledge items pod:<whale>:<item>, ordered by (term, whale, item). answers(): every copied answer text (for the overlap gate).

Invariant

Appends only, fsynced, under a blocking flock; a (whale, item) pair is published at most once; a normalized term has at most one effective claim; items() depends on the file's content, not its order; answer texts never leave the pod except into the overlap gate.

Cost

Each claim/publish rereads the three files (linear in pod size: hundreds of lines per batch); items() sorts O(n log n).

Composition

Parent: whale-workers. Written and read by learn.rs (publish at start and after each round, claim before asking a term, items for Known::of and the gates' item lookup, answers for the Guard); configured by batch.rs (pod).

behavior_complement

Not done: retracting or correcting a fact, choosing between conflicting facts of two Whales beyond «first per relation in the reader's order», sharing sentence or section readings (paper-specific), locking across machines (flock is local), deduplicating identical facts from different Whales. Parallel learners make append order timing-dependent; a Whale's view in a given round therefore depends on what the others had published by then. Evidence status: source-derived model with finite checks, not a proof.

reverse_reconstruction

Every entry names its Whale, paper, item id and answer hash; with the Whale's own store and the copied answer the source answer is recovered. A claim names who asked first; the facts do not determine the answer text.

Epoch 2026-11-04 (created)

Measured on a fresh pod with today's real answers replayed (10 papers, 5 Whales, sequential, two identical runs): 81 term entries, 118 claims, 26 review records; no term asked twice across the pod.

tests.md

pod::tests::one_term_one_question_across_the_pod (2026-11-04): plural and case variants are one term; a claimed or known term is not claimed again; bare facts go to review; other Whales read the entry, the publisher does not; a second open sees the same items. Negative control: has ignoring claims turns the test red (restored).

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/whale/src/pod.rs.groupant/