retention-kind-provenance
The groupant beside world/src/knowledge/retention.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 | source derived partial | forward |
| ast | partial | ../../../syntax.json |
| cost | prospective source cost | cost |
| descriptant | present | epoch-memory |
| invariant | source derived partial | invariant |
| tests | bounded named actual code | 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 |
|---|---|---|---|
retention-kind-provenance-complement | behavior_complement | source derived inner bound | behavior-complement |
retention-kind-provenance-preimage | reverse_reconstruction | partial relational specification | reverse-reconstruction |
retention-kind-provenance-sentinel-asymmetry | admission_partition | source derived partial | sentinel-asymmetry |
retention-kind-provenance-map-cardinality | uniqueness_gate | source derived partial | map-cardinality |
retention-kind-provenance-field-order | short_circuit_relation | source derived partial | field-order |
retention-kind-provenance-restore-coupling | stage_precondition | source derived partial | restore-coupling |
Model text
Subject: world/src/knowledge/retention.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.
forward
Record parts/per vector counts, collect into ordered maps, and reject count loss from duplicate keys. Require each parts/isa/per source to have KINDS_SRC as lesson component or be an exact text key. Only then enter frame index rebuilding.
invariant
Successful continuation has unique vector-backed kind keys and allowed kind provenance. isa is already a deserialized map. Sentinel admission does not require a source text or validate the sentinel line number.
cost
For P parts, R per, I isa, T texts: O(P log P + R log R + (P+R+I) log T) worst case, O(P+R) map storage; sentinel checks short-circuit text lookup.
behavior-complement
Type: behavior_complement. Given a valid earlier prefix, exclude successful kind continuation with duplicate parts/per keys or a nonsentinel source absent from texts. Do not exclude arbitrary sentinel line numbers or claim a corresponding text exists: the OR explicitly admits them.
reverse-reconstruction
Type: reverse_reconstruction. For a provenance rejection, candidates satisfy unique kind keys and earlier load gates but contain at least one nonsentinel missing source in the ordered short-circuit traversal. For accepted maps, any unique wire vector order with identical pairs is compatible; sentinel source lines cannot recover original body-plan text.
sentinel-asymmetry
Type: admission_partition. Kinds accept src.0==KINDS_SRC without text lookup; frame provenance earlier has no exemption. This is intentional scope difference, not blanket trusted provenance. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.
map-cardinality
Type: uniqueness_gate. Lengths before/after collection detect duplicate parts/per keys even if their values agree; duplicate equality does not excuse the collision. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.
field-order
Type: short_circuit_relation. Duplicate checks precede source checks; provenance evaluates parts then isa then per, and all stops at its first false member. Shared message does not identify the exact field. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.
restore-coupling
Type: stage_precondition. A local student already exists with false focus and restored fields, but no frame reconstruction or returned state occurs before this gate succeeds; failed validation does not expose that temporary state. 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
After source/edge gates and temporary student initialization, duplicate kind-key checks precede provenance. Both must succeed before ordered frame restoration. Its own cost is already contained in parent validation, not additive to it.
checks
knowledge::retention::tests::oracle_provenance_and_topology_have_distinct_trust_boundaries 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.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/world/src/knowledge/retention.rs.groupant/checkpoint.groupant/validation.groupant/kind-provenance.groupant/