Elamur Groupants⌕
☰

db-tests-prag

The groupant beside tools/db/tests/prag.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
approximantpartialapproximant
astpartialsyntax.json
costpartialinvariant-and-cost
descriptantpresentdescriptant
invariantpartialinvariant-and-cost
testsbounded checks partial scopetests

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
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
prag_fixture_identityprag_fixture_identitypartial source derived modelprag_fixture_identity
negative_control_scopenegative_control_scopepartial source derived modelnegative_control_scope
null_trace_observationnull_trace_observationpartial source derived modelnull_trace_observation
executable_dependencyexecutable_dependencypartial source derived modelexecutable_dependency

Model text

descriptant

Pragmatic database fixture and assertions

Legacy integration fixture initializes temp DB, loads two sentences, migrates, inserts pragmatic labels and checks view values, then rejected duplicate/missing/invalid-bit/header attempts preserve counts. New representation check only parses TEXT into two CoNLL sentences, checks nine header columns and byte roundtrip.

Prospective epoch — 2026-10-31

Full source was reviewed before edits; external prospective.md records API states, failure order and predicted checks. Production prefix remains byte-identical; test additions are isolated cfg(test)/test items.

Observed epoch — 2026-10-31

2026-10-31 wave31: 16 selected target/name cases passed twice debug and twice release with identical sorted outcomes; six compiled source-behavior mutants failed assertions, exact bytes restored and positive checks passed. Evidence scope is only the named helpers/fixtures. External receipt directory: $MOVA_DATA/runs/octopus-wave31-store-2026-10-31. No DuckDB integration, production loader/corpus, training or GPU run.

Retained limitations

No SQL evaluation was substituted with a mock process. Missing DuckDB is a dependency gap, not passing database evidence. Partial syntax has no macro expansion/name resolution/types; Rust helpers and fixtures do not prove all models.

approximant

Pragmatic database fixture and assertions forward relation

Legacy integration fixture initializes temp DB, loads two sentences, migrates, inserts pragmatic labels and checks view values, then rejected duplicate/missing/invalid-bit/header attempts preserve counts. New representation check only parses TEXT into two CoNLL sentences, checks nine header columns and byte roundtrip.

Domain

Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Approximation limits

Categorical parsing, exact identity, transactional effects and resource errors have no useful percentage approximation metric here. No executable surrogate is claimed. Future profiles, if justified, may use only 1%, 2%, 5%, 10% with a defined metric/reference/domain.

models

Pragmatic database fixture and assertions typed model catalog

Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Observation is one call/trace in the declared scope. Operators below are partial source-derived relations; complement is a proposed inner exclusion relation, reverse an outer compatible-antecedent relation retaining ambiguity. No universal proof follows from finite checks. Each oracle is the relevant named helper check below when it reaches the behavior; remaining SQL/effect cases are source review or proposed real-CLI checks.

behavior_complement

Fixture-only success excludes malformed CoNLL/changed ID/header-width observations covered by assertions; it cannot exclude SQL constraint bugs. Legacy intended relation excludes count growth after rejected loads, but remains unexecuted.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

reverse_reconstruction

Successful fixture assertions admit any environment supporting the same parser outputs; they do not recover a database. Legacy final view values admit different unused DB metadata and cannot identify all intermediate SQL states.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

prag_fixture_identity

TEXT supplies tatoeba:1 and tatoeba:2 with six and two rows; successful direct parsing must retain ID and exact bytes. Header includes optional trace.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

negative_control_scope

Legacy failures exercise duplicate run, missing sentence, bad bit and foreign header; stable before/after counts are stronger than nonzero status alone, but only when the real CLI runs.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

null_trace_observation

Legacy final query demands NULL means and JSON trace pointer w1=can for Rust source. The new parser check does not evaluate this SQL expression.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

executable_dependency

duckdb helper asserts a file at DUCKDB or home/bin path before child launch. Missing executable is an infrastructure blocker, not evidence of database semantic failure.

Domain/assumptions: Finite valid-UTF8 inputs, representable counters/IDs, available memory; filesystem fixtures confined to owned temporary root. SQL semantics are conditional and unexecuted. Subject is the source and SHA256 bound in manifest; fragment applies only to declared byte range.

Evidence: see tests.md; unexecuted database branches remain conditional.

tests

Selected checks

2026-10-31 wave31: 16 selected target/name cases passed twice debug and twice release with identical sorted outcomes; six compiled source-behavior mutants failed assertions, exact bytes restored and positive checks passed. Evidence scope is only the named helpers/fixtures. External receipt directory: $MOVA_DATA/runs/octopus-wave31-store-2026-10-31. No DuckDB integration, production loader/corpus, training or GPU run.

Named target-scoped checks for parent source: ["prag::wave31_fixture_representation_without_database"]

Native commands and numeric status/log/outcomes live in external native-commands.json and receipts. Integration fixture checks use actual en::conllu parsing only. Legacy prag_layer_and_negative_controls, qa_table_loader_and_negative_controls and lossless_round_trip_and_negative_controls were inspected but not executed: real DuckDB unavailable. A fragment's listed parent tests may only cover part of its relation; SQL/query/transaction/IO-fault claims remain source-derived.

Negative controls

Six source-behavior mutations: quote doubling, TSV NULL rejection, QA positivity, prag bit truth, MWT counter, sentence boundary predicate. Each compiled, failed an assertion, restored exact original bytes and passed the selected positive. No assertion-only mutations and no surviving behavioral mutants.

invariant-and-cost

Pragmatic database fixture and assertions invariants and costs

Invariant

Legacy assertions concern actual DB subprocesses and require real CLI. The executed fixture-only check neither creates a DB nor proves rollback/view behavior. Temporary fixture paths are PID scoped.

Cost

Fixture representation O(TEXT bytes); legacy test entails many process startups and small SQL transactions/queries, with cost conditional on actual CLI. No production corpus.

Symbolic bounds are source-derived, not measured wall-clock speed or universal complexity proof. Allocation failures, integer exhaustion and concurrency are outside finite evidence.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/db/tests/prag.rs.groupant/