---
title: "db-tests-roundtrip — Mova code model"
description: "Mova code model of tools/db/tests/roundtrip.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/db/tests/roundtrip.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/db/tests/roundtrip.rs.groupant/>

# db-tests-roundtrip

The groupant beside tools/db/tests/roundtrip.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

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`tools/db/tests/roundtrip.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/db/tests/roundtrip.rs)
- **source SHA-256:** `32a4dc30a9e54ccc…`
- **repository folder:** [`tools/db/tests/roundtrip.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/db/tests/roundtrip.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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](#approximant) |
| **ast** | partial | `syntax.json` |
| **cost** | partial | [invariant-and-cost](#invariant-and-cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant-and-cost](#invariant-and-cost) |
| **tests** | bounded checks partial scope | [tests](#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](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `blank_newline_fixture` | blank_newline_fixture | partial source derived model | [blank_newline_fixture](#blank-newline-fixture) |
| `overlay_identity` | overlay_identity | partial source derived model | [overlay_identity](#overlay-identity) |
| `corruption_oracle` | corruption_oracle | partial source derived model | [corruption_oracle](#corruption-oracle) |
| `missing_disk_preimage` | missing_disk_preimage | partial source derived model | [missing_disk_preimage](#missing-disk-preimage) |

## Model text


### descriptant

#### Lossless store integration fixture

GOLD embeds leading blank lines, multiword/empty rows, raw DEPS/MISC, quotes/backslash, Unicode and absent final LF. OVERLAY shares second sentence identity with changed annotation. Legacy test loads/exports/verifies, overlays, corrupts DB then disk, restores and tests missing-file hash fallback. Executed new check parses the two fixture strings and compares exact text and overlay identities.

##### 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

#### Lossless store integration fixture forward relation

GOLD embeds leading blank lines, multiword/empty rows, raw DEPS/MISC, quotes/backslash, Unicode and absent final LF. OVERLAY shares second sentence identity with changed annotation. Legacy test loads/exports/verifies, overlays, corrupts DB then disk, restores and tests missing-file hash fallback. Executed new check parses the two fixture strings and compares exact text and overlay identities.

##### 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

## Lossless store integration fixture 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

Executed fixture check excludes losing leading blanks/final-newline flag or changing parsed raw rows. It does not exclude DB transport corruption, since no DB was used.

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

Exact GOLD text determines parsed raw rows/comments/blank metadata under parser assumptions, but not DB IDs, provenance or keys. Overlay identity output admits many annotation alternatives, explicitly including unequal raw row vectors.

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.

### blank_newline_fixture

GOLD requires blank_before=2 and final_newline=false; equal sentence contents with normalized blank layout fail exact text assertion.

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.

### overlay_identity

OVERLAY sent_id and text equal second GOLD sentence, while row annotation differs. Matching by annotation bytes would be incompatible with intended existing-sentence reuse.

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.

### corruption_oracle

Legacy modifies a token form then demands verify fail and restoring it return green; disk corruption independently fails. These are behavioral DB controls, not executed source mutants in this wave.

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.

### missing_disk_preimage

Legacy removed file still exports and verifies with NOTE when load-time SHA1 matches. Compatible state includes absent disk and intact stored raw representation; the source fixture check cannot establish that path.

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: ["roundtrip::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

#### Lossless store integration fixture invariants and costs

##### Invariant

Pure Doc roundtrip binds raw representation only; SQL COPY, export ordering and rollback remain unverified without CLI. Overlay changes annotation while sent_id/text remain equal.

##### Cost

O(GOLD+OVERLAY bytes) for executed parse/text checks; legacy path many small SQL processes, read/write temp files and digest scans.

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