onto-wdx
The groupant beside onto/src/wdx.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 | partial | Cost |
| descriptant | present | descriptant |
| invariant | partial | model.md |
| 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 |
rank_flags | rank_flags | partial source derived model | rank_flags |
tsv_join | tsv_join | partial source derived model | tsv_join |
chunk_transport | chunk_transport | partial source derived model | chunk_transport |
failure_order | failure_order | partial source derived model | failure_order |
Parts
Model text
descriptant
onto-wdx
Serde visitors borrow selected fields, discard unknown props, accept arrays as defaults. num_id checked decimalu32. process_line markers/bad counters; emits item/property schemas, deprecated rank0 retained but live flags only. Label export=(P279∨any_sitelink∨taxon)∧!skip_wm with optional languages; only Wikipedia sitelinks. Tsv controls<32→space. Chunk carry preserves LF tails/long/final lines, merges workers. extract/sample own decompressor/files; bzip bit restream drops incomplete lines.
Epoch 2026-10-31
Full source reviewed before changes; prospective predictions retained in the external wave29 receipt. Added tests preserve production behavior. entity_rows, filters, 50-item/5000-byte-label/300-chunk stream_tails, Wikipedia/SQL/ID tests executed. 400000-item bzip test, dumps/extract/sample/subprocess/DB skipped. Registration is partial modeling, not semantic proof.
approximant
Forward relation
Serde visitors borrow selected fields, discard unknown props, accept arrays as defaults. num_id checked decimalu32. process_line markers/bad counters; emits item/property schemas, deprecated rank0 retained but live flags only. Label export=(P279∨any_sitelink∨taxon)∧!skip_wm with optional languages; only Wikipedia sitelinks. Tsv controls<32→space. Chunk carry preserves LF tails/long/final lines, merges workers. extract/sample own decompressor/files; bzip bit restream drops incomplete lines.
Scoped equation
Trim CR/comma/space; empty/[ /] marker returns; else lines++. Deserialize error→bad++. emit property/item/other; export=(live279∨sl.n>0∨taxon)∧!skip_wm. Item row before labels/aliases/sitelinks/selected claims. Secondary JSON error counts bad without undo.
Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.
Executable approximant gap: no useful percentage metric established for these categorical/effectful observations. No surrogate or production substitution. Future caps 1/2/5/10% require a metric/domain and evidence; no numerical error bound follows here.
invariant
Invariant
Invalid provided id blocks numeric-id fallback. Unknown rank1. Secondary labels error can follow counters/item row; no rollback. Positive workers/chunk required to avoid zero hang. Parallel partition/report tie order not deterministic.
Cost
Linear parse/emission plus compression, eight buffers per worker and max-line carry; repeated growing tail copies may be superlinear for huge lines. workers*2/chunk arithmetic/counters unchecked; decompressor/live IO unmeasured.
Domain: finite in-memory synthetic inputs and fresh tiny temporary fixtures, valid graph/CSR/rank coordinates when graph APIs are used, sufficient resources and representable integer intermediates. Malformed-input behavior is only claimed where explicitly stated; no universal panic-freedom. External teacher, live dump, corpus and database effects were not executed.
composition
Composition
Serde visitors borrow selected fields, discard unknown props, accept arrays as defaults. num_id checked decimalu32. process_line markers/bad counters; emits item/property schemas, deprecated rank0 retained but live flags only. Label export=(P279∨any_sitelink∨taxon)∧!skip_wm with optional languages; only Wikipedia sitelinks. Tsv controls<32→space. Chunk carry preserves LF tails/long/final lines, merges workers. extract/sample own decompressor/files; bzip bit restream drops incomplete lines.
Fragment entity-projection covers bytes [31509,38777); its equation contributes the indicated local relation. Other source branches/effects remain in the parent model; fragment does not inherit a whole-file proof.
Actual joins: wdx::Tsv emits rank-bearing unquoted schemas read by wdgraph and wdlex; wdgraph rebuilds local indices so wdwalk/rank_kinds must remap Q IDs. wdalign source masks serialize through src_names into wdwalk::n_sources_str (all16 categories checked). Wd uses first-step P31 even for present graph nodes, whereas wdwalk::run only adds P31 for absent graph Qs: these are distinct adapters. wdwalk candidates feed coresel confirmation; wdvmm parsing does not prove truth. wsd consumes model::Graph, kb::up/ancestors, query::lookup and core::of_concept; eval scores query::Answer rather than proof correctness. build::Builder consumes Zip::read; central/local offsets and method gates are not full ZIP validation.
models
behavior_complement
Exclude unknown props and non-Wikipedia sitelinks, overflow IDs. Allow leading zeros. Do not exclude partial emission after secondary JSON failure; any sitelink can enable labels.
reverse_reconstruction
TSV fibers include control spellings, removed leading+ amounts, ignored fields/properties/default arrays. Stats lose ordering/worker partition. restream loses prefix bits/final partial shifted byte.
rank_flags
rank0 provenance persisted but flags inspect r>0.
tsv_join
Control<0x20 replaced, UTF8 and DEL retained; schemas consumed by wdgraph/wdlex.
chunk_transport
LastLF prefix sent, tail retained; EOF ships line withoutLF.
failure_order
Worker errors before read_err; setup can partly succeed; merge at most20 examples in join order.
tests
Executed checks
Native command: cargo test --offline -p onto --bin onto -- --exact --test-threads=1 wdx::t::entity_rows wdx::t::filters wdx::t::ids wdx::t::sql_columns_match wdx::t::stream_tails wdx::t::wikipedia_sites (add --release before -- for optimized profile). These exact names were included in the inspected selected command, twice per profile. All 21 sorted named outcomes matched across four runs. This source's compiled mutant returned exit101 with a failing assertion; exact source restoration followed by its passing test.
entity_rows, filters, 50-item/5000-byte-label/300-chunk stream_tails, Wikipedia/SQL/ID tests executed. 400000-item bzip test, dumps/extract/sample/subprocess/DB skipped.
Syntax generated twice identically after restoring source. Evidence receipts: debug-1/debug-2/release-1/release-2 logs, outcomes and exit files; negative-wdx, restored-wdx, controls.json and native-commands.json in external wave29 ontowiki run.
No strict Clippy claim: inherited dependency/target warnings observed; no production logic changed, focused rustfmt applied to added test modules only.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/onto/src/wdx.rs.groupant/