annot-tests-codex-batches-fixture
The groupant beside annot/tests/codex_batches.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 |
environment_isolation | environment_isolation | partial source derived model | environment_isolation |
failure_resume_witness | failure_resume_witness | partial source derived model | failure_resume_witness |
publication_observer | publication_observer | partial source derived model | publication_observer |
timeout_and_lock | timeout_and_lock | partial source derived model | timeout_and_lock |
Model text
descriptant
annot-tests-codex-batches-fixture
Temporary isolated fixture controls executable, environment, failure mode and call accounting.
Epoch 2026-10-31: scoped source-derived model. Byte scope [173,2615); AST is shared partial projection, not a separate semantic proof.
approximant
Scoped forward relation
Temporary isolated fixture controls executable, environment, failure mode and call accounting.
Parent composition and symbolic resource costs remain in ../approximant.md. No executable percentage surrogate is supplied for this categorical/effect scope.
invariant
Scoped fragment: fixture
Local scope: Temporary isolated fixture controls executable, environment, failure mode and call accounting.
The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.
Invariants and limits
Each run uses MOVA_CODEX_BIN pointing to the synthetic script; script requires both API variables stripped before execution. No test intentionally contacts live Codex/API. Successful requests return sample OK and fixed token counts, not real model inference. Tempdir cleanup is best effort.
- Unix-only, finite scheduling deadlines, no live teacher or cloud behavior.
- No source mutation control directly targeting fixture implementation; controls target actual queue/production contracts.
models
Scoped fragment: fixture
Local scope: Temporary isolated fixture controls executable, environment, failure mode and call accounting.
The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.
behavior_complement
The fixture rejects a child inheriting API variables; failing/timeout runs cannot satisfy final-publication assertions. Passing fake tests excludes those observed local wiring failures only, not external transport or adversarial crash cases.
reverse_reconstruction
Observed call count3 after failure/resume is compatible with two initial attempts plus one resumed request under recorded script state; it does not recover remote answers. Identical success JSON can come from many prompt strings because fake output ignores most input except FAIL selector.
environment_isolation
Command-scoped env overrides avoid global process environment races. Fake shell tests key absence; supplied values are fixture-only.
failure_resume_witness
First success plus FAIL produces no final file and two calls; sticky retry leaves calls unchanged; explicit error removal permits only remaining call, final repeated run adds none.
publication_observer
Async test polls final existence at20ms intervals for<=5s then checks two lines/calls. This observes completion, not every intermediate filesystem state.
timeout_and_lock
Long prompt tests writer/timeout behavior within5s. Stale lock PID4294967295 tests no-launch rejection; neither assertion proves all PID races safe.
tests
Scoped fragment: fixture
Local scope: Temporary isolated fixture controls executable, environment, failure mode and call accounting.
The following parent relations supply composition context; claims apply only where this byte scope implements the stated operation. Other operations remain sibling/parent obligations.
Bounded source evidence
Selected actual-code tests (twice debug, twice release):
- failure_requires_explicit_resume_and_never_repeats_successes
- async_worker_publishes_only_complete_results
- legacy_teacher_is_rejected_before_launch
- changed_requests_cannot_reuse_partial_answers
- timeout_is_a_failure_without_partial_publication
- stale_worker_lock_is_reported
Run command: cargo test -p annot --bin annot --test codex_batches [--release] -- --test-threads=1 --skip ann:: --skip bfs_transfer_checks. The fake executable fixture uses temporary files, no live teacher/API. Paired named outcomes must match. Six compiled production mutations target batch last-wins, llm closed-set, repair shape gate, hints severity, main seed alias and queue resume. Each compilation exits0, test exits101, exact source restored and focused positive rerun exits0. The fixture itself has no separate mutation. Existing repair test may early-return without dictionary; independent added repair test always runs.
Unexecuted limits:
- Unix-only, finite scheduling deadlines, no live teacher or cloud behavior.
- No source mutation control directly targeting fixture implementation; controls target actual queue/production contracts.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/annot/tests/codex_batches.rs.groupant/fixture.groupant/