---
title: "cycle-db-vote — Mova code model"
description: "Mova code model of tools/cycle/src/db.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/cycle/src/db.rs.groupant/vote.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/cycle/src/db.rs.groupant/vote.groupant/>

# cycle-db-vote

The groupant beside tools/cycle/src/db.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_fragment
- **status:** partial source bound model
- **source:** [`tools/cycle/src/db.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/cycle/src/db.rs)
- **source SHA-256:** `7f2ba8a274a64ee7…`
- **covers:** Weight sources; retain ten-column rows; strongest newest base; positional head/relation votes; validate heads or restore base. (bytes 5713–10908)
- **part of:** [cycle-db](https://md.groupants.elamur.ai/free/en/mova/tools/cycle/src/db.rs.groupant/)
- **repository folder:** [`tools/cycle/src/db.rs.groupant/vote.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/cycle/src/db.rs.groupant/vote.groupant)
- **repository commit:** `48f2e6f74146`

> **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 or representation | [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) |
| `source_weight` | source_weight | partial source derived model | [source_weight](#source-weight) |
| `positional_alignment` | positional_alignment | partial source derived model | [positional_alignment](#positional-alignment) |
| `score_tuple` | score_tuple | partial source derived model | [score_tuple](#score-tuple) |
| `fallback_count` | fallback_count | partial source derived model | [fallback_count](#fallback-count) |

## Model text


### descriptant

#### cycle-db-vote

##### Epoch 2026-10-31

Prospective inspection identified this relation before additions: Weight sources; retain ten-column rows; strongest newest base; positional head/relation votes; validate heads or restore base.

The production implementation is unchanged; only selected inline tests are appended. Source-bound syntax is generated twice and compared. Native checks exercise bounded helpers; entry orchestration, teacher calls, models and corpora remain source-derived. Partial syntax is not semantic proof. Preserve failure prefixes and ambiguity when refining this model.

##### Epoch 2026-11-04

Added vote_misc and with_vote and the margin flag (agree_with). Off: unchanged behaviour including the early fallback return. On: the fallback keeps the strongest version's heads and still records the vote over them. Measured 2026-11-04 on a copy of a 791 385-sentence database: 50 715 multi-version sentences; 1.42 M of 17.9 M words voted; 82 k with Vote < 0.75, mostly 2/3 (one round against the seed); peak memory 5.2 GB, 49 s.

### approximant

#### Forward relation

Check promotion lock and reviewed policy; retain ordinary source weights and ten-column rows; strongest newest base, positional head/relation votes, validate heads or restore base. Apply complete selected tree after voting before current rename; reject voted text drift.

##### Composition

This fragment isolates the stated helper relation; parent composition retains surrounding effects and failures.

### catalog

## Typed observations: cycle-db-vote

Subject: tools/cycle/src/db.rs, SHA-256 34f08db359c4d620f91bb9b5a586653ff948019524e4b21ff1b21f37c413c5b9. Domain: bounded source inputs, declared filesystem/environment state and normal allocations. Each view is a partial source-derived relation, not a universal proof. Observation is one helper call or the explicitly described trace. Checks are in tests.md; unexecuted effects remain gaps.

### behavior_complement

Multiple roots, bad/self heads or detached cycles cannot pass tree_ok. Fallback is unchecked, so invalid output globally remains possible.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

Since 2026-11-04: off, no Vote item is written; on, single-version sentences and reviewed overlays get no vote; the vote never changes a head or relation (only MISC).

### reverse_reconstruction

Identical selected pairs admit many histograms/base tags. Output cannot identify voting versus fallback path.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

### source_weight

-opus precedes -sonnet precedes starts_with(round); bare opus weighs 1. Naming is not authenticated provenance.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

### positional_alignment

Equal ten-column row count suffices despite differing forms. Multiword/empty nodes also enter words if ten columns.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

### score_tuple

Weights sum; time/order maxima independent. Equal score chooses lexically largest pair.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

### fallback_count

multi increments before validation; moved only accepted changed pairs. Fallback can increase multi without moved.

Scope: the bound source interval and stated assumptions. Evidence: source inspection plus the checks explicitly named in tests.md; no finite check establishes all inputs.

### tests

#### Checks and limits

db::wave33_tests::voting_boundaries_and_snapshot_drafts covers weights and trees, not full agree aggregation.

Exact native outcomes and command metadata are retained in the external wave33 cycle receipt bundle. Selected names run twice in debug and release; syntax is independently regenerated twice. Compiled mutations and source restoration receipts distinguish behavior changes from assertion-only controls. These claims are finalized in evidence.md. No live teacher, real model/corpus, benchmark CLI or lesson-learning CLI is run.

Since 2026-11-04: db::vote_tests::vote_shares_go_to_misc and db::vote_tests::agree_writes_the_margin_and_is_stable (off leaves no vote; on adds only MISC; a second run is identical; a single version gets no vote).

### invariant-and-cost

#### Invariant and cost

Outside reviewed IDs, unequal-length versions do not vote, forms/IDs are not alignment keys, and tags/comments come from strongest. For reviewed IDs the final full-tree overlay restores selected tags/comments/heads after voting.

O(V W log V+W²), finite u32 sums assumed; overflow panics debug or wraps release.

No executable percentage surrogate is claimed: effects, categorical acceptance and report text have no justified approximate metric here. Future profiles require a useful metric, zero case, reference and evidence at caps 1/2/5/10%.
