Elamur GroupantsโŒ•
โ˜ฐ

retention-checkpoint-restore

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

componentlabelwhere
approximantpartial source derivedforward
astpartial../../syntax.json
costsource derived conditionalinvariant
descriptantpresentepoch-memory
invariantpartial source derivedinvariant
testsbounded existing evidencechecks

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.

idtypelabelwhere
retention-checkpoint-restore-behavior-complementbehavior_complementpartial source derived specificationbehavior-complement
retention-checkpoint-restore-reverse-reconstructionreverse_reconstructionpartial source derived specificationreverse-reconstruction
retention-checkpoint-restore-occurrence-orderordered_fold_relationpartial source derived specificationoccurrence-order
retention-checkpoint-restore-quote-ownerlast_writer_relationpartial source derived specificationquote-owner
retention-checkpoint-restore-cold-statestate_projection_relationpartial source derived specificationcold-state

Model text

Subject: retention.rs, SHA-256 89715719216c1a94f9e701e24d4efea0b962bf04f5178d4916d19dc54536fb34. The manifest records the exact source interval. These source-derived relations are partial specifications; their evidence is bounded.

forward

On validated g and initialized s with false focus, fold frames in order i=0..N-1. Append i to entity occurrences, eligible verb, reverse next/cause and source-line indexes; overwrite sayer[q]=i; append mcode(f) then f. Return course/ledger from payload with reconstructed student.

behavior-complement

Type: behavior_complement. Domain and observation are the forward relation above unless narrowed here. U is validated-payload/returned-state pairs; R is this deterministic fold conditional on mcode. An inner bound U minus R includes true restored lesson_focus, a retained ghost lookup absent from frames, a skipped qualifying verb occurrence, or an earlier quote owner surviving a later overwrite.

reverse-reconstruction

Type: reverse_reconstruction. Domain and observation are the forward relation above unless narrowed here. The output graph and persisted fields determine the accepted payload modulo canonical vector order; the original live cache contents and focus cannot be reconstructed. If only indexes are observed, many frame/text/weight states remain compatible. The relation preserves this ambiguity rather than treating indexes as an invertible encoding.

occurrence-order

Type: ordered_fold_relation. Domain and observation are the forward relation above unless narrowed here. by_ent records occurrences from ents plus ent.and, including repeated IDs, in frame traversal order. It is not a set of unique frame numbers. by_verb excludes empty and LIGHT verbs; prev/effect reverse next/cause. Proposed fixtures with repeated IDs distinguish occurrence lists from deduplicated lists.

quote-owner

Type: last_writer_relation. Domain and observation are the forward relation above unless narrowed here. For a target q, sayer[q]=max{i | q is in frame_i.quote} when the set is nonempty. Multiple mentions within one frame leave the same owner; later frames overwrite earlier ones. Reverse observation q->i requires occurrence at i and absence at later indices, with earlier occurrences arbitrary.

cold-state

Type: state_projection_relation. Domain and observation are the forward relation above unless narrowed here. Successful load starts from default transient fields and sets lesson_focus=false; persisted weights, aliases and kind relations are restored explicitly. Codes are recomputed by mcode, not copied from prior live codes. Full parser cache equivalence is outside the observed contract; no lesson parsing is invoked in this loop.

invariant

Cost follows total entity occurrences, links and frames with ordered-map updates plus mcode cost; mcode internals are outside this fragment. Assuming constant mcode would be unjustified. This range is the reconstruction suffix of the checkpoint parent.

checks

oracle_checkpoint_fiber_erases_stale_indexes_and_focus compares literal entity/verb/prev/effect maps and false focus across two live states, then reloads. Roundtrip covers selected persistent fields and empty caches. Duplicate entity incidence and duplicate quote ownership remain proposed tests.

Shared evidence is in ../../tests.md. Referenced older mutation controls are historical evidence, not rerun here. General semantic correspondence and unsampled behavior remain unknown.

epoch-memory

2026-10-29: decomposition preserves the twenty file-level models and makes this observation boundary explicit. The prospective expectation is that all twelve existing focused CPU retention tests remain green because Rust is unchanged. Executed results are recorded in the root tests.md after checking. AST is not materialized for this range; no syntax selection, expanded AST, inverse solver or automatic combiner is supplied.

audit-epoch-2026-10-30

The current source binding includes four appended synthetic oracles. Production byte ranges remain unchanged. The checkpoint audit refines the behavior-complement and preimage models with resealed first-error witnesses, provenance/sentinel cases, ordered occurrence and quote-owner observations, and serializer-versus-validator trust boundaries. The earlier proposed quote and provenance checks now have finite evidence; exhaustive gates, semantic code equivalence and successful cold examination remain gaps. Current whole-file partial syntax is materialized in the root sidecar; this fragment retains its reviewed byte-range scope without claiming a semantic or expanded AST.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/world/src/knowledge/retention.rs.groupant/checkpoint.groupant/restore.groupant/