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
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 |
| ast | partial | ../syntax.json |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | executed bounded checks | 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 |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
tie_order | tie_order | partial source derived model | tie_order |
threshold | threshold | partial source derived model | threshold |
mode | mode | partial source derived model | mode |
context_log | context_log | partial source derived model | 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.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/layers/src/lib.rs.groupant/routing.groupant/