enrich-lesson-smoke
The groupant beside tools/enrich/examples/lesson_smoke.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 | model.md |
| ast | partial | syntax.json |
| composition | partial | Composition |
| cost | partial | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | bounded or representation | 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 |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
assessment_contamination | assessment_contamination | partial source derived model | assessment_contamination |
key_coordinate | key_coordinate | partial source derived model | key_coordinate |
rotation_domain | rotation_domain | partial source derived model | rotation_domain |
seed_partition | seed_partition | partial source derived model | seed_partition |
Parts
Model text
descriptant
enrich-lesson-smoke
Epoch 2026-10-31
Prospective inspection identified this relation before additions: Require staged root status then parse staged lesson. Compute key-line indices from tests/exams, remove matching explain/fact rows in cut lesson. teach preparses all questions/answers/wrong choices, reads kinds and optionally lesson, learns exercises twice. score tests+exams with deterministic option seeds and optional next-question rotation. Write new diagnostic JSON with three red controls.
The production implementation is unchanged; only selected inline tests are appended. Source-bound syntax is generated twice and compared. Native checks exercise bounded helpers; entry orchestration, teacher calls, models and corpora remain source-derived. Partial syntax is not semantic proof. Preserve failure prefixes and ambiguity when refining this model.
approximant
Forward relation
Require staged root status then parse staged lesson. Compute key-line indices from tests/exams, remove matching explain/fact rows in cut lesson. teach preparses all questions/answers/wrong choices, reads kinds and optionally lesson, learns exercises twice. score tests+exams with deterministic option seeds and optional next-question rotation. Write new diagnostic JSON with three red controls.
Composition
Joins enrichment staged-status/write_new with world knowledge Lesson/PragStudent/control_red. Separate diagnostic from cycle enrichment staging; no direct pipeline caller is claimed.
catalog
Typed observations: enrich-lesson-smoke
Subject: tools/enrich/examples/lesson_smoke.rs, SHA-256 14a0b553a86f78d23e5e4d7883295357c4d49e58913f602131c3b852b0a08511. Domain: bounded source inputs, declared filesystem/environment state and normal allocations. Each view is a partial source-derived relation, not a universal proof. Observation is one helper call or the explicitly described trace. Checks are in tests.md; unexecuted effects remain gaps.
behavior_complement
Non-staged status excludes lesson parse/student work after status check. Failed write_new cannot overwrite an existing report by that helper contract; external helper semantics remain separate.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
reverse_reconstruction
right/understood/control counts admit many lesson texts, distractors and student states. all_controls_red cannot reconstruct learned knowledge or prove heldout generalization.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
assessment_contamination
Preparse includes exercises/tests/exams questions, right answers and wrong answers. Source diagnostic cannot be interpreted as question-only saved-state assessment.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
key_coordinate
key_line indexes concatenated explain+facts; fact index shifted by original explain length. BTreeSet collapses repeated key line indices; removal leaves assessment tuples intact.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
rotation_domain
For each nonempty questions list, query rotates (i+1)%len while options stay current item. Empty list never evaluates modulus; singleton rotation is identity.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
seed_partition
Exercise seed=(n<<20)|(i<<1); assessment sets low bit then XOR exams extra 0xE8A3. Fixed-width shifts/OR can collide for large n/i; no global injectivity claim.
Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.
tests
Checks and limits
Representation only: full source inspection and two syntax projections. No teach/score/main execution, model loads or learning CLI. No independent accuracy or persistent-learning claim.
Exact native outcomes and command metadata are retained in the external wave33 cycle receipt bundle. Selected names run twice in debug and release; syntax is independently regenerated twice. Compiled mutations and source restoration receipts distinguish behavior changes from assertion-only controls. These claims are finalized in evidence.md. No live teacher, real model/corpus, benchmark CLI or lesson-learning CLI is run.
evidence
Wave33 evidence โ 2026-10-31
Across this nine-source slice, 14 exact native names passed twice in debug and twice in release (56 runs); sorted target-qualified outcomes agree. Six compiled behavior controls fail named assertions and exact restored bytes pass again. One exploratory parser-count control failed by unwrap panic; it was restored and replaced by a form-column assertion control. No assertion-only control is counted.
Nine syntax projections were generated twice and byte compared. Production source prefixes match the base exactly; four files append only formatted cfg(test) blocks. Local groupants validation reports valid=true, zero diagnostics. Counts: nine source roots, ten scoped children, 114 typed views.
See tests.md for this source's precise executed or representation-only coverage. Native evidence does not apply to ignored live teacher or lesson execution. No teacher/API, model/corpus, learning or benchmark CLI was run. Receipts retain numeric statuses, exact names, log/source hashes, original backups, unique mutation replacements and restoration assertions. The external bundle is named octopus-wave33-cycle-2026-10-31.
invariant-and-cost
Invariant and cost
Training-source resubstitution only: assessment answers and distractors included in preparse. No lesson reading does not remove exercise learning. Cut keeps exercises/tests/exams unchanged; removed fact indices offset by original explain length.
O(text bytes+answer choices) preparation plus delegated parser/learning/choose costs, three students and three control score paths; real model/lesson execution absent. BTreeSet key removal O(L log L).
No executable percentage surrogate is claimed: effects, categorical acceptance and report text have no justified approximate metric here. Future profiles require a useful metric, zero case, reference and evidence at caps 1/2/5/10%.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/enrich/examples/lesson_smoke.rs.groupant/