qagen-report-sampling
The groupant beside qagen/src/report.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-report-sampling-complement | behavior_complement | partial source model | behavior-complement |
qagen-report-sampling-reverse | reverse_reconstruction | partial source model | reverse-reconstruction |
qagen-report-sampling-hash-key | hash_key | partial source model | hash-key |
qagen-report-sampling-tie-order | tie_order | partial source model | tie-order |
qagen-report-sampling-weak-filter | weak_filter | partial source model | weak-filter |
qagen-report-sampling-output-size | output_size | partial source model | output-size |
Model text
forward
Gather pairs, filter optional explicit weak support, sort seeded (hash,index) keys, render up to n pairs and write sample.md or weak.md.
invariant
Hash ties resolve by original pair index. Selected order deterministic for identical source inputs and seed.
behavior-complement
Universe: finite supplied values and filesystem observations, return values, errors and writes in this scope. No external entropy, semantic correctness or recall guarantee; omitted pairs never appear in sample.
reverse-reconstruction
F^-1(y) contains all compatible inputs and initial states yielding y. Output leaves unselected pairs and most paragraph metadata unconstrained. Same sample may arise under different seeds producing the same selected ordering. No complete inverse solver or unique recovery claim.
cost
O(N log N) sorting plus support/gather/render cost; O(N) keys and selected output bytes.
composition
Gate-valid anchors feed support and rendering; weak predicate selects explicit pairs below threshold before seeded sort.
hash-key
Uses paragraph key#pair-k with supplied seed, not answer text.
tie-order
Original gathered pair index resolves equal hashes.
weak-filter
Some(t) requires explicit and support<t; NaN t selects none.
output-size
take(n) bounds pair count, not rendered bytes; long paragraph text remains unbounded by n.
checks
Finite synthetic Rust tests in owned sources; broad offline qagen lib suite twice per profile, explicitly skipping lemma::tests::doubt_with_en_model. Compiled production mutations reach named assertion failures. Exact outcomes and hashes are in the file groupant evidence.md.
epoch-memory
2026-10-30 prospective model saved before repairs. Old-code witnesses demonstrated token overflow, JSON null from float overflow, premature report replacement, and masked metadata errors. Ordinary output keys, finite negative history and legacy Option lookup semantics are preserved. Scheduler was not redesigned.
limitations
Partial source models and finite observations, not proof of all concurrent/filesystem states. Syntax projection is partial; macros opaque. Allocation failure, races and crashes may prevent completion. No live teacher/model/corpus/database was used. No useful certified metric for a numerical surrogate of these error-sensitive operations was identified; executable approximant is absent, with no invented error budget or speed claim.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/qagen/src/report.rs.groupant/sampling.groupant/