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

# school-preparse-publication

The groupant beside world/src/knowledge.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:** [`world/src/knowledge.rs`](https://github.com/ElamurAI/mova-free/blob/main/world/src/knowledge.rs)
- **source SHA-256:** `0128bd416063db7a…`
- **covers:** Missing-unit batch publication (bytes 61586–62482)
- **part of:** [school-runtime](https://md.groupants.elamur.ai/free/en/mova/world/src/knowledge.rs.groupant/)
- **repository folder:** [`world/src/knowledge.rs.groupant/preparse-publication.groupant`](https://github.com/ElamurAI/mova-free/tree/main/world/src/knowledge.rs.groupant/preparse-publication.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** | source derived partial | [forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **cost** | prospective source cost | [cost](#cost) |
| **descriptant** | present | [epoch-memory](#epoch-memory) |
| **invariant** | source derived partial | [invariant](#invariant) |
| **tests** | bounded named actual code | [checks](#checks) |

## 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 |
|---|---|---|---|
| `school-preparse-publication-complement` | behavior_complement | source derived inner bound | [behavior-complement](#behavior-complement) |
| `school-preparse-publication-preimage` | reverse_reconstruction | partial relational specification | [reverse-reconstruction](#reverse-reconstruction) |
| `school-preparse-publication-sorted-demand` | canonical_batch | source derived partial | [sorted-demand](#sorted-demand) |
| `school-preparse-publication-publication-barrier` | failure_effect_relation | source derived partial | [publication-barrier](#publication-barrier) |
| `school-preparse-publication-warm-cache` | idempotent_observation | source derived partial | [warm-cache](#warm-cache) |
| `school-preparse-publication-positional-contract` | alignment_assumption | source derived partial | [positional-contract](#positional-contract) |

## Model text


Subject: `world/src/knowledge.rs` at manifest source SHA. Horizon: one terminating call or explicitly named load prefix on finite synthetic inputs, pinned dependencies and ordinary allocation/I/O. This is a source-derived partial model; finite tests do not establish universal correspondence.

### callback-noninterference-premise

All cache initial/final, preservation, error non-effect and warm-cache relations below assume the supplied callback does not mutate this student's trees cache and does not leave a RefCell borrow active across publication. The FnOnce type does not enforce this: a closure may capture the same student and mutate its RefCell cache before returning either Ok or Err. Such reentrant callbacks are outside these relations. Callback effects on other state remain outside the observation; the helper does not roll them back. The current synthetic callbacks are nonmutating with respect to trees and establish only that domain.

### forward

Expand units for each input text/question flag, collect missing strings in BTreeSet, then call the provided parser once on sorted unique missing units. Empty todo returns without callback. On callback error or unequal result length return error before mutating trees; otherwise insert zipped outputs into the cache.

### invariant

Existing cached units remain; every requested missing unit receives exactly one returned parse vector only after full cardinality acceptance. This is cache publication atomicity relative to callback result, not callback-side-effect rollback.

### cost

With U distinct requested units, lookup/set work O(total unit bytes plus occurrence count*log(cache+U)), callback cost symbolic, and O(missing strings + returned parses) temporary memory. No parser speed claim.

### behavior-complement

Type: behavior_complement. Universe is (initial trees,texts,callback-result,return,final trees) transitions under the callback-noninterference-premise above; effects on other state are outside observation. Exclude changed cache on Err callback or result-count mismatch, parser invocation for empty todo, and successful publication omitting a missing key.

### reverse-reconstruction

Type: reverse_reconstruction. Given final cache and observed todo/returned parses, initial caches retain all final entries outside todo and lack todo keys. With todo hidden, many subsets of final keys and repeated input-unit histories are compatible; warm cache and freshly parsed identical entries cannot be distinguished from final keys alone.

### sorted-demand

Type: canonical_batch. BTreeSet removes duplicates and orders strings lexicographically independent of input occurrence order; callback sees exactly missing keys, not all source texts. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### publication-barrier

Type: failure_effect_relation. Cardinality validation follows callback completion but precedes mutable tree borrow and inserts. An error may have callback effects, yet no cache rows are committed by this helper. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### warm-cache

Type: idempotent_observation. Repeating requests after a complete successful fill makes todo empty and avoids callback; this observes cache membership, not full parser determinism. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### positional-contract

Type: alignment_assumption. Equal lengths only establishes cardinality. Correct text-to-parse association assumes callback results preserve request order; the helper does not inspect parse contents. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### parent-interaction

Course and retained wrappers pass expanded texts here before ingestion/evaluation. Callback success and cardinality gate must both hold before cache publication; downstream reading is not reached on Result error. The test callback is synthetic and never invokes the parser.

### checks

`knowledge::wave34_tests::preparse_publishes_only_complete_sorted_missing_batches` directly executes this helper or its containing load/reuse path with literal expected results. Full source and selected test body reviewed; no implementation-copy oracle. Exact names, profile repetitions and mutation receipts are recorded in the wave34 evidence summary. These are finite synthetic witnesses; unobserved cases and opaque dependencies remain gaps.

### epoch-memory

2026-10-31 wave34: prospective relations saved before test additions. Production bytes preserved. This new finer scope retains its parent's earlier models and history. Shared partial syntax is generated twice and compared; no semantic AST or solver claimed. No teacher, corpus, model loading, successful examination, training or lesson replay is credited as persistent knowledge.
