school-sents-text-command
The groupant beside tools/school-sents/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-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| 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 |
|---|---|---|---|
school-sents-text-command-behavior_complement | behavior_complement | partial source derived model | behavior_complement |
school-sents-text-command-reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
school-sents-text-command-mode_stability | mode_stability | partial source derived model | mode_stability |
school-sents-text-command-verse_coordinate_transport | verse_coordinate_transport | partial source derived model | verse_coordinate_transport |
school-sents-text-command-filter_id_order | filter_id_order | partial source derived model | filter_id_order |
school-sents-text-command-output_failure_order | output_failure_order | partial source derived model | output_failure_order |
Parts
Model text
descriptant
school-sents-text-command
Epoch 2026-10-31
Full source read preceded changes. Prospective model predicted branch/order, resource and information-loss behavior. Tests exercise actual helpers on bounded synthetic inputs; command workflows remain unexecuted. Production source prefix is preserved; only inline tests added.
CLI routes independently to lessons/books/corpus/notes/usfm/addressed/scans. Text cleaners feed cut(prose,quotes), then mode-specific filtering and ids. USFM verse mark removal precedes sentence split and optional numbering; books/scans increment ids before exclusions. Pools and side maps written sequentially.
Executable percentage approximation is unsupported: categorical parsing/effects have no useful certified metric here. Partial syntax excludes macro expansion and name resolution.
approximant
Forward relation
CLI routes independently to lessons/books/corpus/notes/usfm/addressed/scans. Text cleaners feed cut(prose,quotes), then mode-specific filtering and ids. USFM verse mark removal precedes sentence split and optional numbering; books/scans increment ids before exclusions. Pools and side maps written sequentially.
Domain
UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed.
composition
Local composition
The scoped verse-mapping fragment models its declared source interval. Parent relation: CLI routes independently to lessons/books/corpus/notes/usfm/addressed/scans. Text cleaners feed cut(prose,quotes), then mode-specific filtering and ids. USFM verse mark removal precedes sentence split and optional numbering; books/scans increment ids before exclusions. Pools and side maps written sequentially.
Shared representation/invariant: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Child costs are included in parent costs, not added a second time. Other command paths are tagged alternatives; the child alone does not establish whole-file behavior.
models
Typed source models
All models are partial source-derived relations at this manifest snapshot. Scope is one call/trace under the stated domain; no universal semantic proof.
behavior_complement
A two-word cut fragment cannot survive cut alone; books rejects >200 words and normalized heldout containment; corpus math only set suffix -train.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
reverse_reconstruction
Pool sentences admit infinitely many markup/spacing/header sources; filtered sentences and original verse marks cannot be uniquely recovered. Id gaps constrain prior cut count but not dropped content.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
mode_stability
sentences delegates cut with quotes=false; addressed true enables closing-quote attachment and changes split points. Do not exchange outputs without id remapping.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
verse_coordinate_transport
Marks record cleaned byte offsets before separator; latest mark<=sentence_start+1 changes address only when follow; EXO20/DEU5 exclude following.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
filter_id_order
books/scans allocate index before long/noise/exclusion gates; removing a kept row leaves later ids unchanged for fixed source cut.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
output_failure_order
usfm/addressed writes pool before verses; scans writes pool before counts. Failure on second write leaves first artifact. Lesson unreadable body becomes empty.
Domain: UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. Observation: Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set. Assumptions: bounded resources and source branch semantics. Oracle: selected actual-helper tests in tests.md constrain only their finite fixtures; remaining branches are source-derived.
tests
Native evidence — 2026-10-31
Package/bin: school-sents. Exact selected names:
tests::scans_close_pages_and_hyphenstests::english_filter_and_hebrew_counttests::quoted_stopstests::hebrew_verseswave33::normalization_and_verse_identity
All 5 selected checks passed twice in debug and twice in release, one exact name per invocation with one test thread. Numeric exits are zero; sorted named outcomes match across all four runs. Added test blocks were formatted before these receipts; original source prefix (including earlier tests) remains byte-identical.
One compiled production mutant changed >= 3 words to >= 2 words. The new wave33 test compiled and failed its runtime assertion (exit 101). Exact original/restored SHA-256 equality and a restored positive exact test (exit 0) were verified. No assertion-only mutant is counted; existing negative assertions remain ordinary tests. No surviving compiled mutant is omitted.
The external wave33 text receipts retain native-commands.json, verified-outcomes.json, mutation-report.json, raw logs/statuses, paired syntax projections and prospective.md. No private filesystem path is part of this public model.
Scope: actual helpers on synthetic in-memory data only. UTF-8 inputs, expected lesson/USFM conventions, bounded counters; synthetic lexicon only. Corpus, en forms file, and command outputs not executed. The scoped fragment reuses these tests where its helper is reached; other declared paths remain source-derived. Macro expansion, full command/effect execution, corpus accuracy and universal correctness are not established.
invariant-and-cost
Invariant and cost
Invariant
Quotes mode is only addressed; other routes preserve historical cut. Sentence filter >=3 words except explicit whole-short fallback. Hebrew numbering flag changes verse mapping but not cleaned sentence identity. Output files are not atomic as a set.
Cost
Text char vectors O(B) memory; repeated boundary suffix/formats/searches conservative O(B^2); DP absent. Book scanning buffers text/output; exclusion matching O(sentencesheldouttext length); sorted file order O(F log F).
Arithmetic and allocation premises are conditional. No timing or percentage surrogate claimed.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/school-sents/src/main.rs.groupant/