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

# annot-main-finish

The groupant beside annot/src/main.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:** [`annot/src/main.rs`](https://github.com/ElamurAI/mova-free/blob/main/annot/src/main.rs)
- **source SHA-256:** `38431df8a1b1d72a…`
- **covers:** Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates. (bytes 33082–41976)
- **part of:** [annot-main](https://md.groupants.elamur.ai/free/en/mova/annot/src/main.rs.groupant/)
- **repository folder:** [`annot/src/main.rs.groupant/finish.groupant`](https://github.com/ElamurAI/mova-free/tree/main/annot/src/main.rs.groupant/finish.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` |
| **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) |
| `selection_zero` | selection_zero | partial source derived model | [selection_zero](#selection-zero) |
| `patch_precedence` | patch_precedence | partial source derived model | [patch_precedence](#patch-precedence) |
| `finish_effect_order` | finish_effect_order | partial source derived model | [finish_effect_order](#finish-effect-order) |
| `extraction_filters` | extraction_filters | partial source derived model | [extraction_filters](#extraction-filters) |

## Model text


### descriptant

#### annot-main-finish

Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates.

Epoch 2026-10-31: scoped source-derived model. Byte scope [33082,41976); AST is shared partial projection, not a separate semantic proof.

### approximant

#### Scoped forward relation

Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates.

Parent composition and symbolic resource costs remain in ../approximant.md. No executable percentage surrogate is supplied for this categorical/effect scope.

### invariant

#### Scoped fragment: finish

Local scope: Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates.

The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.

#### Invariants and limits

For unique pair ids and valid forms, output patch keys are a subset of supplied ids and every returned annotation passes ann::check. Unknown reply ids are ignored. Failed syntactic patches keep a sentence broken even after OK. PRAG side-map can retain entries for rejected sentences; finish restricts emission to final keys. This is not a transactional pipeline.

- No training, live network, live teacher, corpus/model write or end-to-end finish execution.
- silver n=0, duplicate ids, post-FEATS gate and unchecked indexing limitations modeled without production changes.

### models

## Scoped fragment: finish

Local scope: Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates.

The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.

### behavior_complement

Missing-line, broken-patch and gate-failed sentences are excluded from patch output in that precedence order. An OK line does not excuse an earlier invalid patch. UDPipe output is comparison-only and never supplies final corpus annotation; optional Rust FEATS replacement is not re-gated here.

### reverse_reconstruction

A final accepted patch annotation has all compatible original drafts and patch sequences whose last valid assignments yield that annotation, provided that accepted id is seen and no line marks it broken. Acceptance is per sentence: unmentioned input ids are individually rejected and do not prevent other seen, unbroken ids from passing their annotation gate. Unknown-id lines and repeated OK are unobservable. Original draft or teacher reasoning cannot be recovered uniquely. Reports collapse per-token differences into aggregates.

### selection_zero

shuffle uses seed.max(1), so 0 and1 coincide and empty/singletons are identity. calib takes n after shuffle. silver checks out.len()==n after a possible push, so n=0 may return nonempty; duplicated source ids are not removed.

### patch_precedence

Recognized id becomes seen before parsing. Token number wraps subtract1 then bounds-checks. Unknown FEATS still mutates local draft but broken flag excludes it. PRAG validates closed values; unknown ids ignored; duplicate pair ids can panic on second map removal.

### finish_effect_order

prag/raw files precede optional Rust features and UDPipe, then dumps/calls/report construction, corpus append, report write. Failure can leave partial outputs. Corpus have-set is initial only, so duplicates within items are not prevented.

### extraction_filters

examples_in accepts only example-section candidates with ASCII/limited punctuation, >=3 words and>=2 lowercase-rich words, excluding marked incorrect lines. sentences requires redistributable CC BY4 metadata, clean >=3-word candidates and >=70% alphabetic chars; comments saying6-40 are not enforced.


### tests

#### Scoped fragment: finish

Local scope: Write/report/corpus composition is effectful and nontransactional; optional features occur after original gates.

The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.

#### Bounded source evidence

Selected actual-code tests (twice debug, twice release):

- tests::seed_examples_skip_ungrammatical
- tests::prag_patches_are_checked
- wave27_tests::shuffle_seed_zero_alias_and_permutation
- batch::tests::results_parse_and_patch

Run command: cargo test -p annot --bin annot --test codex_batches [--release] -- --test-threads=1 --skip ann:: --skip bfs_transfer_checks. The fake executable fixture uses temporary files, no live teacher/API. Paired named outcomes must match. Six compiled production mutations target batch last-wins, llm closed-set, repair shape gate, hints severity, main seed alias and queue resume. Each compilation exits0, test exits101, exact source restored and focused positive rerun exits0. The fixture itself has no separate mutation. Existing repair test may early-return without dictionary; independent added repair test always runs.

Unexecuted limits:
- No training, live network, live teacher, corpus/model write or end-to-end finish execution.
- silver n=0, duplicate ids, post-FEATS gate and unchecked indexing limitations modeled without production changes.
