langseg-command
The groupant beside tools/langseg/src/main.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 | approximant |
| ast | partial | syntax.json |
| composition | partial | composition |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | executed bounded checks | 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 |
argument_projection | argument_projection | partial source derived model | argument_projection |
assessment_order | assessment_order | partial source derived model | assessment_order |
relabel_monotonicity | relabel_monotonicity | partial source derived model | relabel_monotonicity |
address_join | address_join | partial source derived model | address_join |
Parts
Model text
descriptant
Descriptant
Prospective epoch
2026-10-31 source review predicted: Args first-match scan drives dispatcher. train loads sorted/capped examples, optionally relabels Tmr/Jpa to Mishnah and recounts. eval guard precedes train/load; audit loads before guard. seg loads model before stdin. talmud loads model/both inputs, writes original and English then optionally reads mapping and writes index. Resource model: Load O(E log E); cleaning each round classifies/recounts E examples. Mix1000 docs of2..4 pieces and1/8 sweeps. Output memory and nontransactional I/O proportional to bytes. No command execution benchmark. External prospective.md predates test additions and preserves APIs, effect order, hazards and interaction hypotheses.
Observed epoch
Bounded real helper checks in tests.md constrain these models; syntax is a partial lexical projection with no macro expansion, name resolution or proof. Production expressions unchanged; five inline test modules added. Compiled mutants are temporary and exactly restored. Existing malformed-input and nonfinite domains remain explicit, not silently repaired. Parent composes this scope with siblings without adding overlapping costs twice.
Only pure Args helper executed; live command paths excluded.
approximant
Forward relation
Args first-match scan drives dispatcher. train loads sorted/capped examples, optionally relabels Tmr/Jpa to Mishnah and recounts. eval guard precedes train/load; audit loads before guard. seg loads model before stdin. talmud loads model/both inputs, writes original and English then optionally reads mapping and writes index.
Domain: Defaults PCAMW,alpha.5,min_count2,switch16. Shuffle disables cleaning. Guard is duplicate append log, not lock; audit pre-read limitation retained. Mix requires>=2 nonempty languages; zero metrics may NaN. Talmud part resets each halakhah.
invariant
Invariant and cost
Invariant
Defaults PCAMW,alpha.5,min_count2,switch16. Shuffle disables cleaning. Guard is duplicate append log, not lock; audit pre-read limitation retained. Mix requires>=2 nonempty languages; zero metrics may NaN. Talmud part resets each halakhah.
Cost
Load O(E log E); cleaning each round classifies/recounts E examples. Mix1000 docs of2..4 pieces and1/8 sweeps. Output memory and nontransactional I/O proportional to bytes. No command execution benchmark.
Limits
Only pure Args helper executed; live command paths excluded. No percentage surrogate is implemented: categorical parsing/effect observations lack an admitted numerical error metric. Any future profile must define its metric/domain and use only1/2/5/10 percent caps.
composition
Local composition
Args first-match scan drives dispatcher. train loads sorted/capped examples, optionally relabels Tmr/Jpa to Mishnah and recounts. eval guard precedes train/load; audit loads before guard. seg loads model before stdin. talmud loads model/both inputs, writes original and English then optionally reads mapping and writes index.
Children select narrow source functions with their exact byte intervals. Remaining branches stay in the file model; fragments are not exhaustive partitions. Calls and state joins follow the forward relation, not folder order. Shared scans/helpers are counted once in whole-file costs. Complement of composition is not union of complements; reverse composition retains compatible intermediates and caller premises.
models
Typed source-bound relations
Subject: exact source SHA-256 in manifest. Domain and resource premises are in invariant.md. Each model is partial, source-derived, over a single helper invocation or the described finite trace. Complements are proposed inner exclusions under those premises; reverse relations retain all compatible antecedents, with no unique inverse claim. The oracle is the named checks in tests.md; unexecuted cases remain hypotheses. No numerical approximation certificate.
behavior_complement
Unknown command errors before workload. Later duplicate option cannot win. shuffle prevents cleaning. Optional map failure cannot roll back prior talmud outputs.
reverse_reconstruction
Option value fixes earliest matching position/follower but allows later duplicates. Models admit pools sharing counts. Talmud index permits absent original/English antecedents with empty fields; reports do not reconstruct input.
argument_projection
val(f)=argv[first(f)+1], even if following value is another flag. groups_of validates no alphabet. Exact test covers duplicates/missing/default.
assessment_order
eval/mix guard logs before work; audit loads before guard. Rejection cannot certify no audit read. No assessment invocation executed.
relabel_monotonicity
Only original Tmr/Jpa non-mish labels move to mish; never move back during rounds. Recount affects all scores, no improvement theorem.
address_join
Talmud joins tractate.c.h.g keys, carries part within halakhah, outputs original then English then index. Writes are not atomic.
tests
Checks and evidence
Named source/helper checks: wave31::argument_first_match_and_missing_value.
Wave31 on2026-10-31:30 distinct exact tests passed twice debug and twice release, with equal sorted named outcomes. This node claims only its listed subset; empty subset means source review only. Six actual source-behavior mutants compiled, failed assertions, restored exact bytes/hash, and passed focused green reruns. No assertion-only mutants; existing swapped-input controls are separate. Receipt bundle: $MOVA_DATA/runs/octopus-wave31-corpus-2026-10-31 (native-commands.json, source-test-map.json, mutation-results.json, .status/.log). No live corpus, teacher, frozen assessment, download or production data used.
Only pure Args helper executed; live command paths excluded.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/langseg/src/main.rs.groupant/