aontu

Errors reference

Rendered from docs/reference-errors.md in the engine repository, where a correction belongs, and where the test suite executes every example on this page.

Every refusal the engine can make carries a code, and every code carries a class. The code names the condition that was refused; the class says what kind of thing went wrong, and so which repair applies.

This page is normative for the registry: every registered code, its class, and the version it was first registered at. It is not normative for the report a code arrives in, nor for the failures themselves. aontu vet specifies the report: the fields a finding carries, what a site names, and the --format json object each verb answers. The language reference specifies each construct where that construct belongs, and states what refuses it there: see Errors for the message families, Exact or refused: lossy literals and The exactness budget for the numeric rules, and Errors under The constraint algebra for a constraint violation.

aontu explain answers one code from the same table a finding carries, and aontu help codes prints the agent-facing card of the classes, which is shorter than the table below and carries no counts.

Contents


Classes

There are seven classes, and the registry holds 172 codes across them.

classcodeswhat went wrong
parse53the text is not a document
conflict55two values cannot both hold
incomplete11nothing contradicts, but the value is not concrete
reference27a name or path resolves to nothing
compat13a change breaks an earlier version
budget7evaluation hit a deterministic limit
internal6the engine reached a state it should not reach

A class states which repair applies rather than where in the engine the failure arose. aontu explain answers one code with its class and the engine’s own text for it.

Two conflict codes are reported after unification rather than by it: relation_cycle and relation_inverse_missing, whose shape and timing are under aontu relations.

Dynamic-prefix families

Five registry rows are prefixes rather than whole codes: func:, op:, op[, ref[, and var[. The engine appends a name or a value, so a reported code may be func:upper or ref[$.x]. The bare func, op, ref, and var are separate rows with their own classes, and are not the same codes as the families.

Class lookup takes the exact registry entry first, then the registered prefix the code extends, and then internal, because an unregistered code is an engine defect rather than a user error. Hint lookup has no such fallback. It is exact, so a finding whose code extends a family carries no hint text although the prefix row has some, and aontu explain is the only place a prefix’s text is answered. func:upper is not a registry row, and resolves through func::

$ aontu explain func:upper
code:  func:upper
class: conflict

Function error:

Both the class and the text are the prefix’s. A finding carrying that code would take the class and carry no hint key.

The registry in a finding

Three of a finding’s fields are read from the registry, and each carries a qualification the registry alone does not show.

Class. A finding’s class is the registered class, on every surface that reports one. A finding that mints its own code takes the class that code is registered with; a finding that repeats a code the engine raised takes the class from the same row, never one of its own. message is the code’s one-line headline throughout; the wording of that line is each implementation’s own, since the shared suite holds codes and classes rather than prose.

Hint text. All 172 codes have hint text. aontu explain --list prints them one per line, with each code’s class beside it; a code carrying no text would be marked (no text), and none is. A finding carries that text under hint when it repeats a code the engine raised and the run asked for --format json: vet, allow, model get, model why, view, the library’s diff (TypeScript, and no CLI verb of its own), and the MCP tools. A finding the report mints for itself carries its own message and no hint, and so does the bare command that evaluates a document. No text format prints hint text at all: aontu explain is the verb that answers one code’s.

Severity. The field’s domain is error, warning, and info, and nothing in either implementation reports info. Five codes are always reported at warning: deprecated, pref_not_instance, patch_not_editable, patch_ambiguous, and patch_span_mismatch. Under aontu breaking with --allow-deprecated-removal, any error finding at a path the prior version marked with deprecate is reported at warning instead, so a compat code otherwise reported at error arrives at warning there.

Class incomplete is the only class a verdict rule reads. Under vet a schema that does not stand up on its own is verdict error whatever the finding’s class; otherwise any error outside class incomplete makes the verdict invalid, errors only of class incomplete make it incomplete unless --partial was passed, and a warning never moves it.

Exit codes

A code’s class does not determine the exit code. scalar_value, class conflict, exits 1 where the contradiction is between schema and data, and 4 where it is inside the schema. Which values a verb answers, and what each one means for that verb, is in the API reference beside that verb’s option list. aontu vet, aontu subsume, aontu breaking, aontu view, aontu model set, and aontu fmt each state their own table.

aontu view is the one verb whose refusals split across two exits. Nine view_* codes are usage rather than the document’s fault and exit 2: view_kind_unknown, view_profile_unknown, view_rows_exceeded, view_at_required, view_sets_required, view_group_required, view_document_shape, view_style_profile, and view_style_unknown. A view kind that names no kind at all is caught while the arguments are being read, so it exits 2 with no report at all.

The codes

The registry is test/spec/errcodes.tsv, which both implementations run as part of the shared suite; the parity it holds them to is stated under aontu explain.

The tables below are that file, one section per class, alphabetical within each. A since column is the version line at which the code was first registered, and 0.51.0 is the registry’s own inception version, so every code older than the registry carries it. Codes are append-only: a registered code is never renamed or reused, so a row stays registered after the condition it named stops arising. The parenthetical link on a row is the section that specifies the refusal; twenty rows have no such section and carry no link.

Class parse

codesinceraised when
abnf_grammar0.63.0The grammar could not be compiled; abnf() takes RFC 5234 ABNF, with = and / rather than ::=. (Grammars: abnf() and parse())
alias_colon0.58.0Reserved for the former rejection of alias keys; %name: value now creates a field and declares its alias. (Aliases %)
alias_in_path0.53.0An alias name used as a segment of a path. (Aliases %)
alias_not_toplevel0.53.0An alias declaration has no map root, or a key declaration sits below it. (Aliases %)
bare_punct0.58.0A bare string holding a character outside letters, digits, -, and _. (Errors)
decimal_syntax0.51.0A 0d literal that is not a valid exact number. (The four numeric leaves)
each_data0.53.0The first argument to each() is not a bag, so it has no children to make elements from. (Generating children: pack and each)
elided_value0.53.0A key, element, or spread with no value. (Errors)
emit_body0.57.0A template body in an emit() table is not a list. (Transforming: emit)
emit_data0.57.0The first argument to emit() is not a bag, so the selection has no children to visit. (Transforming: emit)
emit_table0.57.0The second argument to emit() is not a rule table. (Transforming: emit)
emit_template0.57.0A template in an emit() table is not a rule naming both match and body. (Transforming: emit)
esc_variant0.57.0esc(), usc(), or a template’s esc: key was given a variant naming no convention. (esc(s, variant?) and usc(s, variant?))
export_arg0.69.0export() was given something other than a set of alias names. (Publishing a name: export)
filter_data0.53.0The first argument to filter() is not a bag. (Selecting: filter and match)
form_data0.58.0The first argument to the list generator form is not a bag; form was renamed each, which answers each_data.
func_arity0.53.0A call whose argument count is not the built-in’s arity. (Errors)
include_denied0.53.0An @"..." include refused by the active trust profile. (Clause 1: hermeticity)
include_extension0.54.0An @"..." include naming a file whose extension the include table does not know. (Source loading @"…")
incomplete_expression0.51.0An expression missing a term, grouping parentheses with nothing inside included. (The + operator and grouping)
inverse_name0.53.0The argument to inverse() is not a relation name. (Declared relations)
merge_conflict0.53.0A version-control conflict marker left in the source. (Errors)
module_integrity0.53.0A module resolved locally does not carry the meaning its canon-hash pin recorded. (Modules)
module_local0.65.0A bare module reference whose last segment carries an extension the include table knows. (Modules)
module_missing0.53.0A module import naming a package that is not in the project’s local stores. (Modules)
module_moved0.65.0A later version of the imported package declares a new path. (Modules)
module_path0.54.0A domain-shaped module import whose path cannot be a directory on every platform the toolchain runs on. (Modules)
negative0.51.0Unary minus applied to a non-numeric operand. (The four numeric leaves)
not_number0.51.0A numeric literal that reads as a non-finite value. (The four numeric leaves)
pack_data0.53.0The first argument to pack() is not a bag. (Generating children: pack and each)
pack_key0.53.0A list packed by pack() holds an element that is not a string. (Generating children: pack and each)
parse0.51.0The outer wrapper for a source that could not be turned into a document; the inner error carries the code that explains it.
parse_arg0.63.0parse() was given something other than a grammar string and a text string. (Grammars: abnf() and parse())
parse_bad_src0.51.0The source handed in for parsing is not a non-empty string.
parse_unknown0.51.0A parsed node of a kind the value builder has no case for.
patch_assignment0.53.0A set argument that is not <path>=<value>. (aontu model set)
path_address0.54.0path() was given text that is not a tree address. (First-class paths: path(p?))
pref_implicit_bag0.53.0A preference mark written on a bare key rather than on a value. (Preference / default *)
refer_address0.53.0refer() was given something that is not a path value. (Addresses)
rel_address0.53.0A rel() field holds something other than path values. (Declared relations)
render_path0.58.0A unit path that is not relative, below the output directory, and distinct from every other unit’s. (What aontu render writes)
render_profile0.58.0A declaration needing a lowering, under a profile whose language has none. (What aontu render writes)
rep_pattern0.57.0The pattern given to rep() is outside the portable subset re() takes. (rep(s, pattern, sub))
rep_sub0.57.0The substitution given to rep() names a group the pattern does not have. (rep(s, pattern, sub))
replace_overlap0.58.0Two keys of a template’s replace map overlap, one inside the other. (Replacing text in a body: replace and esc)
replace_unused0.58.0A key of a template’s replace map appears in none of the body’s literal lines. (Replacing text in a body: replace and esc)
reserved_key0.69.0A source key beginning with the engine’s reserved \u0000aontu_ prefix, where the parser keeps a document’s marks. (Errors)
sort_dir0.63.0A sort direction other than asc or desc. (Ordering: sort)
split_sep0.57.0The separator given to split() is neither a string nor a pattern. (Text: esc usc rep split)
syntax0.51.0The parser refused the source text; the message is the parser’s own, with the operator-character hint appended. (Lexical structure)
unify_no_src0.51.0No source was handed in for unification.
usc_malformed0.57.0usc() was given text the named convention could not have produced. (esc(s, variant?) and usc(s, variant?))
view_line_break0.54.0A label the figure would draw holds a line terminator. (aontu view)

Class conflict

codesinceraised when
aggregate_data0.53.0An aggregate was given something other than a bag to fold. (Aggregating: sum least greatest)
aggregate_empty0.53.0least or greatest given an empty bag. (Aggregating: sum least greatest)
arg0.51.0A required argument is missing.
close0.51.0The structure could not be closed. (Closed values: close / open)
closed0.51.0A key or element added to a closed map or list. (Errors)
constraint0.52.0The value does not satisfy the normalised residual the constraint reduced to. (The constraint algebra)
constraint_pattern0.53.0An re() pattern outside the supported subset. (The constraint algebra)
decimal_budget0.51.0An exact decimal past 4096 coefficient digits or an absolute scale of 4096. (The exactness budget)
divide_by_zero0.53.0div, mod, or rem given a zero divisor. (Arithmetic: add sub mul div mod rem)
emit_none0.57.0No template matched a node, and the table has no catch-all. (Transforming: emit)
emit_ref0.57.0A template body names a field the node it matched does not carry. (Transforming: emit)
empty0.54.0A disjunction with no admitted alternative. (Preference / default *)
empty-dist0.54.0Every alternative of a distributed disjunction is refused. ([Disjunction `
exact_float_mix0.51.0An exact number combined with a binary float. (The four numeric leaves)
float_overflow0.53.0A result that is not a finite binary64 number. (Arithmetic: add sub mul div mod rem)
func0.51.0A function operation failed; the named function carries the detail. (How a call is checked)
func:0.51.0Dynamic-prefix family: a named function’s own failure, the name appended (func:upper).
func_arg0.55.0An argument does not fit the function’s signature. (How a call is checked)
inexact_divide0.53.0An exact decimal operand given to div, mod, or rem; exact decimal division is not closed, so it is refused rather than rounded, while a 0d biginteger divides. (Arithmetic: add sub mul div mod rem)
inexact_integer_sum0.51.0An integer result outside the integral, int64, exactly representable range. (Arithmetic: add sub mul div mod rem)
invalid-arg0.51.0An argument does not match the expected type or format.
join_member0.54.0A member of the bag join() folds is not text and never will be. (Folding to a string: join)
key_level0.51.0The argument to key() is not a level. (How a call is checked)
list0.51.0A list was expected and the value is of another kind. (Container kinds: map() and list())
list_length0.53.0A literal list alternative admits only a list of its own length; a spread makes it take any length. (Lists)
literal_nil0.51.0A literal nil met another value. (The value lattice)
lossy_integer_literal0.51.0An integer literal not exactly representable in binary64; the hint names the 0d spelling. (Exact or refused: lossy literals)
make0.51.0A value could not be constructed.
map0.51.0A map was expected and the value is of another kind. (Container kinds: map() and list())
match_none0.53.0No pattern matched, and match has no default. (Selecting: filter and match)
must0.53.0The value fails an evaluate-only check written with must(); the author’s message rides on the finding. (Band B: must)
nil_gen0.51.0A nil survived unification, and nil is not a literal value to generate. (Generation)
no_first_arg0.51.0The function’s first argument is missing.
no_scalar_unify0.51.0Two scalar values of incompatible types. (Unification rules)
not-scalar-type0.51.0A scalar type was expected and the value is not one. (Unification rules)
op0.51.0An operator operation failed; the named operator carries the detail.
op:0.51.0Dynamic-prefix family: a named operator’s own failure, the name appended (op:add).
op[0.51.0Dynamic-prefix family: an operator failure carrying the offending value (op[1]).
operate0.51.0The operation could not be performed over the values given.
parse_failed0.63.0The text does not parse under the grammar given, so the field is refused. (Grammars: abnf() and parse())
pick_key0.53.0A child of the bag has no key for pick to project. (Missing fields and invalid arguments)
place_pair0.53.0Two placeholders met, and neither has a value to fill the other. (The placeholder _)
pref_rank_clash0.54.0Two defaults of the same rank disagree. (Preference / default *)
relation_cycle0.53.0A relation declared acyclic(), and its edges form a cycle. (Declared relations)
relation_inverse_missing0.53.0A relation declared inverse(name), and an edge has no mirroring edge. (Declared relations)
render_lang0.58.0A text escape carrying verbatim syntax of a language other than the unit’s. (What aontu render writes)
render_strict0.58.0An opaque escape, which the renderer cannot check, under strict rendering. (What aontu render writes)
replace_value0.58.0A replacement value is not text by the time the dispatch fires. (Replacing text in a body: replace and esc)
resolve0.51.0The value could not be resolved.
scalar-type0.51.0Two scalar kinds where neither contains the other. (Unification rules)
scalar_kind0.51.0Two literal scalars of different kinds. (Unification rules)
scalar_value0.51.0Two literal scalars of the same kind that are not equal. (Unification rules)
sort_domain0.63.0A bag with no order to be put in. (Ordering: sort)
sort_key0.63.0A child of the bag has no key to order by. (Ordering: sort)
unite0.51.0Two values could not be united.

Class incomplete

codesinceraised when
conjunct0.51.0A conjunction has a term that could not be resolved. (Conjunction &)
disjunct_no_gen0.53.0More than one alternative is still admitted, so there is no single value to generate. ([Disjunction `
listval_no_gen0.51.0A list element survived unification as something other than a literal value. (Generation)
listval_required0.51.0A required list element has no value. (Optional keys ?)
listval_spread_required0.51.0A key a spread requires has no value, in a list. (Spreads &:)
mapval_no_gen0.51.0A map value survived unification as something other than a literal value. (Optional input: maybe)
mapval_required0.51.0A required map value has no value. (Optional keys ?)
mapval_spread_required0.51.0A key a spread requires has no value, in a map. (Spreads &:)
no_gen0.51.0A value survived unification as something other than a literal value. (Generation)
recursion_unexpanded0.53.0A schema refers to itself, and no data reached the position to expand it against. (Recursive references (fixpoints))
required_listelem0.51.0A non-optional list element has no value. (Optional keys ?)

Class reference

codesinceraised when
import_not_exported0.69.0A destructure asked for a name the other file does not publish. (Taking a name: the destructure)
invalid_var_kind0.51.0A variable’s kind is not the kind the use expects. (Variables $name)
multisource_not_found0.51.0An aontu: name that is not one of the language-supplied models; the message names the set. (The aontu: models)
no_path0.51.0A path reference resolves to nothing. (Optional input: maybe)
patch_ambiguous0.53.0Two or more statements pin the path, so an in-place edit has no single place to write. (aontu model set)
patch_not_editable0.53.0An in-place edit found no single literal to rewrite, so the assignment was appended. (aontu model set)
path_cycle0.51.0A path reference closes a cycle. (Recursive references (fixpoints))
ref0.51.0A reference could not be resolved to a value. (References and paths)
ref[0.51.0Dynamic-prefix family: a reference failure carrying the address (ref[$.x]). (References and paths)
refer_unresolved0.53.0A refer() address names no node in this evaluation. (Existence is decided, not deferred)
rel_unresolved0.53.0A rel() address names no node in this evaluation. (Declared relations)
render_unit0.58.0The unit asked for is not in the instance. (What aontu render writes)
unknown_function0.51.0A function name that resolves to no built-in. (How a call is checked)
unknown_var0.51.0A variable that has not been defined. (Variables $name)
var0.51.0An unresolved variable reached generation. (Variables $name)
var[0.51.0Dynamic-prefix family: a variable failure carrying the name (var[$x]). (Variables $name)
view_at_required0.54.0The meet ladder draws the contributions at one path, and none was named. (aontu view)
view_document_shape0.54.0A figure in a view document does not name both its kind and its out file. (aontu view)
view_group_required0.54.0The layer diagram bands nodes by a field, and none was named. (aontu view)
view_kind_unknown0.54.0The figure kind is not one the verb draws; the note lists the kinds. (aontu view)
view_profile_unknown0.54.0The figure kind does not render into the profile asked for. (aontu view)
view_relation_ambiguous0.54.0The document has edges under several relations, and the figure draws one. (aontu view)
view_relation_unknown0.54.0The relation named to the view has no edges in this document. (aontu view)
view_sets_required0.54.0The set panel needs both the sets map and the member field, and one was missing. (aontu view)
view_sets_shape0.54.0The sets map or the universe does not have the shape the set panel reads. (aontu view)
view_style_profile0.55.0The style asked for is not the one that profile carries. (aontu view)
view_style_unknown0.55.0A style other than none, ansi, css, or the command line’s auto. (aontu view)

Class compat

codesinceraised when
compat_default_changed0.53.0The effective default changed, so a document generable before materialises differently or becomes incomplete. (Profiles)
compat_marks_changed0.53.0The marks on the two values differ. (Maps, lists, closedness, optionality, spreads)
compat_narrowed0.53.0The specific value admits something the general does not; the message names which comparison failed. (Rules, by value former)
compat_outcome_changed0.65.0A position both versions resolve with nothing supplied, to different values. (aontu publish)
compat_required_added0.53.0The general value requires a key the specific omits or makes optional. (Maps, lists, closedness, optionality, spreads)
compat_undetermined0.65.0A position the prior version resolved with nothing supplied, and nothing resolves now. (aontu publish)
deprecated0.53.0A use of a value carrying a deprecate mark. (deprecate(v: any, r?: map) : any)
pref_not_instance0.53.0A disjunction’s effective default is not an instance of any remaining alternative. (Default validity)
sub_default_indeterminate0.53.0Equal-rank preferences disagree, so the effective default is not a single value. (Profiles)
sub_disjunct_distribution0.53.0A specific alternative is not admitted member-wise, and no concrete counterexample settles the distribution case. (Rules, by value former)
sub_evaluate_only0.53.0An evaluate-only check makes the admitted set opaque. (Rules, by value former)
sub_path_dependent_spread0.53.0A path-dependent spread template cannot be compared structurally. (Maps, lists, closedness, optionality, spreads)
sub_unresolved0.53.0Unresolved residue, or no subsumption rule covers the pair of value formers. (Rules, by value former)

Class budget

codesinceraised when
alias_budget0.69.0Alias expansion counted past the size budget before evaluation; expansion terminates whatever the budget, so this is about size. (Aliases %)
budget_passes0.52.0The fixpoint pass budget was spent before the model converged; the hint names what was still refining. (Cross-field bounds and residuation)
max_depth0.51.0Input nested deeper than the engine processes. (Clause 2: termination)
module_depth0.53.0Module verification nested past its depth, usually a vendor tree leading back to itself. (Modules)
recursion_budget0.53.0A recursive schema expanded past the depth budget without meeting concrete data. (Recursive references (fixpoints))
unify_cycle0.51.0A circular reference reached during unification. (Clause 2: termination)
view_rows_exceeded0.54.0The figure has more rows than the row cap allows; the figure is refused rather than trimmed. (aontu view)

Class internal

codesinceraised when
format_check0.56.0The formatted text is not the same document, so nothing was written. (aontu fmt)
internal0.51.0An unexpected state during unification.
unify_failed0.67.0A document does not evaluate, and the failure carries no code of its own.
patch_span_mismatch0.53.0The overlay text does not hold the recorded source at the recorded span, so the span cannot be verified before writing. (aontu model set)
unify_no_res0.51.0Unification produced no result.
unknown_op0.51.0An operator expression the evaluator has no rule for.
  • aontu vet for the report these findings arrive in, the fields they carry, and its own exit table.
  • aontu explain for the verb that answers one code, and for what --list prints.
  • Errors in the language reference for the message families and the rules that refuse a document.
  • Read a conflict error for reading a two-site conflict message operand by operand.
  • Collect errors instead of throwing for gathering every finding in one pass from the embedded API.
  • test/spec/errcodes.tsv for the registry itself, which both implementations run.