Elamur GroupantsโŒ•
โ˜ฐ

mova-topic-corpus-hardcases

The groupant beside tools/topic-corpus/src/hardcases.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
approximantpartialForward approximant
astpartialsyntax.json
compositionpartialComposition
costpartialCost
descriptantpresentDescriptant
invariantpartialInvariant
testsfinite evidencetests.md

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

Model text

Descriptant

The topic corpora's side of the one shared hard-cases list (mova-hard-case-list, format mova-hard-case-v2, the same file as the Wikipedia corpus's cases): judges a parse (no words, a tree without exactly one root, a head outside the sentence, no frame for six words or more), records found sentences with the document's licence and a pointer to the document, re-judges only its own open cases, and writes a parsed document as a mova-hard-bundle-v1 bundle for the Fish priority lane. Source: tools/topic-corpus/src/hardcases.rs.

Forward approximant

issues(words, roots per tree, frames) -> reasons. record(found, licence, reader): build v2 Found records (source topic-corpus, id <doc>:<s>, document {doc, s}) -> hard_case_list::record for parser en. recheck: hard_case_list::recheck(source = topic-corpus, parser en) with the sentence check. bundle(corpus, doc, sentences) -> JSON with each sentence's CoNLL-U (forms, lemmas, UPOS, heads, relations; XPOS/FEATS unknown) and empty pragmatics rows.

Invariant

A key is open from its first found until a learned event; found again after learned reopens it; appends are flocked and fsynced.

Cost

O(list) per record/recheck (the whole file is read); bundle O(sentences).

Composition

Parent: topic-corpus.

behavior_complement

Does not delete cases, does not decide what the parser learns, never learns a case another source found (source-scoped recheck, tested). Evidence status: source-derived model with finite checks, not a proof.

reverse_reconstruction

The list keeps text, place and reasons of each case; the parse that failed is not kept. No unique inverse is claimed.

tests.md

hardcases::tests::found_once_open_until_learned (v2 records with licence and document pointer; red control: another source's case is not rechecked; bundle CoNLL-U shape). Live 2026-11-04: 309 cases (all no_skeleton) from the hot neighbourhood of bryant-2017.

cargo test --manifest-path tools/topic-corpus/Cargo.toml --offline with WORLD_EN_MODEL=$MOVA_DATA/download/0/0.4/en.bin (18 unit tests; fixture library, fake papers binary, fake terminal, local Sea Spider store; two identical runs on 2026-11-04). Without the model the model-dependent tests report a skip.

Negative controls 2026-11-04 (each red, then restored): public admission without the origin condition; assert_public without the Sea Spider/draft/note refusals; seeding without the learner lock; shadow-library filter off; public citing that ignores refusals; cache eviction ignoring the hot pin.

These are finite fixtures and live samples; not a proof.

2026-11-04 (branch hard-loop): 17 of 18 pass; seed::tests::seeds_terms_from_neighbour_papers_and_respects_the_learner_lock fails on main as well (unrelated to this change).

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/tools/topic-corpus/src/hardcases.rs.groupant/