coref-tests-contracts
The groupant beside coref/src/tests.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 |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| 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 |
fixture_transport | fixture_transport | partial source derived model | fixture_transport |
oracle_independence | oracle_independence | partial source derived model | oracle_independence |
negative_sensitivity | negative_sensitivity | partial source derived model | negative_sensitivity |
evidence_scope | evidence_scope | partial source derived model | evidence_scope |
Model text
descriptant
coref-tests-contracts
Actual production assertions for chains, pronouns, representation and new bounded boundaries.
Epoch 2026-10-31: scoped view of parent state; no independent completeness claim.
approximant
Scoped forward relation
Actual production assertions for chains, pronouns, representation and new bounded boundaries.
Parent transition model (restricted to this byte scope): row maps short fixture columns to ten-column CoNLL-U; sent adds comments and ids; story builds three-sentence title/appos/reflexive/relative chain. Assertions compare externally specified chain texts/reasons, speaker partitions, stripped-gold output, read/write spans, it readings and strict-before-notional choice. Added wave27 checks cover document failure precedence/quotes/retree, nested Entity/head tie, coordination visibility and event/empty-eval behavior.
invariant
Scoped invariant/cost
Assertions call actual production APIs. Test-generated expected chain/span/feature values are independent explicit constants, not copied resolver code. Fixtures require default environment with COREF_X/COREF_MD/PRAG_OFF unset.
Bounded constant fixtures, maximum story3 sentences; costs inherit production routines at tiny N/M. Empty eval executes all configurations with zero documents. No performance inference.
Scope: Actual production assertions for chains, pronouns, representation and new bounded boundaries.. Parent bounds are conservative; no separate timing measured.
models
Scope: Actual production assertions for chains, pronouns, representation and new bounded boundaries.. Relations below are restricted to this fragment's transitions and retained parent state.
Typed models
behavior_complement
A passing suite excludes the specific observed wrong chains, head/span order, gold leak, quote reset and visibility failures on these fixtures. It does not exclude untested language errors, arbitrary large inputs or environmental configurations.
reverse_reconstruction
For the vector of passing outcomes, compatible implementations are all programs agreeing on these bounded assertions; infinitely many disagree elsewhere. For serialized fixtures, row's lowercase lemma and omitted default MISC collapse antecedent short-column strings.
fixture_transport
Short fixture columns are trusted: missing mandatory columns panic in helper. Lemma defaults lowercase form with explicit replacements for rain/happen/break/be.
oracle_independence
story chain expectations specify title-based masculine inference, principle B across relative-pronoun cluster and sieve identities; tests do not simulate merge.
negative_sensitivity
Compiled mutants target quote reset, rightmost matching close, weather, coordination number, visibility and principle B; failure records and restoration live outside repository.
evidence_scope
Two debug and two release named outcome sets are compared; runtime control receipts distinguish compiler success from failing assertions. Test count is measured, not inferred from declarations.
No executable percentage surrogate: categorical state/effect semantics currently lack a useful cheaper observation metric. Supported future caps are 1%, 2%, 5%, 10%; no profile is claimed here.
tests
Evidence โ 2026-10-31
Safe synthetic command: env -u COREF_X -u COREF_MD -u PRAG_OFF cargo test -p coref tests:: -- --skip score::. Two debug and two release executions are retained externally with numeric exit status and sorted named outcomes. Selected checks:
- All tests in this source (score module tests excluded)
See source-test-map.json and controls.json in the wave27 coref run receipts. The library declaration file has compilation evidence only. No corpus, teacher, GPU or speed measurement.
Partial scope: Finite fixtures; no model accuracy/corpus assertions, property exhaustiveness, performance or allocation-failure evidence.
Measured receipts
Final source state: 13 named tests (12 library, 1 binary) passed twice debug and twice release, 52 total executed test instances; all four command exits0 and sorted named outcomes identical. Five added tests are four library boundary tests plus one main load test. The pre-existing score tests and groupant_transfers were filtered out.
Fixture source executed by its assertions; no independent production mutant of test helpers.
Nine source AST projections were generated twice identically. Shared ancestor declarations are deferred to root integration; local owned leaves have no structural diagnostics. No timings or general accuracy claim.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/coref/src/tests.rs.groupant/contracts.groupant/