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

# octopus-animal-relay

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

## 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


### model

## octopus-animal-relay

### Descriptant

Asking another animal in English: the deputy capability handler animal_ask relays the quoted English of a prompt to a configured animal socket and returns its English answer; ask_animal is the shared client for animals with a configured socket. Source: `tools/octopus/src/relay.rs`.

### Forward approximant

validate: parameters exactly animal/socket/caller, socket absolute without /../, caller_name, one slot task kind text 1..1. execute: take socket and caller from parameters, the quoted task from the bound slot; ask_from(socket, id, run, task, normal, Some(caller), 30 s); ok -> {answer, request, request_id, failure, reply_sha256}; not ok or unreachable -> error.

### Invariant

Stateless; trusted parameters animal, socket (absolute), caller; one text slot task; request id = invocation id.

### Cost

One Unix-socket round trip bounded by 30 s plus the target animal answer cost.

### Composition

Parent: `native-octopus-deputy`.

### behavior_complement

never takes a socket from a prompt; never relays without a configured absolute socket; no retries; no urgency (normal priority); no authentication beyond the target allowlist and its 0700 directory. Evidence status: source-derived model with finite checks, not a proof.

### reverse_reconstruction

from the output one recovers the target, caller, request text and English answer; the target journal recovers the request by id. The full reply is kept only as its sha256. No unique inverse is claimed.

### tests

#### Checks

cargo test --manifest-path tools/octopus/Cargo.toml --offline with MOVA_OCTOPUS_TEST_MODEL (22 unit tests incl. 4 socket, 2 relay; 2026-11-04)
Negative control 2026-11-04: dropping the configured-socket checks in relay.rs turns configuration_requires_a_configured_socket red; restored afterwards.
cargo test --manifest-path tools/seaspider/Cargo.toml --offline --locked with MOVA_OCTOPUS_TEST_MODEL=$MOVA_DATA/download/0/0.4/en.bin (34 unit + 9 end-to-end + 1 singleton CLI + 2 English tests; two identical runs on 2026-11-04) (served Crab-style animal_ask relay against a real Sea Spider)
These are finite fixtures; not a proof.
