Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix C — Diagnostic Codes

Argon diagnostics use a structured naming scheme: OE / OW / OI plus four digits. Run ox explain <code> for the long-form explanation of any diagnostic.

The naming scheme:

  • OE (Oxide Error) — the build fails. Codes in the four-digit range; the leading two digits categorise the source area (compiler / runtime / package / kernel / network / …).
  • OW (Oxide Warning) — the build proceeds; the issue is flagged.
  • OI (Oxide Info) — informational hint; nothing is wrong.

ox explain <code> prints the canonical long-form explanation and a fix suggestion. The reference below lists every code shipped today, organised by category.

Parser (OE0001OE0004)

CodeMeaning
OE0001Unexpected token
OE0002Unclosed block
OE0003Invalid decorator syntax
OE0004Invalid character in identifier

Resolution (OE0101OE0103)

CodeMeaning
OE0101Unresolved name
OE0102Ambiguous import
OE0103Cyclic module dependency

Type system + meta-property structural rules (OE/OW/OI 02xx)

CodeMeaning
OE0201Concept used as relation, or vice versa
OE0202Property type mismatch
OE0203Non-exhaustive match or cardinality violation
OE0204Rigid type specializing anti-rigid type
OE0205Role used as concept
OE0206Duplicate declaration
OE0207Mixed-strength rules on same head
OE0208compute call arg-count mismatch
OE0210Recursive compute-call cycle
OE0211derive head’s consequence atoms cannot lower (silent rule drop refused)
OE0212meta(X) argument is not ground at rule time
OE0213expect { diagnostic <code> } references an unknown diagnostic code
OE0214using <name> clause on test references an unresolved frame
OE0215Two composed frames declare the same-named member
OE0216Inline fixture redeclares a frame member
OE0218Frame include chain forms a cycle
OE0219Rule-body aggregate cannot be lowered into the Datalog body
OE0221Relation cardinality has min > max (unsatisfiable range)
OE0222let _ as <handle>: T shadows a binding in the enclosing scope
OE0223Anonymous-type content-hash collision (defensive; astronomically rare)
OW0207Sortal missing Kind ancestor (UFO structural R28)
OW0208Anti-rigid under Category without Kind in path (R24)
OW0209Mixin lacks rigid or anti-rigid subtypes (R25)
OW0210Non-sortal aggregates only one Kind (R30–R31)
OW0211Role has no mediation path to relator (R34)
OW0212Phase has no sibling phase (R35)
OW0213Phase / phasemixin cross-specialization (R32–R33)
OW0214Phasemixin has no Category ancestor (R36)
OW0215@requires / @requires_all deprecated; use where clause
OI0216box() tautology — rigid type necessarily satisfies
OE0217box() impossible — anti-rigid cannot satisfy necessity
OI0218diamond() tautology — anti-rigid trivially possible
OW0219kind specializes kind — consider subkind
OE0220Inner doc comment not at module scope
OE0224Test assertion arity mismatch (assert Concept(individual) vs assert role(subj, obj))

Metatype substrate (OE 022x023x)

User-declared metaxis / metatype / metarel / decorator declarations and their application sites.

CodeMeaning
OE0225Unknown metarel — application or path resolution to a nonexistent metarel
OE0226pub rel endpoints don’t satisfy the bridging metarel’s source / target constraints
OE0227metaxis for <kind> qualifier names an unknown declaration kind, or a metaxis is used in a metarel context (or vice versa)
OE0228metaxis <Name> { … } lacks the required for <kind> qualifier
OE0229@[<name>] does not resolve to a pub decorator
OE0230Decorator application argument count doesn’t match declared parameter count
OE0231Decorator’s on <Target> doesn’t match the application site
OE0232lowers_to: <hint> clause names a recognizer shape that doesn’t pattern-match the body
OE0233Decorator’s explicit fragment: <tier> contradicts the inferred body tier
OE0234Decorator argument value doesn’t satisfy the parameter type
OE0235compute has no body and no impl rust(...) binding

Collections (OE/OW 24xx)

Diagnostics for the collection substrate covered in Chapter 2.8.

CodeMeaning
OE2401Type-constructor arity mismatch — Set[T, U], Map[T], Optional[T, U]. Set / List / Optional / Range take 1 type argument; Map takes 2.
OE2402Collection-op expression form parsed cleanly but full UFCS desugaring and runtime evaluation are not yet wired (tracked by the E3 epic). Workaround: write the qualified-call form (std::collection::List::size(xs)) or rebuild via direct field assignments.
OE2403Collection element-type mismatch — List[Nat].append("foo"), [1, "two", true]. Argon collections are homogeneous; the expected element type comes from the receiver’s declared type.
OE2404Index expression’s type isn’t Nat (for List) or doesn’t match the declared key type (for Map::get).
OE2405Slice bounds invalid — xs[5..2], negative literal bound. Checked at elaboration for literal bounds; dynamic bounds are checked at runtime.
OE2406Unordered collection indexed — s[i] where s: Set[T]. Set elements have no positional identity; use Set::contains for membership tests or convert to a List.
OE2407Higher-order argument’s signature does not match the operation’s expected closure shape (xs.map(f) where f has the wrong arity or wrong argument types).
OE2408Higher-tier collection op used inside a context that admits only tier:closure or below — typically xs.map(f) inside a derive rule body. Lift the transformation into a pub compute or rewrite using closure-tier ops.
OW2401Optional unwrapped without a clear fallback — bare .unwrap() or .unwrap_or whose fallback is itself Optional[T]. Provide a concrete T-typed fallback or guard with is_some.
OW2402[T; <= 1] is a singleton-bounded set; Optional[T] (sugared T?) expresses the same intent more directly and integrates with the Optional op surface. Quickfix suggestion, not a hard error.
OW2403Comprehension binder shadows a let binding or parameter in the enclosing scope. Rename the binder to silence. Matches the fresh-binder convention Datalog rule bodies already use.

Reasoning / DL (OE/OW 03xx)

CodeMeaning
OE0301Unsatisfiable concept (TBox-level: contradictory axioms make the concept impossible to instantiate)
OW0302Redundant axiom
OW0303Decidability warning
OE0304Incoherent TBox
OW0305Unsatisfiable concept (warning-severity twin of OE0301; what ox check --reason actually emits when reasoning over imported / under-specified ontologies, so contradictions in the source don’t gate the check)
OE0306Disjointness violation — ABox contradiction at evaluation time (an individual is asserted as instance of two disjoint concepts; distinct from OE0301 which is a TBox contradiction)
OW0307Hypothetical block evaluation error — override target shape, missing individual, missing property, or unsupported value type

Defeasibility (OE 04xx)

CodeMeaning
OE0401Ambiguous defeat
OE0402Unreachable defeater
OE0403Circular superiority relation

Stratification (OE 05xx)

CodeMeaning
OE0501Circular negation
OE0502Unstratifiable program

Constraint (OE 06xx)

CodeMeaning
OE0601Unsatisfiable constraint
OE0603metatype literal type doesn’t match the axis’s declared value_type
OE0604#dec(<tier>) enforcement: declaration’s required tier exceeds ambient
OE0605Unknown metatype name (four-variant hint: not-a-metatype-but-found / available-not-imported / multi-package-available / not-declared)
OE0606metaxis <name> : <T> where { <pred> } refinement violated by a typed-axis literal

Package / module (OE 07xx)

CodeMeaning
OE0701Private concept in public context
OE0702Orphan axiom without extend block
OE0703Private item imported across module boundary
OE0704Conflicting explicit imports of the same name
OE0705Ambiguous glob imports at use site
OE0706Import conflicts with local declaration
OE0707Package is not a direct dependency

Decidability tiers (OE/OW/OI 08xx)

CodeMeaning
OI0801Non-polynomial reasoning (informational)
OE0802Variable-binding quantifier outside unsafe block
OW0803Bounded FOL rule without scope annotation
OI0804Derive-rule decidability classification
OE0805Asserted complexity contradicts classified tier
OW0806Tier-6 rule without heartbeat budget
OE0807Monotone assertion violated by non-monotone atoms
OI0808unsafe logic rule gated
OE0809Tier-6 rule outside unsafe logic block
OE0810Invalid key in @[budget] annotation
OE0811Invalid key in @[scope] annotation
OE0812Unknown complexity class
OW0813Deprecated .ol extension; rename to .ar
OW0821@[theorem] applied to a non-derive item
OW0822@[theorem] declared multiple times on the same derive
OW0823#[unproven] / #[assumed] applied to a non-test item

External format warnings (XW 08xx)

CodeMeaning
XW0841Unknown OntoUML stereotype preserved as metadata
XW0842OntoUML element name disambiguated on import
XW0843OntoUML aggregation preserved as metadata
XW0844OntoUML relation arity reduced to binary
XW0845OntoUML cardinality letter-shorthand (n/m) preserved as marker for byte-stable round-trip (Argon’s grammar fully expresses the semantics; the marker only pins the source’s lexical form)
XW0846OntoUML GeneralizationSet emitted as Argon structural block (partition / disjoint / complete)
XW0847OntoUML restrictedTo natures preserved as metadata
XW0850OntoUML class resolved against registry foundation package (informational; local declaration dropped, use <pkg>::* emitted)
XW0851OntoUML source-package collapsed to root because slug matches registry

Export / re-export (OE 09xx)

CodeMeaning
OE0901Cannot export private symbol
OE0902Cannot re-export private item
OE0903Re-export cycle detected
OE0904Implicit-head derive shadows a declared concept

Reasoning runtime (RW 00xx)

Runtime-side diagnostics emitted by the reasoning engine when atom evaluation cannot proceed.

CodeMeaning
RW0001Atom references an unbound variable
RW0002Predicate name resolves to neither a concept, registered compute, nor a derive-rule head
RW0003Atom argument type doesn’t match the resolved predicate’s declared arity / type

Perspectival composition — modules, standpoints, defeat order (OE/OW 10xx)

CodeMeaning
OE1001Cyclic standpoint dependency
OE1002Unknown defeat-ordering strategy
OE1003Unknown configuration strategy
OE1004Module references undeclared standpoint
OE1005Duplicate module name
OW1006extend block breaks conservative extension
OE1007Cross-module superiority cycle
OW1008CWA concept in OWA module
OW1009Standpoint DAG has no root
OE1010Bridge rule references private concept
OE1011Module discriminator collision
OW1012Tree-shaking excluded a required module
OE1013Unresolvable cross-module defeat target

Diagrams (OE/OW 11xx)

CodeMeaning
OE1101Unknown concept in diagram
OE1102Unknown relation in diagram
OE1103Unknown module in diagram
OE1104Concept not accessible in diagram (missing use)
OE1110Unknown filter property in diagram predicate
OE1111Type mismatch in diagram predicate
OE1112Non-enumerable property in color by
OE1120Concept not in diagram selection
OE1121Contradictory layout constraints
OE1122Concept is both included and excluded in the same diagram
OE1123Concept belongs to two named groups in the same diagram
OE1124collapse target is excluded from the diagram
OW1130Empty diagram
OE1131Unknown base diagram in from clause
OE1132Unknown named selection

Narrowing / refinement (OI 12xx)

CodeMeaning
OI1201Redundant check — already narrowed by prior atom

Query / mutation / compute (OE 14xx)

CodeMeaning
OE1401Mutation require clause contains a side-effect expression
OE1402retract pattern statically matches multiple assertions
OE1403Mutation return type does not match declared return type
OE1404Query output shape does not match return-type annotation
OE1405Construct exceeds module max_tier cap
OE1406Inline-compute body references an unresolved name
OE1407Mutation precondition evaluates to non-Bool
OE1408Invalid @[cached] placement
OE1409Query head references an unbound variable
OE1410Object literal missing required field
OE1411Object literal has unknown field
OE1412emit event type is not a sortal
OE1413Inline-compute result type does not match out { T }
OE1414let type is non-instantiable (non-sortal mixin)
OE1415List literal in non-collection-field position

Metatype (OE 15xx)

CodeMeaning
OE1501Unresolved metatype name

Inline-compute runtime (OE 17xx)

CodeMeaning
OE1700Type mismatch in compute body
OE1701Arithmetic error in compute body
OE1702Missing required compute input
OE1703Compute budget exhausted
OE1704Compute scope exceeded
OE1705Body max_tier exceeds module cap
OE1706Compute path could not be resolved
OE1707Compute variable not bound
OE1708Unknown predicate in compute body
OE1709Postcondition failed

Lifecycle (OE/OW 18xx)

CodeMeaning
OE1801Lifecycle declares transitions but has no initial phase
OE1802Lifecycle declares more than one initial phase
OW1803Lifecycle has no terminal phase
OW1804Lifecycle phase is unreachable from any initial phase
OW1805Lifecycle phase has no path to any terminal phase
OE1806Duplicate phase name in a lifecycle { … } block
OE1807Transition references an unknown phase name
OW1808Lifecycle phase data fields not yet elaborated (placeholder)

Looking up a code

$ ox explain OE0204

The full explanation includes the rule violated, a typical example that triggers it, and the canonical fix. ox explain is the authoritative surface — this appendix is a navigation aid, not a replacement.