Elamur GroupantsโŒ•
โ˜ฐ

qagen-run

The groupant beside qagen/src/run.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 modelforward
astpartialsyntax.json
compositionpartial source modelcomposition
costpartial source modelcost
descriptantpartial source modelepoch-memory
invariantpartial source modelinvariant
testspartial source modelchecks

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
qagen-run-complementbehavior_complementpartial source modelbehavior-complement
qagen-run-reversereverse_reconstructionpartial source modelreverse-reconstruction
qagen-run-orderingorderingpartial source modelordering
qagen-run-resumeresumepartial source modelresume
qagen-run-cap-boundarycap_boundarypartial source modelcap-boundary
qagen-run-persistencepersistencepartial source modelpersistence

Parts

Model text

model

qagen-run

forward

Group paragraphs, render/check a Job, inspect resume state, then schedule capped Codex calls. try_final_raw exposes retry-first lookup errors; final_raw retains lossy Option behavior.

invariant

Batch keys ascend and paragraph order is stable. Each processed first response receives at most one format retry. Metadata errors stop need preflight.

behavior-complement

Universe: finite supplied values and filesystem observations, return values, errors and writes in this scope. Strict lookup never substitutes original after retry metadata error. No arbitrary Job batch uniqueness validation, crash-safe accounting or cancellation of in-flight work.

reverse-reconstruction

F^-1(y) contains all compatible inputs and initial states yielding y. A selected path determines candidate and batch name but not contents or unselected file state. Successful runs admit multiple schedules and preexisting states. No complete inverse solver or unique recovery claim.

cost

P paragraphs, B batches: grouping O(P log B) time/O(P+B) references. Resume O(B) probes plus raw/check costs; selection O(B*W) for W selected indices. J=max(1,jobs) threads; no explicit resource ceiling.

composition

Batching/Job and lookup stages feed todo; existing accounting initializes reservations. Rename precedes append; child correctness cannot establish durability or multi-process isolation.

ordering

BTreeMap sorts keys; Vec retains paragraph order. Duplicate arbitrary Job batches remain caller responsibility.

resume

need checks raw first: absent ->1 even if retry exists; existing retry ->0; otherwise format rejection ->2 or accepted ->0.

cap-boundary

Atomic reservation checks prior count before ask. No cross-process cap or usize-wrap proof is claimed.

persistence

Raw rename precedes accounting append; crash/append error can leave unaccounted raw.

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.

evidence

Evidence, 2026-10-30

Prospective model saved before production repair. Old debug and release: nine tests, three passed and six failed; release failures reach assertions for all six defects, including sentinel qa.tsv replacement. Final debug twice and release twice: 48 passed, one explicitly filtered model-loading test. Seven compiled production mutations reached named assertion failures; original bytes restored before positive runs. Normalized repeated per-test outcome lists matched per profile. Syntax generated twice and compared byte-identically: partial syntax, not semantic AST or proof.

No live teacher/model/corpus/database operations. Scheduler source-modeled only, not transport-tested. Writes remain nontransactional and resume/accounting crash gap remains. No numerical executable approximant claimed for this error-sensitive interface.

Source and external log hashes

External logs: $MOVA_DATA/runs/octopus-wave18-qagen-2026-10-30/.

prospective

Prospective bounded repairs

Domain: finite synthetic calls JSONL, local filesystem states, supplied paragraph values. No teacher, model, database or corpus execution. Report accounting computes ordered f64 totals and checked u64 totals. Nonrepresentable totals return Err; rounding must not turn finite large totals into JSON null. Preserve historical negative finite values and ordinary rounding. Cost O(record bytes + calls), memory O(record bytes + calls); no new asymptotic costs. collect must finish accounting/retry metadata validation before artifact writes, with no cross-file transactional promise. Run lookup chooses retry first, raw second; strict lookup propagates IO errors, compatibility final_raw remains lossy Option. need returns 1 for absent raw, 0 for existing retry or acceptable raw, 2 for format rejection. Replace existence masking with Result. Cost at most two metadata probes plus raw read/gate. Concurrency and cap algorithm remain unchanged; crash gap between raw rename and call append is explicit. Complement: no overflow wrap/panic, no accounting-derived JSON null, no collect artifact mutation on preflight accounting error, no strict metadata error treated as absence. Reconstruction: aggregate outputs admit many call lists with same totals, ordering/record attribution unrecoverable; raw choice admits all unobserved original contents if retry exists. Validation finite witnesses do not prove full scheduler behavior or transactional durability.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/qagen/src/run.rs.groupant/