annot-llm-calls
The groupant beside annot/src/llm.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 |
schema_domains | schema_domains | partial source derived model | schema_domains |
cache_epoch | cache_epoch | partial source derived model | cache_epoch |
prompt_transport | prompt_transport | partial source derived model | prompt_transport |
accounting_effects | accounting_effects | partial source derived model | accounting_effects |
Model text
descriptant
annot-llm-calls
Call methods construct flow-specific prompts and delegate process effects/accounting to ask.
Epoch 2026-10-31: scoped source-derived model. Byte scope [844,5358); AST is shared partial projection, not a separate semantic proof.
approximant
Scoped forward relation
Call methods construct flow-specific prompts and delegate process effects/accounting to ask.
Parent composition and symbolic resource costs remain in ../approximant.md. No executable percentage surrogate is supplied for this categorical/effect scope.
invariant
Scoped fragment: calls
Local scope: Call methods construct flow-specific prompts and delegate process effects/accounting to ask.
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
Fixed forms are enumerated one-based in input order and are never tokenized by prompt builder. prag_ok accepts only case-sensitive listed values; loading labels does not itself enforce prag_ok. Missing numeric usage defaults zero; cost field is reported input, not independently priced.
- Live ask, adjudicate/correct transport, environment cache variants and log write failures are unexecuted.
- Categorical prompts/schema have no useful percent surrogate.
models
Scoped fragment: calls
Local scope: Call methods construct flow-specific prompts and delegate process effects/accounting to ask.
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
prag_ok excludes unknown fields and out-of-set values, including uppercase variants. annotate_prompt excludes Item.text and gold from variable token list. Pure prompt construction performs no teacher call; the Opus call methods do.
reverse_reconstruction
A variable annotation prompt constrains ordered ids/forms but has arbitrary compatible Item.text/gold fields. Cached context map has many antecedent TSVs because duplicate ids overwrite and malformed lines disappear. Reply/accounting does not uniquely identify prompt or remote execution.
schema_domains
form has8, act16, polarity3, voice3 values; indirect/hedge accept exactly 0 or1. Empty or unknown values reject.
cache_epoch
First read fixes each OnceLock for process lifetime. Later environment/file edits do not update it; failed read also caches empty.
prompt_transport
Direct methods concatenate fixed+variable; batch queue joins message text blocks with two newlines. They carry equivalent sections but are not claimed byte-identical prompts.
accounting_effects
mkdir occurs before teacher validation/launch inside transport. Successful ask reads result string or empty and u64 usage or zero, wall seconds. log_calls serializes entire buffer before write, but write itself is not transactional.
tests
Scoped fragment: calls
Local scope: Call methods construct flow-specific prompts and delegate process effects/accounting to ask.
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):
- llm::wave27_tests::closed_pragmatic_domains_and_fixed_tokens
- batch::tests::request_has_cached_fixed_block_and_same_prompt
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:
- Live ask, adjudicate/correct transport, environment cache variants and log write failures are unexecuted.
- Categorical prompts/schema have no useful percent surrogate.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/annot/src/llm.rs.groupant/calls.groupant/