qagen-schema
The groupant beside qagen/src/schema.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 source model | forward |
| ast | partial | syntax.json |
| composition | partial source model | composition |
| cost | partial source model | cost |
| descriptant | partial source model | epoch-memory |
| invariant | partial source model | invariant |
| tests | partial source model | 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 |
|---|---|---|---|
qagen-schema-complement | behavior_complement | partial source model | behavior-complement |
qagen-schema-reverse | reverse_reconstruction | partial source model | reverse-reconstruction |
qagen-schema-projection | closed_alphabet_projection | partial source model | specialization |
Parts
Model text
model
qagen-schema
forward
Normalize with trim and Unicode lowercase, then search literal seven QType or two ExIm names; Rule admits only byte 1 or 2. Domain: all supplied UTF-8 strings and u8 values; observation: Option enum, canonical name or numeric version. Exact scoped formula, not a performance surrogate.
invariant
ALL order is stable; canonical names are unique; parse(name(t))=Some(t); Rule::of(r.num())=Some(r).
behavior-complement
Noncanonical normalized spellings, internal whitespace changes, abbreviations and version bytes outside {1,2} cannot produce accepted values. Universe: supplied finite UTF-8 strings/Para sequences and candidate observable results. These are scoped source-derived exclusions, not merely negative test outcomes.
reverse-reconstruction
For accepted t, all s with lowercase(trim(s))=name(t) are compatible; rejected output collects every other string. Canonical name and version number uniquely recover their enum inside these closed alphabets. Operator is the set-valued fiber F^-1(y) = {x in domain | F(x)=y}; no implemented complete inverse solver or unique recovery claim.
specialization
Normalization quotient identifies case and surrounding whitespace but preserves internal spaces; round trips alone cannot catch a consistently renamed alphabet, hence independent literals.
cost
For input byte length B, normalization and lookup cost O(B) time and O(B) allocation; enum/name/version operations cost O(1). Fixed alphabet sizes seven and two.
composition
Schema version selects a fixed rules prefix; renderer appends batch-local paragraph and sentence coordinates. Context uses original document identity and paragraph number only for immediate-predecessor adjacency. Child scopes share source identity; inverses must share the same Rule and Para sequence rather than combining unrelated marginal fibers.
checks
Six new wave17_models tests (two schema, four prompt), including 256 rule bytes and 98 successor cases. See root evidence.md for compiled controls and repeated build-profile outcomes.
epoch-memory
2026-10-30 prospective review: unchecked predecessor addition could overflow; cross-document comparison already correct. A synthetic MAX to MIN witness panicked before repair. checked_add preserves ordinary adjacency and keeps context at the overflow boundary. Schema literal mapping had no witnessed defect. No API changes.
limitations
Partial source models, with literal and finite observations; no analytical approximation error or speed claim. Syntax projection is partial, macro bodies opaque. Input text is rendered verbatim, including delimiter-like content; grammar-injective recovery requires trusted delimiter-free fields. Teacher, parser, corpus, database and data acquisition were not executed.
evidence
Wave17 schema evidence
2026-10-30. Source SHA-256: 03e113198711324f029d8e9e4d9fc899416e3144ea856240b9d962775c78c2fe.
Six named wave17_models tests pass identically in two debug and two release runs: two schema and four prompt. The controls helper compared all six normalized named outcomes across all four final runs. No teacher, parser, corpus, database or data acquisition was run. Existing warnings in en and prag remain outside this change.
The original prompt fails maximum_predecessor_retains_context by integer overflow. Five compiled production mutations fail their intended assertions: schema canonical character name to person; version 2 to V1; prompt document equality to true; sentence coordinate k+1 to k+2; V2 rule dispatch to V1. Exact source bytes were restored before the final passing checks.
The alphabet oracle uses independently written literal names, the rule oracle covers all 256 bytes, and the context oracle covers 98 combinations using widened i128 arithmetic. The prompt golden body tests local coordinates and an omitted-metadata fiber. Finite evidence is not an exhaustive proof over arbitrary text.
Raw run: $MOVA_DATA/runs/octopus-wave17-prompts-2026-10-30. Syntax projections generated twice per source and compared byte-identically; macro bodies remain opaque.
| Artifact | SHA-256 |
|---|---|
| old-witness.log | 6c0b3c7bc5790f6ab5224d022891635e276e2ec0b59ea51c998bdc9fdb24b45f |
| mut-schema-alphabet.log | 407156c2a9ce15dd7cde2096d08e914e779412d1a92c05bb207877f78ce008ca |
| mut-schema-version.log | 5339dd1bc8c3112f6aef8a7cf4ebe62ca14de914b5ac76fc00e2e2dd5718565c |
| mut-prompt-document.log | e4205fdf543c492536dc1b8071857c8000addb91f74c66a07431ab98bb1ab90c |
| mut-prompt-coordinate.log | ad1a3c83ae0aaea326118a5d9642ebd5ff778a1f135084420b89a0e2a6e4751e |
| mut-prompt-rule.log | 008c306e4c5e24edf84b8fba8f2b084e71031d3c2f65926ca2b8c39fff88d39d |
| final-debug-1.log | 0caa173d8034714dcb39a432fed15564c394080b7d8e8ee164a7e729ae21f1c2 |
| final-debug-2.log | 06e4ad17b3655831a247b18af805635266bd2e70382d1ce595d13b0bf6112853 |
| final-release-1.log | bf2b1c0924cd3643f2f2fbf2fb42bd07d5d304dbe233dc007b20547510402e4e |
| final-release-2.log | a7fa15bf1f617a592056ccdca6ccd45488617d6fac0ad2a6740a7500ce58b698 |
| controls.log | 6bd372ec64e9a4c76a5b4c2ed867f58cee16f335a16725670c987ec127d206c0 |
External scaffold structural inventory reports both owned leaves available_partial with no diagnostics. Its three global diagnostics concern only the unchanged root group: new scaffold child and two transitive source bindings require integration refresh. This worker did not modify the global registry or parent groups.
This page in Markdown â https://md.groupants.elamur.ai/free/en/mova/qagen/src/schema.rs.groupant/