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

# mova-whale-terminal-adapter-tests

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

End-to-end tests of the Whale's terminal adapter against a fake bash LLM in a real tmux server on a private socket: an answer, a usage-limit screen, and a full Whale run through its own terminal. Source: `tools/whale/tests/terminal_adapter.rs`.

### Forward approximant

Start tmux -L <private socket> new-session running the fake script, set @mova_crab_owner, wait for TERMINAL READY, write a mova-terminal profile; MovaTerminal::ask -> answer file text; limit mode -> AskError::Limit within seconds, the next question refused as a replay; paper::run with MovaTerminal on a fixture paper -> one question answered, glossary from the answer, description without it.

### Invariant

Never starts a model or uses the default tmux server; skipped without tmux (and without MOVA_OCTOPUS_TEST_MODEL for the Whale run); kills its private server on drop.

### Cost

About 5 s (model load and tmux polling).

### Composition

Parent: whale-workers; exercises terminal.rs, paper.rs, reader.rs and mova-terminal.

### behavior_complement

Not covered: real Codex or Claude screens, folder-trust dialogs, real limit messages, concurrent Whales on one tmux server. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

Failures name the expected and actual AskError or the description and glossary; the temporary directory and tmux server are removed. No unique inverse is claimed.

### Epoch 2026-11-04 (learning Whales)

Fourth test: the slow fake LLM writes its answer file, shows a working line for 1.5 s, then the idle marker; the adapter returns only after that and the next question is accepted.

### Epoch 2026-11-04

Question literals carry the new `items` field (empty).

### 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; tests/terminal_adapter.rs (3 tests: answer, usage limit, a full Whale run) against a fake bash LLM in a real tmux server on a private socket, tmux required, never a model (2026-11-04)

Negative control 2026-11-04: ignoring the limit text makes the limit test wait out the timeout and fail; restored afterwards.
Finite fixtures; no live terminal; not a proof.

2026-11-04: 4 tests pass; negative control (adapter returns on the answer file alone) red, restored.
