Elamur Groupants⌕
☰

cycle-pipeline

The groupant beside tools/cycle/src/pipeline.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
approximantpartialmodel.md
astpartialsyntax.json
compositionpartialComposition
costpartialinvariant-and-cost
descriptantpresentdescriptant
invariantpartialinvariant-and-cost
testsbounded or representationtests

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
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
flight_reachabilityflight_reachabilitypartial source derived modelflight_reachability
heldout_scopeheldout_scopepartial source derived modelheldout_scope
legacy_budgetlegacy_budgetpartial source derived modellegacy_budget
durable_attemptdurable_attemptpartial source derived modeldurable_attempt
training_status_partitiontraining_effect_partitionpartial source derived compile checked modeltraining_status_partition
training_status_preimagetraining_status_preimagepartial source derived compile checked modeltraining_status_preimage

Parts

Model text

descriptant

cycle-pipeline

Epoch 2026-10-31

Prospective inspection identified this relation before additions: Collect ready flights before feeding one next round, retain heldout/inflight exclusion set and artifact restart markers. Feed prepares draft/open parsers/context/prag then submits. Collect updates DB/prag, appends corpus, checks trees, optional enrichment/train, writes row. Legacy cascade chooses changed half then seeded hash remainder. Enrichment lock and attempt ledger reserve budget before teacher review/refine.

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.

Epoch 2026-11-01

Bound fresh input to the persistent reviewed train partition so the GP_ALWAYS path cannot bypass policy. No live teacher/trainer/GPU execution is part of this source change's tests.

Truthful training report — 2026-11-01

An audit-only collection could previously print GPU SLM fine-tuned even with training disabled. The forward effect model and training-status preimage distinguish four branches and expose the false implication from successful collection to training. The source now selects a report suffix from the actual branch, placing completed-here after successful train-command return and publication rename. It retains the original guard order, subprocess arguments, metric parsing and cycle.tsv row. Existing-candidate wording deliberately claims presence rather than verified integrity or new training; no GPU or quality inference is made.

The reporting change is compile checked and source reviewed without running collect or its effects. Prior helper tests retain their dated scopes. Old frozen-runtime logs are not rewritten, and this source change does not replace any active binary.

approximant

Forward relation

Collect ready flights before feeding one next round, retain heldout/inflight exclusion set and artifact restart markers. Feed prepares draft/open parsers/context/prag then submits. Collect updates DB/prag, appends corpus, checks trees, optional enrichment/train, writes row. Legacy cascade chooses changed half then seeded hash remainder. Enrichment lock and attempt ledger reserve budget before teacher review/refine.

Composition

Real calls join main parser/model/report helpers and db persistence. Model publication only after sh success. Legacy tier selection and enrich are conditional branches; independent lesson/twin tools are not pipeline callers.

Reviewed training — 2026-11-01

Trainer fresh selection uses db::blocks with sent_id boundaries and reviewed::training_allow, matching training_file's explicit train/dev split and heldout exclusion. Strict training rejects an unreviewed secondary DB before invoking training. Fine-tune base arguments still require caller provenance checks.

Training invocation observation — 2026-11-01

Successful collect reports the branch actually taken: disabled, no configured gparse model, an existing round candidate, or a completed training-command/publication prefix. Enabled training alone does not establish execution. The completion status is selected only after sh returns success and the candidate-directory rename succeeds; later row/report failures still prevent a final successful round report. Existing candidate status records the existing model.safetensors gate, not artifact validity or new training. Guard evaluation order and all training commands, numeric apply metrics and cycle.tsv fields remain unchanged.

catalog

Typed observations: cycle-pipeline

Subject: tools/cycle/src/pipeline.rs, SHA-256 f631f3949f282bea361d58e43e092b1c323b1ec697ce7ad871c3dfcbbf05f336. 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

No new feed while flight.len≥max. Successful reservation at used≥budget is excluded. However earlier DB effects are not rolled back by later collection failure; exactly-once database history cannot be claimed.

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

cycle.tsv row implies a compatible successful collection prefix only under untampered artifact assumptions. Same row admits varied prompts, database versions and resumed skips; attempt ledger records attempted job, not successful teacher result.

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.

flight_reachability

Initial flight requires batch-id and no done row. next is first non-done/non-flight; subsequent increments need not rescan already-done future rounds. max=0 with pending range can sleep forever.

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.

heldout_scope

exclude combines readable heldout ids with mmm ids of subdirectories lacking final; unreadable test is treated empty. Training exclusion returned is heldout only; stale artifact layout changes eligibility.

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.

legacy_budget

Budget derives rounded share allocation from last three tier rows; malformed/missing evidence falls back fixed. Casts and NaN do not establish strict monetary cap. Codex above() is None.

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.

durable_attempt

Prepare and source-check precede review reservation; existing teacher-failure stops retry; refined directory checked early. Reservation append then sync is before review/refine, and lock cleanup is Drop best effort.

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.

training_status_partition

Domain: one collect invocation reaching its final report under fixed configuration/artifact observations, trusted configured subprocess semantics, successful allocations and writable reporting. Let E be the result of finetune_rounds(), M mean a nonempty configured gparse model, and C mean the round candidate model.safetensors exists when that gate is reached. The first applicable branch defines status: not E gives disabled; E and not M gives no_configured_model; E and M and C gives existing_candidate; E and M and not C gives completed_here only after training command success and candidate-directory rename success. Failure before the final report emits no successful round summary. These are categorical observations, not approximate percentages or a claim about learner quality.

Exclusion: disabled/missing-model/existing-candidate branches cannot truthfully report a completed training invocation. A true E alone does not imply training, and the report does not establish GPU use. Counterexample to the old wording: E=false with otherwise successful collection skips the train command but formerly printed GPU SLM fine-tuned. Evidence: direct source-control-flow review and focused offline/locked compilation; no collect, DB, teacher or trainer invocation is exercised for this reporting fix. Frozen old audit logs remain historical evidence.

training_status_preimage

Observation: the final round summary's training suffix, keeping the preexisting numeric metrics separate. Its compatible input/effect preimages are disabled -> not E with M/C unobserved; no_configured_model -> E and not M with C unobserved; existing_candidate -> E and M and C without new training; completed_here -> E and M and not C followed by successful train-command return, rename and later row write. The configured executable is trusted to implement its declared command; neither command success nor this suffix proves a quality improvement, actual GPU execution, candidate integrity or any unique earlier history.

Counterexample: disabled training and a missing configured model can coexist, but disabled wins because the guards retain their original short-circuit order. An existing candidate does not reconstruct who trained it or when. Evidence status: partial source-derived model, compile checked only; live effects and historical log reinterpretation remain outside this change.

tests

Checks and limits

pipeline::wave33_tests::cascade_count_order_and_zero; pipeline::wave33_tests::attempt_budget_is_reserved_before_retry. No scheduler/feed/collect/trainer/enrich invocation.

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.

Invocation-status reporting — 2026-11-01

Focused cargo check --offline --locked -j2 -p cycle --bin cycle succeeds with a separate target. Control-flow inspection confirms the original training guard order and unchanged command/metric/row expressions; only report status and the inaccurate collect comment change. The status is assigned completed_here after command and publication success, not from the enabled flag alone. Source projection is generated twice identically; nested source ranges and affected ancestor bindings are refreshed separately. No wording-mirror tests or live collect/teacher/training/DB invocation is added, and no runtime actor is swapped. Historical misleading logs retain their original bytes.

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

Current CLI admits Codex and rejects tiers for new training, while legacy branches remain modeled but unexecuted. No atomic collect transaction. Zero inflight can stall; to+1 and seed/index arithmetic assume no overflow. Reservation appends/syncs before invocation; failures may consume budget.

Cascade B input bytes, N blocks and maximum id length L_id: O(B+N log(N+1)*(1+L_id)+N min(n,N)), including sort_by_key's repeated id hashing and linear contains scans; output O(selected bytes). Scheduler per iteration scans flights/reviews/markers plus unbounded external effects and sleeps. Reservation O(ledger bytes) read plus append/sync. No throughput claim.

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%.

The final training report is invocation-specific. Branch priority is disabled, missing configured model, existing candidate, then actual successful training-command/publication prefix. No completion claim follows merely from an enabled flag. This adds only constant-size status selection to the existing guards; external work, training admission, apply_metrics and row numbers are unchanged. Candidate presence is an existence gate, not an integrity check or proof of new training.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/cycle/src/pipeline.rs.groupant/