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

# world-query-context

The groupant beside world/src/query.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 derived instance
- **source:** [`world/src/query.rs`](https://github.com/ElamurAI/mova-free/blob/main/world/src/query.rs)
- **source SHA-256:** `27dd12e09019d22b…`
- **covers:** Function envelope: attention, context_at (bytes 8203–9737)
- **part of:** [world-query](https://md.groupants.elamur.ai/free/en/mova/world/src/query.rs.groupant/)
- **repository folder:** [`world/src/query.rs.groupant/context.groupant`](https://github.com/ElamurAI/mova-free/tree/main/world/src/query.rs.groupant/context.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 | [Forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | `model.md` |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | coverage recorded | [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 |
|---|---|---|---|
| `nonbehavior` | behavior_complement | partial source derived model | [nonbehavior](#nonbehavior) |
| `antecedents` | reverse_reconstruction | partial source derived model | [antecedents](#antecedents) |
| `half-threshold` | threshold_fiber | partial source derived model | [half-threshold](#half-threshold) |
| `last-speech` | selection_boundary | partial source derived model | [last-speech](#last-speech) |

## Model text


### descriptant

## world-query-context

Revision 2026-10-29; SHA-256 27dd12e09019d22b057ab892136aec5be542da170e529573638c631b44ddd37f.

### Forward

Mention counts partition characters; independent event and cursor scans project discourse.

### Invariant

Query methods borrow immutable worlds; the frame reader mutates caller-owned discourse. Reverse models preserve compatible hidden inputs, never assume unique recovery. Ordering and failure assumptions in catalogs are part of the contract.

### Cost

For D replayed deltas, M mentions, E events, C cursors, K characters and L output bytes: state/history O(D+L), attention O(M+K log K), context adds O(E+C) and O(E) references. diff adds sorting and quadratic vector membership for set deltas. Resolve replays relevant entities and compares words/alternatives. Label recursion/ancestry cost depends on structure; cycles excluded.

### Composition

Selected source functions only; parent composes shared identity and dependencies. These are not independent pipeline stages or a complete partition.

### AST gap

Source-bound syn-2 partial syntax is present. Macro expansion, name resolution, type inference, cfg evaluation, external-module loading and semantic AST remain absent. Child envelopes may overlap and need not cover the file.

### Epoch memory

2026-10-29: source-derived first epoch. Historical snapshots do not freeze current labels; direct read_with callers bypass the adapter. Recording errors can retain global state. Preserve these observations when strengthening models. Runtime source is unchanged.

### catalog

## Typed models: world-query-context

Subject: ../../query.rs; SHA-256 27dd12e09019d22b057ab892136aec5be542da170e529573638c631b44ddd37f. Revision 2026-10-29.
Observations are single terminating calls unless a recording trace is named. Preconditions: finite well-formed inputs, stable dependencies, no allocation failure or integer overflow.

### nonbehavior

Type: behavior_complement. Operator/domain/observation: U=(W,s,attention/context return); R counts and selects. Inner U minus R contains zero counts, descending-ID tie order, and secondary membership at exactly half maximum.

Approximation: source-derived conditional relation; unknown behavior outside its declared domain remains unknown. Assumptions: shared preconditions above and descriptant dependency boundaries. Evidence: inspected source and callers; tests.md distinguishes executed checks. Falsifiable oracle: construct admissible inputs, execute the named operation and compare this predicate; contrary output refutes it.

### antecedents

Type: reverse_reconstruction. Operator/domain/observation: Ranked counts admit all mention multisets with those cutoff counts and arbitrary later mentions. Context constrains last qualifying event/cursor but retains unobserved earlier entries.

Approximation: source-derived conditional relation; unknown behavior outside its declared domain remains unknown. Assumptions: shared preconditions above and descriptant dependency boundaries. Evidence: inspected source and callers; tests.md distinguishes executed checks. Falsifiable oracle: construct admissible inputs, execute the named operation and compare this predicate; contrary output refutes it.

### half-threshold

Type: threshold_fiber. Operator/domain/observation: For positive maximum T, main c>=ceil(T/2), secondary 1<=c<ceil(T/2). Empty attention gives empty partitions. Arithmetic assumes no overflow.

Approximation: source-derived conditional relation; unknown behavior outside its declared domain remains unknown. Assumptions: shared preconditions above and descriptant dependency boundaries. Evidence: inspected source and callers; tests.md distinguishes executed checks. Falsifiable oracle: construct admissible inputs, execute the named operation and compare this predicate; contrary output refutes it.

### last-speech

Type: selection_boundary. Operator/domain/observation: Latest admitted non-narrator speech lacking Agent gives speaker=None despite older speaker; To independently selects addressee from the same event. No per-role backwards search.

Approximation: source-derived conditional relation; unknown behavior outside its declared domain remains unknown. Assumptions: shared preconditions above and descriptant dependency boundaries. Evidence: inspected source and callers; tests.md distinguishes executed checks. Falsifiable oracle: construct admissible inputs, execute the named operation and compare this predicate; contrary output refutes it.


### tests

#### Checks

File-root evidence.md records structural checks and a bounded source-extraction Rust probe of attention and coverage arithmetic only. Other catalog oracles are prospective. world/src/tests.rs contains existing history and state-query tests. No complete course, teacher, GPU or neural-parser run is claimed. Parser artifacts, pragmatic reader, lexical tables, external NOMLEX and course loading remain dependency gaps.
