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

Diagnostics

Strata diagnostics are intended to reject invalid source close to the layer that can explain it. Parser errors describe source shape. Checker errors describe semantic rules. Runtime errors describe validated execution failures.

Reading A Diagnostic

Run:

just strata-check examples/hello.str

If checking fails, fix the first reported error first. Later errors may be a result of the first invalid shape.

Common Artifact And Runtime Errors

Diagnostic ContainsLikely CauseFix
unsupported artifact schema versionThe .mta does not use the single schema version admitted by this Mantle build.Rebuild the source with the current strata build command.
target requirements source_language ... does not match artifact source_languageA malformed artifact declares conflicting source-language metadata.Rebuild the artifact; do not edit .mta target requirement fields by hand.
artifact field source_language must be an identifierA malformed artifact has invalid source-language metadata.Rebuild the artifact; Mantle treats source language as opaque artifact metadata and does not dispatch on source names.
target requirements do not declare required runtime feature ...The artifact uses a typed runtime construct that is missing from its target-requirement block.Rebuild the artifact from checked source; Mantle derives required features from decoded .mta tables and fails closed on underdeclared requirements.
target runtime feature ... is not supported by this Mantle runtimeThe artifact requires a runtime feature outside the current Mantle declaration, such as remote spawn/send or distributed transport.Use only currently implemented local runtime features or run on a Mantle runtime that declares the required feature.
target requirement runtime features must be sorted / duplicate target requirement runtime featureA malformed artifact target-requirement block is not canonical.Rebuild the artifact from checked source; Mantle fails closed on malformed requirement fields.
missing --max-runtime-processes value / invalid --max-runtime-processes value / --max-runtime-processes must be greater than zeromantle run received a missing, non-integer, overflowed, or zero runtime process limit.Pass a positive integer, for example mantle run target/strata/effect_outcome_spawn_exhausted.mta --max-runtime-processes 1.
local spawn backend unavailableA local process-creation path ran while the local spawn backend is disabled for this Mantle run, such as bare spawn or lexical supervisor child startup.Use outcome-form let result: Result<ProcessRef<T>,SpawnError<Unit>> = spawn T; when source should handle Err(BackendUnavailable(Unit)); supervisor child startup and bare spawn fail closed, or run without --disable-local-spawn-backend.
field "schema_version_major" must be schema version ... / field "schema_version_minor" must be schema version ...A .component-composition.json artifact uses a schema version this Strata build does not admit.Rebuild the artifact with just strata-composition-build <path.str> and avoid hand-editing schema fields.
component composition artifact admission rejectedstrata composition admit validated a well-formed artifact whose global admission result is rejected.Treat the artifact as failed checked-subset validation evidence; rebuild from checked source or inspect the rejection fields before retrying the gate.
admitted component composition artifact has unsatisfied_imports / both bound and unsatisfiedA composition artifact was edited or generated inconsistently: it claims global admission while carrying unsatisfied imports, or it marks one declared import as both bound and unsatisfied.Rebuild from checked source, or emit a rejected artifact with each unbound declared import listed once as unsatisfied evidence.
omits binding or unsatisfied-import evidenceA composition artifact declares a component import but does not include either one binding or one unsatisfied-import entry for it.Rebuild from checked source; admitted artifacts must bind every declared import exactly once, while rejected artifacts must explain unbound imports explicitly.
more than onceA composition artifact duplicates binding or unsatisfied-import evidence for the same importer instance and imported port.Keep exactly one binding for each admitted declared import, or exactly one unsatisfied-import entry for each rejected unbound import.
references unknown component instance id / must reference typed idA composition artifact binding, authority descriptor, or authority-flow edge uses a missing, non-canonical, or internally inconsistent typed reference.Rebuild from checked source; source names are metadata only and cannot replace typed component-instance, port-binding, port, protocol, or authority IDs.
runtime composition binding requires an admitted checked composition artifactstrata composition bind-runtime was asked to bind rejected or non-admitted checked composition evidence to a .mta.Rebuild from checked source, run strata composition admit, and bind only globally admitted checked composition evidence.
runtime composition binding source fingerprint does not match artifact source hash / mantle_artifact_source_hash_fnv1a64A runtime binding or checked composition artifact does not match the .mta it is being bound to or run with.Rebuild the .mta, .component-composition.json, and .deployment-composition.json from the same checked source; do not hand-edit identity fields.
field "schema_id" must be "mantle.runtime_composition_binding" / composition_schema_id / source_fingerprint_algorithm / artifact_kind / deployment_id / admission_resultMantle received a malformed or wrong-kind deployment-composition binding.Supply the output from strata composition bind-runtime; .component-composition.json is not Mantle runtime input.
component_instance_id ... is duplicated / process_id ... is duplicated / port_binding_id ... does not match runtime artifactA runtime binding tries to forge, duplicate, or retarget typed composition-to-process correlation.Rebuild the binding from the admitted checked composition artifact and matching .mta; Mantle validates typed IDs before execution.
runtime trace component_instance_id requires a process-scoped eventTrace evidence attached component-instance correlation to an event without one primary process_id.Regenerate the trace from Mantle; deployment and composition IDs can appear on artifact-level events, but component-instance IDs are only process-scoped observability fields.
runtime trace deployment_id must be 0Trace evidence uses a deployment namespace outside the current singleton runtime binding schema.Regenerate the trace from Mantle; v1 runtime composition bindings use deployment_id=0 only.
component_instance_id ... is outside runtime trace composition component table / component_instance_id ... is already correlated with process_idBound trace evidence claims an impossible component-instance/process correlation for the loaded process table.Regenerate the trace from Mantle with the matching .deployment-composition.json; each bound process maps to exactly one checked component instance and each component instance maps to one process.
runtime trace composition context changed after artifact_loaded / component_instance_id changed for process_id / omitted established component_instance_idTrace evidence changed or dropped composition correlation after Mantle established an admitted runtime binding context.Regenerate the trace from Mantle; deployment/composition IDs are stable for the whole bound run and component-instance IDs are stable for each mapped process.
missing --composition-binding value / duplicate --composition-bindingmantle run received an incomplete or conflicting composition binding flag.Pass at most one explicit binding path, for example mantle run target/strata/component_composition_main.mta --composition-binding target/strata/component_composition_main.deployment-composition.json.
authority/effect artifact admission rejected / field "policy_inputs" is not implemented / references unknown message id / references unknown state id / references unknown protocol id / references unknown port id / references unknown component id / references unknown supervisor id / does not match spawn_site_id / component_import_port_count ... does not match declared countstrata authority-effects admit validated a malformed or unsupported checked authority/effect fact artifact.Rebuild with strata authority-effects build <path.str>; unsupported future policy sections must stay empty until admitted, transition IDs must reference declared per-process state/message facts, lexical supervisor-child spawn sites must match checked supervisor-child proof facts, authority descriptors must reference the artifact’s declared protocol/port/component table counts, and component import-authority lists must match their declared import_port_count.
authority policy artifact / decision count ... does not match checked authority count / descriptor does not match checked authority/effect facts / unsupported authority policy decision / unknown field "process"strata authority-effects policy admit validated a malformed, stale, spoofed, or non-closed typed policy decision artifact.Rebuild with strata authority-effects policy build <authority-effect.json>; every checked process authority must have exactly one typed decision, descriptors must match, and source labels/debug names cannot authorize behavior.
runtime authority/effect binding source fingerprint does not match artifact source hash / mantle_artifact_source_hash_fnv1a64A checked authority/effect artifact, typed authority policy artifact, or runtime binding does not match the .mta it is being bound to or run with.Rebuild the .mta, .authority-effect.json, .authority-policy.json, and .authority-effect-binding.json from the same checked source; do not hand-edit identity fields.
descriptor does not match runtime artifact / spawn_site_id ... does not match runtime artifact / transition_id ... effects do not match runtime artifactA runtime authority/effect binding tries to forge, widen, strip, or retarget typed authority, spawn-site, or exact-effect facts.Rebuild the binding from the admitted .authority-effect.json and matching .mta; Mantle validates typed IDs and descriptors before execution.
field "schema_id" must be "mantle.runtime_authority_effect_binding" / authority_effect_schema_id / authority_policy_schema_id / policy_decisionsMantle received a malformed, wrong-kind, unsupported-version, or unsupported-policy authority/effect binding.Supply the output from strata authority-effects bind-runtime; raw .authority-effect.json and .authority-policy.json files are not Mantle runtime input.
missing --authority-effect-binding value / duplicate --authority-effect-bindingmantle run received an incomplete or conflicting authority/effect binding flag.Pass at most one explicit binding path, for example mantle run target/strata/effect_outcome_spawn_denied.mta --authority-effect-binding target/strata/effect_outcome_spawn_denied.authority-effect-binding.json.
--deny-spawn-authority cannot be combined with --authority-effect-bindingmantle run was given both a direct runtime spawn-denial flag and an authority/effect binding policy.Encode the policy in .authority-policy.json with strata authority-effects policy build --deny-spawn-authority, bind it with strata authority-effects bind-runtime, then pass only --authority-effect-binding to Mantle.
boundary send authority deniedA typed authority policy denied the process-local port_connect authority used for a boundary send.Admit a policy with an admit decision for that typed process/authority ID, or change the source authority/effect facts and rebuild all artifacts.

Common Source Errors

Diagnostic ContainsLikely CauseFix
expected protocol, port, component, composition, record, enum, function, or proc declarationA top-level item is not accepted.Use protocol, port, component, composition, record, enum, fn, or proc after module and any imports.
imports must appear before top-level declarationsAn import appears after a record, enum, function, or process declaration.Move all import module_name; declarations immediately after module name;.
imports require checking from a root source pathA source string with imports was passed to the single-source checker.Run strata check <root.str> or use the source-program API so imports can be resolved.
source ... could not be resolvedAn imported sibling .str file is missing or cannot be read.Add the imported module_name.str file next to the importing source unit or fix the import name.
source path ... is not a regular fileA root source or imported source path is a directory, symlink, FIFO, or other non-regular file.Use a regular .str file for each source unit.
resolved outside source directoryAn import resolved through a symlink or filesystem indirection outside the importing source unit’s directory.Keep imported source units as regular sibling .str files.
source loading is unsupported on this targetSource loading was requested on a target without secure source file identity support.Use a Unix-family target or Windows for source loading.
artifact I/O requires secure file identity supportMantle artifact read/write was requested on a target without secure path identity support.Use a Unix-family target or Windows for artifact IO.
import cycle ... is not supportedSource units import each other cyclically.Break the cycle; this surface only accepts an acyclic dependency graph.
duplicate module identity ...Two reachable source units declare the same module name.Give each reachable source unit a unique module identity.
ambiguous imported ... name ...Reachable source units declare the same unqualified type, function, process, protocol, port, component, or cross-unit callable name.Rename one declaration; aliases, re-exports, and qualified references are not part of this surface.
references ... without importing ...A source unit uses a type, enum variant, pure function, process, protocol, port, component, or composition edge from another reachable source unit without directly importing that unit.Add an explicit import module_name; to the source unit that uses the declaration.
composition ... instance ... component ... import port ... is not boundA component instance imports a port that no composition binding satisfies.Add one bind importer imports Port -> exporter exports Port; edge for that instance import.
composition ... binds instance ... imported port ... more than onceA composition tries to bind the same imported port on one instance more than once.Keep exactly one binding per imported (instance, port) pair.
composition ... cannot bind imported port ... to exported port ... because their protocols differA composition edge connects ports that do not share one protocol.Bind the import to a component export whose port uses the same protocol.
composition ... cannot bind imported port ... to exported port ... because their port authorities differA composition edge would connect distinct Cap<PortConnect<...>> authority descriptors.Bind the import to the exact exported port authority it requires; source composition does not widen port authority descriptors.
composition ... instance ... component ... does not import port ...A binding names an imported port that is not declared by the importing component.Add the port to that component’s imports list or bind the correct imported port.
composition ... instance ... component ... does not export port ...A binding names an exported port that is not exported by the exporting component.Bind to the component’s declared export port.
entry process Main is not declaredThe program has no Main process.Add proc Main ....
root source unit ... must declare entry process MainThe loaded root source unit imports a module that may contain Main, but the root itself does not declare the entry process.Declare proc Main ... in the root source file passed to strata check or strata build.
type name ... is reservedA source record or enum tries to use a built-in transition, capability, collection, primitive such as String or Bytes, outcome, or scalar type name.Rename the source type.
uses reserved prefix __strata_checked_A source type name collides with internal checked type metadata.Rename the source type without the reserved prefix.
checked type_count exceeds Mantle artifact limitThe checked program needs more distinct artifact types than the Mantle artifact limit allows.Reduce the number of distinct state, message, payload, and process-reference types.
process ... must declare type StateA process is missing its state alias.Add type State = StateType;.
process ... must declare type MsgA process is missing its message alias.Add type Msg = MessageEnum;.
init must declare no parametersinit has parameters.Use fn init() -> StateType ....
init body must not perform statementsinit uses emit, spawn, or send.Return only the initial state.
match scrutinee ... fieldless enum variantAn init whole-body match or init return match tries to match a non-constructor name or a payload-bearing constructor.Match one fieldless enum constructor in init.
init return match ...An init return match is non-exhaustive, overlaps an earlier arm, has an unreachable wildcard, or nests another return match in an arm.Cover each variant once or use one reachable _, and return one whole state value from each arm.
init return match arm cannot use payload binding ... in returned stateAn init return match arm tries to materialize an arm payload binding into the initial state.Return a whole state value that does not depend on match-arm payload bindings.
step must declare state parameter and message patternstep has the wrong parameter count.Use state: StateType, MessageConstructor or state: StateType, _.
step second parameter must be a message constructor pattern or wildcard patternThe second step parameter is a typed binding instead of a message pattern.Replace msg: MsgType with a message constructor or _, or use a whole-body match msg.
step returns ..., expected ProcResult<...>step return type is wrong.Return ProcResult<StateType>.
step return match scrutinee ... must be a concrete enum source value bindingA step return match tries to match state, a non-enum value, or a value that is not an immutable source binding.Match a transition-local enum payload or state-payload binding whose concrete value is already proven by the checker, or use whole-body match msg / match state.
step return match scrutinee ... requires a discovered concrete message payload caseA step return match tries to match a message payload binding from an unguarded transition.Use a payload-sensitive pattern that lowers to exact discovered payload guards, or move the dispatch to whole-body match msg.
step return match arm cannot bind process reference ...A step return match arm tries to acquire arm-local authority with spawn.Bind process references before return match; selected arm prefixes may use emit, in-scope direct send, statement-level runtime if, and bounded runtime for actions.
step return match arm cannot perform final-position runtime ifA step return match arm tries to use terminal runtime branching.Move runtime branching outside the return-match arm, or split the behavior into explicit step clauses / whole-body dispatch.
step return match arm nested return match is not supportedA step return match arm tries to nest another return match.Keep the selected arm as typed action statements followed by one terminal Continue(...), Stop(...), or Panic(...).
step return match arm must return Stop..., Continue..., or Panic...A step return match arm returns a bare state value or another unsupported result form.Return one whole state value inside Continue(...), Stop(...), or Panic(...) from every arm.
step body must return Stop..., Continue..., or Panic...A step returns a bare state value or an unsupported result form.Return one whole state value inside Continue(...), Stop(...), or Panic(...).
step may-behaviors must be emptyThe ~ [...] list is not empty.Use ~ [].
step must be deterministicstep uses @nondet.Use @det.
uses effect ... but does not declare itThe body performs emit, spawn, or send without matching effect usage.Add the exact used effect to ! [...] or remove the statement.
declares effect ... but does not use itThe effect list is wider than the body.Remove the unused effect.
declares duplicate effectThe effect list repeats one effect.Keep each effect at most once.
send outcome binding must have type Result<Unit,SendError<...>>A local send outcome annotation does not preserve the target process message type.Annotate the binding as Result<Unit,SendError<TargetMsg>>.
spawn outcome binding must have type Result<ProcessRef<...>,SpawnError<Unit>>A local spawn outcome annotation does not return the committed process reference on success.Annotate the binding as Result<ProcessRef<TargetProcess>,SpawnError<Unit>>.
effect outcome binding ... conflicts with ...An outcome binding reuses a step state parameter, process reference, process declaration, or source value name.Give the immutable outcome a fresh step-local name.
effect outcome binding ... is used before it is boundA statement references an outcome before the outcome let statement.Move the outcome binding before the first use.
effect outcome binding ... must appear before ordinary effect statementsA later outcome binding would be executed before an earlier non-prefix effect at runtime.Bind local effect outcomes before ordinary emit, send, if, or for statements. A top-level process-reference spawn may stay in the pre-state prefix so later outcome sends can target it.
effect outcome binding ... cannot be used as a next-state value because type ... has non-finite payload valuesA next state tries to store an outcome whose possible payload values cannot be finitely admitted into the process state table.Store only finite outcome value shapes in state, or handle the effect without placing that outcome in state.
effect outcome binding ... would expand next-state candidates to ...Multiple finite outcome bindings would exceed the admitted process state-value limit.Store fewer independent outcome fields, branch before storing, or keep the outcome outside process state.
effect outcome id ... appears after ordinary effectsA Mantle artifact tries to bind an effect outcome after an ordinary effect boundary.Emit outcome actions in the pre-state prefix before ordinary effects.
process reference outcome must remain step-localA Mantle artifact or loaded runtime template tries to use a process-reference-carrying outcome as ordinary state or payload data.Branch on a typed built-in outcome variant, or keep the process reference as step-local authority.
for loop collection must be an identifier bindingA runtime for loop tries to iterate a literal or computed value.Iterate an immutable runtime collection binding such as a typed message payload binding.
for loop collection ... must have type List<T,N>A runtime for loop source is not a typed list collection.Use a binding whose type is List<Element,N>.
for loop collection must be a runtime list bindingA for loop source is static source data rather than runtime data.Pass the list as a typed runtime payload or state-derived runtime binding.
for loop element binding ... cannot have process reference typeA runtime for loop tries to iterate process-reference values as ordinary loop data.Keep ProcessRef<T> as direct message authority and do not place it in loop collections.
for loop record pattern ... cannot match ...A runtime loop record pattern names the wrong record type or tries to destructure a non-record element.Match the actual record element type, or use a plain immutable loop element binding.
record pattern ... must bind at least one fieldA source record pattern, including a loop-element record pattern, has no fields.Bind at least one immutable field or use a plain immutable binding.
for loop record pattern ... binds field ... more than onceA runtime loop record pattern repeats one record field.Bind each projected field at most once.
for loop record pattern ... has no field ...A runtime loop record pattern names a field outside the loop element record.Bind a declared field from the record element.
loop element binding ... is declared more than onceA loop-element record pattern maps multiple fields to the same local binding.Use one distinct immutable binding name per projected field.
loop element binding ... cannot have process reference typeA loop-element record pattern projects a ProcessRef<T> field as ordinary data.Keep process references out of records, lists, maps, state, and projected loop data.
loop element binding ... conflicts ...A loop element or projected field binding reuses a reserved name, source binding, process reference, process declaration, type, or constructor.Choose a distinct immutable binding name for the loop body.
for loop body cannot bind process referenceA loop body tries to create new authority with spawn.Bind process references before the loop and keep the loop body to checked linear effects.
nested for loops are not supportedA loop body contains another loop.Flatten the runtime payload shape or split the behavior into separate steps.
assignment statements are not supportedSource code uses assignment-style mutation.Bind immutable values through declarations or return a whole replacement state value.
statement-level if branches must not returnAn effect-only runtime branch tries to terminate the step.Put the final return after the statement-level branch, or use final-position runtime if when each branch must return.
statement-level if branches cannot bind local values or process referencesA runtime branch tries to introduce branch-local source computation or authority.Use source-local bindings only in pure source functions, bind process references before the branch, and keep runtime branches to checked branch effects.
statement-level if action nesting exceeds maximum depthDirect statement-level runtime branch nesting goes beyond the single supported nested layer.Keep direct branch actions to an outer branch plus one nested branch.
statement-level if branches cannot both be emptyA statement-level runtime branch has no actions on either side.Put an action, such as emit, send, or a bounded for loop, in one branch. Omitted else and explicit else {} are allowed only when the other branch has work.
runtime if branch cannot bind process referencesA checked runtime branch tries to introduce branch-local authority.Bind process references before the branch and keep branch bodies to declared effects.
runtime if action nesting exceeds maximum depthA checked runtime branch action exceeds the direct nesting bound.Keep runtime branch actions to an outer branch plus one nested branch.
next_state runtime if nesting exceeds maximum depthSource, checked IR, artifact admission, or loaded-runtime admission sees a third terminal runtime branch.Keep terminal next-state runtime branching to an outer final-position branch plus one direct nested final-position branch.
runtime if action branches cannot both be emptyA decoded or constructed artifact tries to validate a runtime branch action with no actions in either branch.Keep no-op branches explicit in the typed artifact, but ensure the sibling branch has at least one action.

Source Function Errors

Diagnostic ContainsLikely CauseFix
function ... conflicts with a declared type or value constructorA source function name collides with a type or enum constructor.Choose a distinct function name.
function ... must declare exactly one parameterA normal source function uses an arity outside the current buildable call form.Use one typed binding parameter or one pattern parameter clause.
function ... must use a declared record, enum, scalar, primitive, list, or map type without process-reference authorityA source function parameter or return type names something outside the source value type set, including an enum that carries ProcessRef<T> authority.Use String, Bytes, a declared record or enum type, a scalar integer type, or List<T,N> / Map<K,V,N> over source value types that do not contain process references.
function ... must not declare effects / function ... must not perform statementsA normal source function tries to perform runtime behavior.Keep normal functions pure; perform emit, spawn, and send only in step.
function ... may-behaviors must be empty / function ... must be deterministicA normal source function is not in the deterministic buildable subset.Use ~ [] @det.
source function parameter ... conflicts ...A source function binding parameter reuses a process-reference binding, type, constructor, process, or source function name.Choose a distinct immutable parameter name.
source-local binding ... conflicts ...A pure source function binding reuses a parameter, pattern binding, prior local binding, process-reference binding, type, constructor, process, or source function name.Choose a distinct immutable binding name.
function ... source-local binding ... must use a declared record, enum, scalar, primitive, list, or map type without process-reference authorityA source-local binding annotation is not a source value type, such as ProcessRef<T>, an enum that carries ProcessRef<T>, or an unknown type.Bind only String, Bytes, records, enums, scalar integer types, List<T,N>, or Map<K,V,N> over source value types that do not contain process references.
source-local binding ... value must produce ...A source-local binding right-hand side is unknown, impure, or does not match the annotated type.Use a pure source value expression with the exact annotated source value type.
function ... is not declaredA value expression calls an unknown function.Declare a module function or process-local function with that name.
function ... returns ..., expected ...The function return type does not match the value position where it is called.Call a function returning the expected type or change the annotation.
source function call cycle ... is not supportedSource function calls are recursive, but pure functions are expanded before lowering and have no recursion model.Remove the cycle; pass whole values through non-recursive functions.
... conflicts with core Bool type / ... conflicts with core Bool value constructorA user declaration tries to define Bool, True, or False, which are Strata core built-ins.Rename the user declaration; Bool, True, and False are always available and cannot be redeclared.
payload-bearing variant ... collides with reserved primitive value labelAn enum constructor with a payload is named String or Bytes, which would collide with canonical Mantle primitive data labels such as String(7265616479).Rename the payload-bearing enum constructor so primitive artifact values remain unambiguous typed data.
if condition must have type BoolA source conditional condition resolves to a non-Bool source value.Return or pass the core True or False value, or produce Bool through equality, scalar ordering, or Boolean predicate composition.
if then branch must produce ... / if else branch must produce ...A conditional branch does not match the expected source value type.Return the same source value type from both branches.
if branches are pure value expressions and must not perform statementsA conditional branch contains emit, let, send, or return.Keep branch bodies to one source value expression and move effects to supported step forms.
source function ... return-if ... branch must not perform statementsA braced source-function return branch tries to perform emit, send, spawn, a runtime loop, or another runtime statement before returning.Keep source functions pure; use only immutable source-local bindings before the terminal pure return.
equality operands must have the same typeA == or != expression compares values of different checked types.Compare two Bool values, two String values, two Bytes values, two scalar values of the same integer type, or two fieldless values from the same enum.
equality operands must be Bool, String, Bytes, scalar values, or fieldless enum valuesA == or != operand is outside the equality surface.Use Bool, matching String or Bytes values, matching scalar integer values, or a payload-free enum value; records, lists, maps, process references, and payload-bearing enum values are not equality operands.
String literal exceeds maximum primitive data length / Bytes literal exceeds maximum primitive data lengthA primitive literal would exceed the bounded source/artifact data budget for one immutable value.Keep literal data within the primitive data limit or model larger data outside the current source contract surface.
unsupported string escape / unicode string escape ...A string literal uses a non-canonical or malformed escape sequence.Use \", \\, \n, \r, \t, or \u{HEX} with a valid Unicode scalar value.
unsupported bytes escape / bytes escape ... must use two hex digits / bytes literal raw data must be printable ASCII or escapedA bytes literal uses non-byte Unicode data or a malformed byte escape.Use printable ASCII bytes or canonical escapes such as \x00 through \xff.
numeric value literals require an explicit scalar suffix / unsupported scalar literal suffix ...A numeric value expression is unsuffixed or uses a suffix outside the admitted scalar set.Use suffixes such as _u32 or _i64; mailbox bounds and collection capacities remain unsuffixed syntax.
scalar literal ... is outside ... rangeA scalar literal cannot fit in its declared fixed-width integer type.Use a value in range or choose a wider explicit scalar type.
scalar operands must have the same type / scalar literal ... has type ..., expected ...A scalar operator mixes widths or signedness.Use matching scalar types; explicit casts and inference are not part of the buildable surface.
scalar arithmetic result ... is outside ... rangeConcrete scalar arithmetic overflows or underflows the target type.Keep the computation in range or choose a wider explicit scalar type.
scalar division by zero / scalar modulo by zeroA concrete or runtime scalar operation divides or takes modulo by zero.Guard the zero case before the operation or use a non-zero divisor.
process-reference equality is not supportedA == or != expression compares process-reference authority.Keep process references as explicit authority handles; do not branch on reference identity.
list and map equality are not supportedA == or != expression tries to compare a collection type.Compare a core Bool or payload-free enum predicate instead.
record equality is not supportedA == or != expression tries to compare a record value.Compare a core Bool or payload-free enum predicate instead.
equality type ... must not declare payload-bearing enum variantsA == or != expression targets payload data instead of a safe built-in outcome variant pattern.Use a payload-free enum, compare a safe pattern such as Ok(Unit) or Err(Exhausted(Unit)), or use an explicit function/match shape rather than payload equality.
requires one operand to be a safe built-in variant patternA == or != expression compares two runtime-dependent Option, Result, SendError, or SpawnError values directly.Compare the runtime value against a safe variant pattern such as Ok(Unit), None, or Err(Full(Work)); do not compare two payload-carrying runtime values structurally.
boolean ! operand must produce BoolA ! predicate operand resolves to a non-Bool value.Apply ! only to Bool, typed equality, scalar ordering, or nested Boolean predicate expressions.
left operand of && must produce Bool / `right operand ofmust produce Bool`
boolean predicate expression produces Bool, expected ...A composed predicate is used where a non-Bool value is required.Use predicate composition only in Bool positions such as conditions or Bool fields.
parenthesized value operand must produce ...A parenthesized expression does not match the expected source value type.Keep the grouping expression typed to the surrounding value position.
function ... declares duplicate pattern for variant ...More than one source function clause handles the same constructor.Keep one clause per constructor.
function ... must handle variant ...A source function signature pattern group or match body is non-exhaustive.Add the missing constructor clause/arm or one _ fallback.
function ... wildcard pattern is unreachableExplicit source function clauses already cover every variant.Remove the wildcard clause or remove the explicit clauses it should cover.
pattern ... overlaps an earlier pattern for the same typed payload shapeA function match or return-match repeats a constructor with an identical, unguarded, or not-provably-disjoint nested predicate.Keep one unguarded constructor arm, or split the constructor only by disjoint nested enum predicates.
match has no matching pattern for ... / return match has no matching pattern for ...A function call reached a concrete nested payload shape not covered by the function match arms.Add a disjoint nested predicate arm for that shape or add one _ fallback where fallback behavior is intended.
record pattern ... has no field ...A source function record pattern names a field outside the matched record.Bind a declared field from the record.
record pattern ... binds field ... more than onceA source function record pattern repeats one field.Bind each record field at most once.
record pattern binding ... is declared more than onceA source function record pattern binds two fields to the same local name.Use one distinct immutable binding name per field.
record pattern binding ... conflicts ...A source function record pattern binding reuses a reserved, process, process-reference binding, source function, type, or constructor name.Choose a distinct immutable binding name.
requires a concrete record value argumentA record destructuring function or function match is trying to destructure a value that is not concrete after source function expansion.Pass a concrete record value into the function or match a source binding that resolves to one.
requires a concrete list value argument / requires a concrete map value argumentA collection destructuring function or function match is trying to destructure a value that is not concrete after source function expansion.Pass a concrete List[...] or Map[...] value into the function, or match a source binding that resolves to one.
map pattern duplicates key ... / map value ... duplicates key ...A map pattern or map value repeats the same canonical key.Keep each map key once.
declares overlapping collection patterns ...Exact and rest/subset collection patterns could match the same concrete value.Make list rest or map subset patterns disjoint, use a single exact pattern, or add a wildcard fallback for the non-overlapping remainder.
list rest pattern must declare at least one prefix elementA list rest pattern used List[..tail], which would bind the original list without proving any element is present.List at least one fixed-position element before ..tail.
list rest binding cannot be a wildcardA list rest pattern used .._, which would look like a binding while intentionally discarding the suffix.Bind the suffix with ..tail, or use an exact list pattern when no suffix value is needed.
subset map pattern must declare at least one keyA subset map pattern used Map[..], which is equivalent to a map-specific catchall and binds nothing.Use _ for catchall behavior or list at least one static key before ...
map rest pattern must declare at least one keyA rest-binding map pattern used Map[..rest], which would bind the original map without proving any key is present.List at least one static key before ..rest.
map rest binding cannot be a wildcardA map rest pattern used .._, which would look like a binding while intentionally discarding the remainder.Use .. to ignore the remainder or ..rest to bind it.
map payload pattern keys must be static source values / map pattern keys must be static source valuesA map payload or function pattern tries to derive a key from a runtime binding such as current state or a payload value.Use static source keys; model dynamic-key dictionaries separately once key-set IFC semantics exist.
map value type ... keys must be static source valuesA runtime-bound map value tries to derive a map key from a payload or state binding.Use static source keys; model dynamic-key dictionaries separately once key-set IFC semantics exist.
collection pattern binding ... conflicts ...A list or map function pattern binding reuses an existing source value binding, process-reference binding, source function, or declared value name.Choose a distinct immutable binding name.
list payload pattern must bind at least one value / map payload pattern must bind at least one valueA constructor payload pattern tries to use a collection shape test without binding any projected value.Bind at least one immutable element/value, or use the message constructor without payload destructuring when the payload can be ignored.
match record pattern ... must declare exactly one armA source function whole-body match over a record tries to use enum-style multi-arm dispatch.Use one record destructuring arm for the matched record type.
match over record ... cannot use a wildcard patternA source function whole-body match over a record tries to use _.Use the record destructuring pattern for the matched record type.
match record pattern binding ... conflicts ...A source function whole-body record match binding reuses an existing source value binding, process-reference binding, or source function name.Choose a distinct immutable binding name.
return match scrutinee ... must be a source value bindingA function return-match tries to match a name that is not an in-scope immutable source value.Match the function parameter or a payload binding introduced by an enclosing source match.
return match must handle variant ...A function return-match is non-exhaustive.Add the missing constructor arm or one _ fallback.
return match record pattern ... must declare exactly one armA function return-match over a record tries to use enum-style multi-arm dispatch.Use one record destructuring arm for the matched record type.
return match record pattern binding ... conflicts ...A function return-match record binding reuses an existing source value binding, process-reference binding, or source function name.Choose a distinct immutable binding name.
payload ... has type ..., expected ...A source function or step payload binding annotation does not match the constructor payload type.Use the declared payload type.
match payload binding ... conflicts ...A source function match arm reuses a parameter, process-reference binding, or source function name for a payload binding.Use a distinct immutable payload binding name.
value ... is not a variant of enum ...A payload-constructor expression names a constructor outside the expected enum.Use a constructor from the expected enum or call a declared function.
enum variant ... requires a payload / does not accept a payloadA payload-bearing constructor was used as a fieldless value, or a fieldless constructor was called with a payload.Match the constructor’s declared payload shape.

Message Handling Errors

Diagnostic ContainsLikely CauseFix
step pattern message ... is not acceptedA step pattern names a message constructor outside the process message enum.Use a declared message constructor.
duplicate step pattern for messageA message variant has more than one explicit step clause.Keep one explicit clause per variant.
duplicate wildcard step patternMore than one step clause uses _.Keep one wildcard clause.
wildcard step pattern is unreachableExplicit clauses already cover every accepted message variant or every discovered concrete payload case the wildcard could cover.Remove the wildcard clause or remove an explicit clause that it should cover.
must declare step pattern for messageA message variant is not covered by an explicit or wildcard step clause.Add a step clause for the missing message or add one _ clause.
declares a wildcard step pattern with a payload-sensitive state match step pattern / declares payload-sensitive step pattern ... with a state match wildcard step patternA payload-sensitive state-match split is mixed with a non-state-match wildcard fallback, or a state-match wildcard fallback is mixed with a non-state-match payload-sensitive clause.Use state-match bodies for both the explicit payload-sensitive clauses and the wildcard fallback, use supported step-signature or match msg fallback where that surface is intended, or remove the wildcard or payload predicate.
step pattern ... overlaps an earlier pattern / state match step pattern ... overlaps an earlier patternTwo step patterns can match the same message payload shape.Keep one unguarded clause or make the nested payload predicates exact and disjoint.
must declare step pattern for message ... payload ...A payload-sensitive step split omits a discovered concrete payload case.Add an explicit step clause for the missing payload case; on step-signature, state-match, or match msg surfaces, one _ fallback may cover discovered remainder cases when the fallback shape is supported.
step pattern ... has no discovered payload caseA step payload predicate does not correspond to a discovered concrete payload case.Use a concrete payload case that the checker can discover from sends and constructors.
payload-sensitive step pattern for message ... has no discovered payload case for wildcard fallback / payload-sensitive state match step pattern for message ... has no discovered payload case for wildcard fallbackA wildcard fallback is paired with payload-sensitive step signatures or state-match clauses, but the checker did not discover any concrete payload case for the wildcard to lower.Send or construct the concrete payload case before it is handled, remove the fallback, or use explicit discovered payload cases.
match body must be the whole function bodyA match msg appears after another statement or has trailing body statements.Use one whole-body match msg form or step parameter patterns.
match expressions are only supported ...A general match is used inside a value expression such as a result constructor argument.Use a supported whole-body match, return match, step parameter pattern, or function return-match form.
match step must declare a typed message parameterA match step uses a parameter pattern instead of msg: MsgType.Use fn step(state: StateType, msg: MsgType).
match scrutinee ... must be the step message parameterThe match scrutinee is not the typed message parameter.Match the declared message parameter, usually match msg.
state match step must use a match bodyA match state step was parsed in a non-match body shape.Make match state { ... } the whole step body.
state match pattern ... requires a payload bindingA payload-bearing state variant is matched without binding its payload.Write the arm as Variant(name: PayloadType).
state match pattern ... does not carry a payloadA fieldless state variant was matched with a payload binding.Remove the binding from the fieldless variant arm.
state match payload ... has type ..., expected ...A state payload binding annotation does not match the state variant payload type.Use the declared state variant payload type.
state payload binding ... conflicts with message payload bindingA match state arm reuses the enclosing message payload binding name.Give the state payload binding its own transition-local name.
message parameter ... has type ..., expected ...The typed message parameter is not the process Msg type.Use the process message type in the second parameter.
cannot mix match step bodies with step parameter patternsOne process mixes match msg dispatch with parameter-pattern or state-match dispatch.Use either parameter-pattern/state-match clauses or one match msg body for the process.
sends message ... not accepted by ...The target process message enum has no such variant.Send a declared target message variant.
message ... requires a payloadA send omits the payload for a payload variant.Pass one value with send worker Variant(value);.
message ... does not accept a payloadA send passes a payload to a unit variant.Remove the payload argument or send a payload variant.
payload type ... must be a named record, enum, list, map, or process reference typeA payload variant uses an unsupported applied/generic type.Declare a named record or enum type, use List<T,N> / Map<K,V,N> over source values, or use ProcessRef<TargetProcess>.
payload type ... must declare exactly one target processA direct ProcessRef payload declaration has the wrong arity or a const argument.Declare process-reference payloads as ProcessRef<TargetProcess>.
step pattern payload ... has type ... expected ...A step payload binding annotation does not match the variant payload type.Use the declared payload type in the parameter pattern.
payload binding ... conflicts / process reference ... conflicts with payload bindingA local immutable binding shadows state, a process, a type, a value constructor, or another local binding in the same transition.Use distinct immutable binding names.
payload has type ..., expected ...A runtime envelope or artifact payload template carries the wrong value type.Match the payload value type to the target message variant.
payload ... exceeds maximum lengthA payload value label is too large for the artifact or runtime trace boundary.Use a smaller payload value or split the payload into smaller fields/messages.
payload ... is not a bound process referenceA ProcessRef<T> payload send uses a value that is not a process reference.Pass an immutable process reference binding or received ProcessRef<T> payload.
contains a process reference; process references must be direct message payloadsA record field or collection type tries to make process references general source values.Keep ProcessRef<T> as the direct payload type of a message variant, then forward that received reference directly.
process references must be direct message payloads / process reference template must be a direct message payloadA process reference payload is nested inside a record, enum, collection, or next-state template.Send ProcessRef<T> only as the direct payload of a message that declares ProcessRef<T>.

Match Errors

Diagnostic ContainsLikely CauseFix
match scrutinee ... is not a fieldless enum variantAn init match uses a scrutinee that is not a fieldless enum constructor.Match a declared fieldless enum constructor.
match pattern ... is not a variant of enum ...A match arm names a constructor outside the scrutinee enum.Use a constructor from the matched enum.
init match must handle variantAn init match is non-exhaustive.Add an arm for the missing variant or one _ arm.
init match declares duplicate patternMore than one arm handles the same constructor.Keep one arm per constructor.
init match wildcard pattern is unreachableExplicit arms already cover the matched enum.Remove the wildcard arm or remove the explicit arms it should cover.
init match pattern ... does not carry a payloadA fieldless constructor pattern tries to bind a payload.Remove the binding.
init match arm cannot use payload binding ... in returned stateAn init match arm tries to materialize a payload binding even though init matches lower to a static initial state.Return a concrete whole state value from each init match arm.

State Errors

Diagnostic ContainsLikely CauseFix
value ... is not a variant of enum ...A returned enum value does not belong to the expected enum.Return a variant from the process state enum.
record constructor ... does not match expected record ...A record value constructor does not match the expected state type.Construct the expected record type.
record value fields use ':'A record value used assignment syntax.Use field: value, not field = value.
process reference payloads are not valid state values / process reference templates are not valid next-state valuesA state value or next-state template tries to embed runtime process authority.Keep process references in direct message payloads; process states must be immutable data values.
state value state conflictsA state enum variant is named state.Rename the variant.
current state payload template requires a payload-bearing stateAn artifact or checked transition uses a state-payload template without a payload-bearing current state guard.Ensure the transition is keyed by a checked payload-bearing state value.
current_state id ... is not a valid state value / is not a loaded state valueAn artifact transition references a current state outside the loaded state table.Emit only typed state IDs from lowering; reject or regenerate invalid artifacts.

Process And Mailbox Errors

Diagnostic ContainsLikely CauseFix
spawns itselfA process tries to spawn itself.Spawn another declared process.
authority type must be Cap<Spawn<ProcessName>> or Cap<PortConnect<PortName>>A process authority declaration uses a malformed capability wrapper.Declare local spawn authority as authority name: Cap<Spawn<TargetProcess>>; or local port-send authority as authority name: Cap<PortConnect<PortName>>;.
authority descriptor must be Spawn<ProcessName> or PortConnect<PortName>A Cap<...> process authority declaration does not contain a supported process-local descriptor.Use Cap<Spawn<TargetProcess>> for dynamic local spawn or Cap<PortConnect<PortName>> for typed boundary sends.
protocol ... authority must be Cap<ProtocolBoundary<...>> / port ... authority must be Cap<PortConnect<...>> / component ... authority must be Cap<ComponentExport<...>>A boundary declaration has the wrong capability descriptor or target name.Use the exact authority shape for the declaration being defined.
port ... targets process ... with message type ..., expected protocol ... message type ...A port binds a protocol to a process whose Msg enum does not match.Point the port at a process with the protocol message enum or declare a protocol for that target process.
port ... is not declaredA send ... via ... names an undeclared port.Declare the port before checking the send, or remove the via contract.
send via port ... requires authority Cap<PortConnect<...>> / send through port id ... requires authority port_connectA typed boundary send lacks the exact process-local port authority.Add a used authority name: Cap<PortConnect<PortName>>; declaration, or remove the typed-port send.
sends through port id ... targeting process id ..., expected ...A Mantle artifact send references a port table ID whose admitted target process does not match the send target.Fix the frontend lowering or the artifact table; Mantle will not reinterpret source names at runtime.
spawn authority target must be a process nameThe spawn descriptor target is not a bare process name.Target a declared process directly, for example Cap<Spawn<Worker>>.
spawn authority targets entry processA process authority declaration tries to create the already-started entry process.Target a non-entry worker process.
spawn target ... requires authority Cap<Spawn<...>>A step uses local dynamic spawn without exact authority for that target process.Add a process-local authority declaration for the exact target, or remove the spawn.
duplicates spawn authority descriptorA process declares the same spawn capability more than once.Keep one declaration per exact target process.
declares unused spawn authority / declares unused port authorityA process declares authority that no local spawn site or typed-port send uses.Remove the unused declaration or add the corresponding checked use.
declares duplicate supervisor childA local supervisor declares the same lexical child name more than once in one owner process.Give each child a unique name.
local supervisor graph contains cycleStatic lexical supervisor declarations contain an indirect child cycle.Make each local supervisor child tree acyclic.
restart intensity ... must be greater than zeroA supervisor plan omits a positive restart count or restart window.Use explicit positive max_restarts: N_u32 and within_ms: N_u64 values.
lexical supervisor child spawn site ... carries dynamic authorityA Mantle artifact tries to use dynamic spawn authority for a lexical child site.Emit lexical supervisor child sites with supervisor and child IDs only.
supervisor child ... spawn site targetsA supervisor plan and its lexical spawn site disagree on the child target.Keep the child declaration target, spawn target, and spawn-site target identical.
conflicts with a process declarationA process reference uses the same name as a process definition.Use a distinct reference name.
undeclared process reference or supervisor childA send references a name that is never spawned in the process and is not a lexical supervisor child.Add a matching let worker: ProcessRef<Worker> = spawn Worker; statement, or target a declared lexical supervisor child.
send target ... is not a process reference payloadA send target names a payload binding whose type is not ProcessRef<T>.Send through a process reference binding or a received ProcessRef<T> payload.
unbound process referenceA transition sends through a reference before it is bound.Spawn the reference before sending through it.
duplicates process reference idA transition binds the same reference twice.Use two distinct references or bind once.
mailbox would exceed boundA send would overflow the target mailbox.Increase the mailbox bound or send fewer messages before the target runs.
would retain ... unhandled messageA process can stop while messages remain in its mailbox.Continue until queued messages are handled or avoid queuing them.
mailbox_bound must be no greater thanThe mailbox bound exceeds the validated limit.Lower the bound.

Runtime Errors

Runtime errors are emitted by Mantle after artifact admission starts. Common causes include invalid artifacts, blocked trace paths, mailbox exhaustion, explicit Panic(...) transition results, trace size exhaustion, and dispatch budget exhaustion.

Use the source gate first:

just strata-check path/to/program.str
just strata-build path/to/program.str

Then run Mantle:

just mantle-run target/strata/program.mta

If source checking passes but Mantle rejects an artifact, inspect the artifact and runtime boundary docs before changing runtime behavior.