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

# mova-whale-spec

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

Pinned specification loader: prompt template, source kinds, admission, output contract, originality and bundle layout. Source: `tools/whale/src/spec.rs`. Public, domain-agnostic: concrete prompts, schemas, gate parameters and deployments come from pinned configuration.

### Forward approximant

Load `spec {path,sha256}` (absolute, hash-exact), parse `mova-shark-spec-v1` with unknown fields rejected, load the template pin (relative to the spec allowed), require each slot exactly once, validate bounds, labels, pointers, artifact names (no reserved/duplicate names) and manifest_extra keys. `prompt` splices metadata JSON and source text at template positions; `admission` normalizes licence names and applies exact admitted names and required flags.

### Invariant

No specification is built in; a loaded Spec carries the hashes of both files; rendered prompts are <= prompt_max_bytes; substituted text cannot create or move slots; admission local_only is true unless the licence is admitted and every required flag holds and the item is not local-only.

### Cost

O(spec + template bytes) per load; prompt rendering O(template + metadata + context).

### Composition

Every whale entry point loads the Spec from the run configuration; contract and publish read its rules.

### behavior_complement

Excluded: missing/relative/forged spec pins, altered template bytes, missing or repeated slots, unknown fields, unsupported adapters, invalid pointers or artifact names, manifest_extra overriding generic keys, deployment originality keys outside the corpus set. Counterexample: one appended byte in the template is refused (negative control shown red by disabling the hash check). Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

A Spec determines a unique template and contract; from a rendered prompt the metadata and source are recoverable only when they do not contain template text adjacent to slots (the split is ambiguous in general). From a normalized licence, many raw spellings are compatible. No unique inverse is claimed.

### tests.md


3 tests: pin refusal with negative control, slot location against substituted text and prompt bound, exact licence normalization.

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.
