translation-flow-pages
The groupant beside tools/translate/src/pages.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 |
| cost | symbolic source derived | invariant-and-cost |
| descriptant | present | descriptant |
| invariant | partial | invariant-and-cost |
| tests | bounded helpers only | 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 |
page_filter | page_filter | partial source derived model | page_filter |
gate_product | gate_product | partial source derived model | gate_product |
text_given | text_given | partial source derived model | text_given |
control_identity | control_identity | partial source derived model | control_identity |
Model text
descriptant
translation-flow-pages
chapters gathers Hebrew verse and English sentence pages, sorts numeric verse/sentence coordinates and builds chapter records, then book/chapter sorts. run uses JPS chapter runs for both language page blocks, gives translated/source texts to site decoder, merges translation residual and page Tally. Dir::total adds all three translation residual totals to page cells in LAYERS excluding Meta. add_block increments all counters, records bounded failure ids and merges tallies.
Epoch 2026-10-31
Prospective predictions saved before edits in the external wave32 tr_flow receipts. Original production bytes preserved; only appended synthetic test modules added. Selected actual helpers exercised; five compiled behavior controls rejected with exact byte restoration and positive reruns. Source syntax projection is partial, not expanded semantic Rust. Diagnostic reconstruction with residual is not semantic understanding or persistent learning.
Page naming domain is Tanakh indices<39: vkey accepts NT/DC but indexing BOOKS then can panic; valid fixture scope must respect this. Finite residuals, representable counters. Translation gate and page exact count distinct; pointer inequality selects shuffled encoder control and skips page execution.
approximant
Forward relation
chapters gathers Hebrew verse and English sentence pages, sorts numeric verse/sentence coordinates and builds chapter records, then book/chapter sorts. run uses JPS chapter runs for both language page blocks, gives translated/source texts to site decoder, merges translation residual and page Tally. Dir::total adds all three translation residual totals to page cells in LAYERS excluding Meta. add_block increments all counters, records bounded failure ids and merges tallies.
Scope: source-derived conditional transition model at the manifest SHA. Page naming domain is Tanakh indices<39: vkey accepts NT/DC but indexing BOOKS then can panic; valid fixture scope must respect this. Finite residuals, representable counters. Translation gate and page exact count distinct; pointer inequality selects shuffled encoder control and skips page execution.
composition
Composition
Scoped children are projections of this file, not independent executables. Main population filtering feeds aggregation; order/text helpers feed measure's exact decoder; many's agreement and storage read the same MTok with intentionally different punctuation treatment, streaming accounting consumes reader costs, clustering consumes normalized PairM. Uncovered branches remain source-derived; finite helper checks do not establish orchestration wiring.
catalog
Typed models
All entries bind the source SHA and optional byte range in manifest.json. Observation is one admitted helper call or the explicitly described orchestration trace. Relations are partial source-derived models, not universal proofs. Finite test names and unexecuted effects are in tests.md.
behavior_complement
Page cost excludes Class::Meta while translation cost includes all classes. Empty control tallies cannot establish page exactness; page failure does not overwrite independent translation gate. Missing page directories silently skipped, encountered read_page errors propagate.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
reverse_reconstruction
Dir totals admit all distributions of cells whose admitted sums match, with Meta page cells unconstrained. Aggregated block counters lose individual page content and failures beyond cap. Chapter page composition needs source paths/mapping to recover pages; rendered aggregate cannot recover them.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
page_filter
page_bits sums only keys whose layer is in LAYERS and class!=Meta; +0.0 normalizes empty sum. trans_bits applies no corresponding filter.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
gate_product
Translation ok is conjunction of measured verse gates, initialized true even when no units; page_ok adds Tally.exact_ok separately, so empty success is not corpus evidence.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
text_given
given is a BTreeSet union of target/source strings: repeated equal text collapses free count while literal piece count can exceed it. It is decoder side information.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
control_identity
Shuffled encoder branch uses pointer comparison, does not run pages, supplies default Tally; absence of page measurements must not be converted into measured zero page cost.
Domain and held-fixed assumptions: the invariant/forward documents for this exact scope. Status: partial source-derived relation; complement is a conditional inner exclusion, reverse retains ambiguity, other types specify the named projection/intervention. Oracle: relevant named synthetic tests when listed; otherwise source inspection only.
tests
Evidence and gaps
Native checks
pages::wave32::translation_and_page_costs
These selected names ran twice debug and twice release with exact filtering and one test thread; raw logs and numeric status files are in the external octopus-wave32-tr_flow-2026-10-31 receipt directory. All test bodies inspected before selection. Inline cases use only synthetic in-memory records; the existing blocks filesystem test was not selected. Tests listed at file level do not execute every function or this entire scoped fragment.
Controls
Five compiled source-behavior mutants: main gate counter suppressed; many strict chapter comparison relaxed; measure noncanonical-gap recording disabled; pages Meta filter reversed; blocks literal-change predicate reversed. All failed the corresponding assertion and passed after original bytes/hash restoration. Zero assertion-only mutants; zero surviving exploratory mutants.
Limitations
CLI argument/effect paths, live corpus/model/annotation/training, full Run::verse, page filesystem and reports remain source-derived only. Source syntax projections generated twice and byte-compared. No corpus-quality, persistent-learning, throughput or universal semantic coverage claim.
invariant-and-cost
Domain, invariant and cost
Invariant
Page naming domain is Tanakh indices<39: vkey accepts NT/DC but indexing BOOKS then can panic; valid fixture scope must respect this. Finite residuals, representable counters. Translation gate and page exact count distinct; pointer inequality selects shuffled encoder control and skips page execution.
Cost
Directory scans+sorting O(Plog P) and file bytes; block comparisons call delegated parser/encoder costs. Dir totals O(residual cells); add_block O(stage cells+page cells+row bytes). No actual page read, annotation or site publication performed.
Integer additions/casts require representability; finite floating inputs where comparisons are modeled. These symbolic costs are not measurements of corpus throughput. No useful cheaper executable percentage surrogate established; future supported caps only 1/2/5/10%.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/translate/src/pages.rs.groupant/