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

# layers-lib-routing

The groupant beside layers/src/lib.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_fragment
- **status:** partial source bound model
- **source:** [`layers/src/lib.rs`](https://github.com/ElamurAI/mova-free/blob/main/layers/src/lib.rs)
- **source SHA-256:** `f7a2576c1bcd7945…`
- **covers:** Registration log and global-first stable finite-score domain routing. (bytes 4293–6413)
- **part of:** [layers-lib](https://md.groupants.elamur.ai/free/en/mova/layers/src/lib.rs.groupant/)
- **repository folder:** [`layers/src/lib.rs.groupant/routing.groupant`](https://github.com/ElamurAI/mova-free/tree/main/layers/src/lib.rs.groupant/routing.groupant)
- **repository commit:** `855da7bd4a7b`

> **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 | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [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) |
| `tie_order` | tie_order | partial source derived model | [tie_order](#tie-order) |
| `threshold` | threshold | partial source derived model | [threshold](#threshold) |
| `mode` | mode | partial source derived model | [mode](#mode) |
| `context_log` | context_log | partial source derived model | [context_log](#context-log) |

## Model text


### descriptant

#### layers-lib-routing

Registration log and global-first stable finite-score domain routing.

##### Epoch 2026-10-31

Half-open source bytes [4278,6398); bound by parent source hash and scoped byte hash. Model covers only this fragment; parent composition explains joins.

### approximant

#### Scoped forward relation

Try normalized global expression; else score original query, stable descending sort, skip below threshold via break, first Some solver wins; else escalation+facts.

##### Domain and gap

Source-generated states within resource limits. Categorical relation has no executable percent surrogate.

### invariant

#### Scoped invariant

Finite equal scores preserve registration order; declines fall through.

##### Cost

All D coverage calls, stable O(D log D) sorting, attempted solver costs and log allocation; global math attempted first.

### models

## Scoped typed relations

### behavior_complement

Successful global math excludes domain callbacks. Finite below-threshold scores exclude solve attempts; an eligible solver returning Some excludes later solves. Escalation excludes live teacher calls in this source.

### reverse_reconstruction

Escalation preimages include no domains, low scores or declines; normalized math preimage includes explanation phrases/case variants.

### tie_order

Finite equal scores preserve registration order; declines fall through.

### threshold

Score==threshold admitted; threshold NaN and score NaN unvalidated.

### mode

Clear global why for Answer only; domain why is untouched.

### context_log

One route log appended; escalation why includes joined facts but sends nothing.


### tests

#### Evidence scope

Parent selected tests: tests::global_math_first, tests::domain_by_coverage_and_escalation, tests::explain_mode_only_when_asked, tests::garbage_is_not_math, wave30_tests::finite_ties_declines_and_threshold. This fragment shares parent syntax and finite checks; no separate test count or complete fragment coverage claim. Assertion-control association and unexecuted paths are in parent tests.md and source-test-map.json.
