Skip to content

Diagnostics

A graph that leaves a possible outcome with nowhere to go does not compile. E-UNWIRED-OUTPUT enforces that rule, including outputs that carry a fault. Codes starting with W-, including W-JOIN-UNPAIRED, are warnings, not refusals.

Codes identify refusals; messages explain the particular source location. The code and structured fields are stable, while message wording can change. The examples below are excerpts collected from compiler runs on test inputs or from the internal-plan diagnostic regression.

check, simulate and run all compile source first. A Parse or Check error therefore appears before simulation or physical I/O starts. The CLI prints a source span and, where relevant, the expected and found values. See Command line for exit status and invocation.

Lexing and parsing report malformed source, unavailable syntax and excessive decision nesting.

CodeWhen it firesWhat the author changesExample message excerpt
E-DISPATCH-DEPTHNested decisions exceed the Dispatch bound; also checked after parsing.Split the decision into Operators instead of adding nesting.“nested match decisions exceed the Dispatch depth budget”
E-JSON-VALUEA json! literal is not valid JSON.Correct the JSON inside the literal.“the JSON value does not read: unexpected ?”
E-LEX-CHARCharacter outside the source grammar.Remove or quote the character.“the character - is not part of the grammar”
E-LEX-UNTERMINATED-BLOCKRaw frontend block has unmatched delimiters.Balance its braces and embedded strings.“this raw block never closes”
E-LEX-UNTERMINATED-COMMENTBlock comment reaches end of file.Close the comment.“this block comment never closes”
E-LEX-UNTERMINATED-STRINGString reaches a line ending without its closing quote.Close the string or use the appropriate multiline frontend.“this string never closes before the end of the line”
E-PARSE-DEFERREDThe parser recognizes a construct that this build does not implement.Use the executable subset or omit that construct.“an experiment syntax is not implemented by this build yet”
E-PARSE-EXPECTEDA token cannot continue the current production.Follow the expected token or statement shown at the source span.“expected {, found lab”

Name resolution is included here because it happens before a plan exists. Its structured phase is resolve; the remaining rows have phase check. Independent plan validation can also surface these semantic refusals.

CodeWhen it firesWhat the author changesExample message excerpt
E-APP-COUNTThe compilation unit has zero or several App roots.Keep exactly one graph annotated App.“a deployed unit needs exactly one : App graph, found 0”
E-DUP-LAB-IDENTITYSimulation, scenario, mock or origin declarations conflict.Remove the repeated declaration or distinguish its name.“the scenario same is already declared at this level”
E-DUP-NODETwo children share a name in one Graph.Give each child its own name.“the node name o is already declared in this graph”
E-DUP-TYPETwo type declarations share a name.Keep one definition for that name.“the type T is already declared”
E-LAB-DUPMore than one logical Lab name is declared.Keep one Lab name; use simulation groups for different mock worlds.“a unit has one logical Lab; use simulations for different mock worlds”
E-NAME-CLASHA child and a Graph port share a name.Rename one declaration.“work already names a Graph port; ports and children share one namespace”
E-NAME-RESERVEDA declaration uses a reserved name, including a standard type or annotation.Choose another name; use standard types without redeclaring them.“nothing is a reserved word”
E-RESOLVE-UNKNOWNA referenced name has no declaration in scope.Declare the name or correct its spelling.“ghost names neither a Graph port nor a child Node in this Graph”
E-SIM-TARGETA simulation targets something other than the unit’s App.Omit the target or name the complete App boundary.“a simulation closes the unit’s App; sub-graph targets are a deferred capability”
CodeWhen it firesWhat the author changesExample message excerpt
E-ASSETA build-time asset cannot be read within its root and size limits.Correct the literal path, placement or asset size.“this compilation has no asset root”
E-BRACE-MIXEDA braced value mixes data members with envelope roots.Place ordinary members inside data.“this braced value mixes data fields with reserved envelope roots; wrap the data in data = { … }”
E-CHECK-DEFERREDA parsed construct has no executable lowering in this build.Use a supported value or construct; also reported during Plan.“a WebSocket Session mock is outside the executable subset of this build”
E-CONNECTOR-HANDLERA Connector contains a DSL handler.Put application decisions in an Operator; the Driver implements the Contract.“a Connector cannot own DSL handlers; its Contract and Driver events define its transitions”
E-CONNECTOR-STATEA Connector declares application-owned mutable state.Keep that state in an Operator.“a Connector’s semantic state is defined by its Contract; author private var state in an Operator”
E-CONNECTOR-UNAVAILABLEThe compiler has no executable definition for that Contract.Choose a Contract and mode listed by rastok connectors.“Timer is declared in the catalogue; its Driver is not in this build”
E-CONTENT-TYPEA content-type qualifier appears inside a nested value.Apply it to the whole payload instead.“a content type qualifies the WHOLE payload”
E-CONTRACT-ATTRA Connector attribute violates its mode’s definition.Use an allowed value and evaluation site from the Contract catalogue.“codec violates the Process sheet: expected one of [“bytes”, “jsonl”, “lines”], got utf16”
E-CONTRACT-REQUIREDA required Connector setting is missing, or a Call mock’s frames contradict its terminal.Declare the setting, or match the response status: a 204 or 205 has no body.“a 204 response has no body; remove out from this branch”
E-HANDLER-MISSINGA route delivers to an Operator input that no handler consumes.Route to an input handled by on or a join, or add its handler. A bare destination means in.“receiver.in receives deliveries but receiver has no handler for in”
E-DATA-ANNOTATIONA field annotation cannot be resolved or applied consistently.Correct its name, constant arguments, target or measurement unit.“unknown data annotation”
E-DISPATCH-POSITIONA decision or guard occurs after work or in a conflicting position.Place the decision first and combine duplicate guards.“a handler admits at most one where; combine predicates or use one match dispatch”
E-DUP-BINDINGA binding shadows a name already visible in its scope.Rename the new binding.“limit shadows an already visible binding”
E-DUP-KEYTwo literal map keys canonicalize to the same value.Keep a single entry for each canonical key.“the map key a is already present”
E-EXPRAn expression is invalid, unbound or outside the supported expression subset.Correct the expression at the reported span.“mystery is not a visible name”
E-EXTENSION-CONFLICTExtensions make incompatible demands on one owner.Separate the owners, for example a Retry Connector inside a Loop Graph.“Loop and Retry on the same owner are not admitted; put the Retry Connector inside a Loop Graph”
E-GRAPH-CYCLEStatic wiring contains a cycle.Keep wiring acyclic and express bounded recurrence with an Extension.“the wiring cycles through a; edges form a DAG”
E-GRAPH-HANDLERA Graph contains application handler code.Move the handler to an Operator child and wire it.“a Graph cannot own application handlers; move the handler into an Operator child and wire its ports”
E-GRAPH-STATEA Graph declares private mutable state.Move the state and transitions to an Operator.“a Graph is a scope and cannot declare private var state; move the state and its handlers into an Operator child”
E-HANDLER-DUPLICATEAn Operator repeats a handler for one trigger.Combine its alternatives in one match.“an Operator has exactly one handler for each trigger; put the alternatives in one match”
E-INSTANCEInstance keys, lifetime or closing settings do not satisfy their contract.Correct the reported setting and supply bounded closing where required.“closable owner shell contains outbound Connector shell and therefore requires closing = { drain_for = <duration>; settle_for = <duration> }”
E-INSTANCE-COMMANDAn instance closure command is used in an invalid routing position.Use it only as a permitted final destination in its owning context.“an instance closure command is a destination, never a source port or an intermediate endpoint”
E-LIFETIME-REQUIREDA Graph, Operator or Connector has a key but no authored lifetime.Choose when its instances close, or write lifetime = { kind = persistent } to retain them.“decide declares instance.key and no lifetime”
E-LOOPA Loop setting or finitude condition is invalid.Supply a positive fuel bound or a provably decreasing measure.“a + Loop Executor requires positive Loop.fuel or a Loop.measure that can be proved finite”
E-LOOP-CARDINALITYRepeated frames could produce several verdicts for one application.Derive the verdict from a once-per-application terminal.“this Contract may produce several frames on the port; a Loop application needs exactly one verdict”
E-LOOP-CONTROLThe checker cannot prove one verdict for every application path.Follow the marked arm: declare its terminal output or select one verdict, not both. Call-hosted Loops also require finite timeouts.“this arm of Loop count selects two verdicts: the terminal output out and Loop.next”
E-LOOP-ENTRYNo unique recurrent input can be selected.Declare the input and Loop.entry consistently.“Loop needs one recurrent Graph input; declare Loop.entry = <input>”
E-LOOP-HOSTThe host cannot provide a finite Loop application.Use an Operator, admissible Graph or finite outbound Call.“Loop requires an Operator or a resolved outbound Call Contract with closed frame and terminal guarantees”
E-LOOP-TERMINALThe selected terminal ports are ambiguous or incompatible.Correct the host terminal declaration; Call terminals come from their Contract.“every Loop.terminal item must name one output port”
E-MATCH-DUPLICATEOne source has more than one closed route match.Combine them into one route match.“a source may have at most one closed route match”
E-MATCH-NONEXHAUSTIVEA possible case has no arm, or an ordered match lacks a fallback.Cover the remaining cases or add the required fallback.“an open match requires a final _ fallback”
E-MATCH-NOT-CLOSEDA closed match scrutinizes an open or unsupported type.Match a closed union, enum or bool, or use ordered predicates.“route match requires a pinned tagged union, enum, or bool source”
E-MATCH-OVERLAPTwo closed match arms cover the same case.Assign each case to one arm.“route case true appears in two arms”
E-META-PREFIXOne application metadata key is a prefix of another.Choose keys that are consistently leaves.“meta.app.audit is a leaf and meta.app.audit.origin makes it a branch”
E-META-SYS-READONLYA write targets metadata owned by execution.Write application metadata under meta.app instead.“meta.sys is read-only and runtime-owned; it is never an lvalue”
E-META-TYPEWrites to one application metadata field disagree on its type.Use one type or separate fields.“meta.app.x is written as int and as string: one field, one type”
E-META-ZONEThe field is not in the zone’s vocabulary, or an incoming route does not write the required application field.Use a declared leaf. Write it on the named route, or use meta.app.?field to handle its absence.“a metadata zone is not a value”
E-MULTI-EMIT-ARITYThe output tuple and value tuple have different lengths.Provide one value per output or use broadcast syntax.“this atomic multi-emission has 3 targets but 2 tuple values”
E-MULTI-EMIT-DUPLICATEAn atomic emission lists the same output twice.Name each output once.“output left appears twice in one atomic multi-emission”
E-NODE-ANNOTATIONA Node’s Contract and Extension annotation is invalid.Declare the Contract and compatible Extensions in the required order.“a Connector requires its exact Contract first, before every Extension”
E-PORT-CONFLICTA port is redeclared or inferred with incompatible roles.Give the port one declaration and direction.“in is already an input port of the graph; it cannot also be an output”
E-PORT-DIRECTIONA port is used as a source, destination or emission against its direction.Reverse the wiring or select the appropriate port.“chan is an input port; an emission targets an output port”
E-PORT-TYPEA destination cannot accept the inferred value.Match the named types and their differing fields, or narrow the value without an implicit lossy conversion.“this route connects Draft to Review; pinned ends must agree: Review has no field hash, and Draft has no field reviewer”
E-PORT-UNKNOWNA Node has no port with the referenced name.Use a declared port from that Node or Contract.“o exposes no port named mystery”
E-RETRYA Retry setting is missing, repeated, misplaced or invalid.Supply the required policy with positive bounds and valid settings.“Retry.attempts must be a positive integer, first attempt included”
E-RETRY-CASESRetry.on does not select distinct declared terminal cases.Use case names from the Contract’s exit union, once each.“SpawnFailed appears twice in Retry.on”
E-RETRY-EFFECTA selected retry case requires a repetition guarantee that is absent.Select a before_effect case or declare a justified idempotence guarantee.“Retry after TimeoutExpired (outcome_unknown) requires idempotent = true”
E-RETRY-HOSTRetry is attached to something other than a supported outbound Call.Put the policy on the outbound Call Connector.“Retry requires an outbound Call Connector”
E-ROUTE-DUPLICATERouting selects the same destination twice for one case.Remove the duplicate route, including equivalent shorthand.“destination sink.in is selected twice for the same source case”
E-ROUTE-MIXEDOne case is routed both to nothing and to a destination.Choose discard or delivery for that case.“nothing cannot coexist with a real destination for the same source case”
E-TYPE-BUDGETType expansion exceeds a nesting, node, width or alias bound.Reduce the dimension reported in the diagnostic.“the type Deep nests 129 levels deep”
E-TYPE-DUPA field or symbol is repeated inside one type.Remove or rename the duplicate member.“the struct field x is declared twice”
E-TYPE-INVALIDA type constructor violates its invariants, or a JSON input receives a known type without a JSON form.Correct the type, or explicitly convert the named field before sending it.“array<int> is not a canonical map-key type”
E-TYPE-RECURSIVEA named type expands back to itself.Use a finite nonrecursive type.“the type Node does not expand: Node reaches itself”
E-TYPE-UNRESOLVEDAn inference constraint reaches a position needing a closed type.Supply a concrete type or enough contextual constraints.“an open struct is an inference constraint, not an effective type”
E-UNION-OVERLAPStructural-union branches overlap in the values they accept.Use disjoint branches or a tagged union.“structural-union branches int and long overlap”
E-UNWIRED-OUTPUTA possible output or case has no explicit disposition.Wire it to a destination or deliberately discard it with nothing.“o.side can be produced but has no destination; route it or write o.side -> nothing”
E-WIRING-MIGRATIONWiring uses a removed spelling or continues after a command.Use current port paths, match routing and final command destinations.“edge when was removed; route a closed value with -> match { ... } or decide in an Operator”
CodeWhen it firesWhat the author changesExample message excerpt
W-EMPTY-INSTANCEA keyed persistent Operator can take a branch from its initial state that writes no state and does not stop. A join is checked when it fires. Without a deadline, the empty instance never closes on its own.Give the instance a delay with idle, age, or slot. Use stop only if that branch ends its work.“dossier can open an instance that retains nothing on note”
CodeWhen it firesWhat the author changesExample message excerpt
W-MATCH-CATCHALLA wildcard on a finite outbound Call’s terminal, or in the first handler receiving it, accepts a lost-answer case that no arm names.Name each listed case, grouped or separately, even when its destination stays the same.“the answer may have been lost while the operation succeeded”

The warning points to the written _. The source field names the terminal, owner names the Connector or receiving Operator, and case lists the unnamed cases. Check still succeeds. See When the answer is lost.

CodeWhen it firesWhat the author changesExample message excerpt
W-JOIN-UNPAIREDA presence join receives frames and a terminal from one Call, but their counts do not pair for every terminal case.Route every terminal accompanying a frame to the join, or key its Operator by the Call and bound the join with within or last.“ServerError delivers 1 to pair.body, 0 to pair.exit; a lone delivery can pair with another Call”

The fields name the joining node, the source connector, its frame port and the terminal case. For a zero-or-more frame port, case = "all" means the warning is independent of one terminal case, not that every run fails. A bound without an instance key does not separate Calls. The warning does not change execution or make a failed scenario pass.

E-PLAN-DEPTH also occurs at Check when an expression exceeds its 128-level bound, measured on the resolved tree with compiler-added conversions included. Plan checks the combined serialized representation against the reader’s separate 256-level bound, with the root at level zero.

CodeWhen it firesWhat the author changesExample message excerpt
E-INTERNAL-PLANCompiler output fails independent plan validation.Report the source and diagnostic as a compiler defect.“the lowering emitted an invalid plan”
E-PLAN-DEPTHThe complete serialized plan exceeds the reader’s bound; expressions also have a smaller Check bound.Reduce combined nesting; the message identifies the boundary.“the serialized plan reaches level 256; the format requires a level below 256 (root is level 0)”

The internal-plan case is a compiler defect, not an invitation to weaken a type or discard an outcome. Its message is exercised by compiler::tests::the_internal_plan_diagnostic_carries_its_registered_payload.

The current runner reports failed scenarios, missing observations and golden differences as scenario results, not as additional structured E-… codes. For a golden mismatch it names the scenario, record, expected and obtained values, and cause. Correct the graph or the scenario; save a new trace only after reviewing the intended change. See The Lab and Echo.

A TimeoutExpired, JoinExpired or LoopExpired value is a typed outcome that the graph routes. It is not a compiler diagnostic.

Deployment refusals, unavailable physical Drivers and recording/replay errors currently use contextual command errors, without a separate registry of emitted E-… codes. Use the reported Connector path, missing binding or format mismatch to correct the deployment or select the matching artifact. Command usage errors go to stderr with status 2; compilation and execution errors return a nonzero status. See Command line.

Source registry: docs/spec/diagnostics.md, “Registry”.

CodeStatus in this buildSpecification
E-SAGA-DURABILITYSaga durability checking is a deferred tool surface.docs/spec/diagnostics.md, Registry
E-COMPENSATE-KEYCompensation-key checking is deferred with Saga.docs/spec/diagnostics.md, Registry
E-REPLAY-VERSION-MISMATCHReplay checks compatibility, but does not emit this structured code.docs/spec/identity.md
E-LOOP-CONTEXTThe name occurs in an execution refusal, not a structured compiler diagnostic.docs/spec/loop.md
E-DUP-EDGESuperseded by E-ROUTE-DUPLICATE; the route check reports duplicate destinations. This code is not emitted.docs/spec/envelope.md

Diagram