soma.cell

Diagnostics

Every diagnostic code of soma check (151), each with a program that triggers it, the diagnostic the compiler really prints, and the fixed program. Errors (E) stop the program; warnings (W) do not.

An agent reads them with soma check --json: each diagnostic carries code, message, fix, line and col. The message names the form to write.

CodeNameMeaning
E0001property_contradictiontwo properties of one memory slot exclude each other
E0002invalid_propertiesa combination of slot properties that cannot hold
E0003missing_handlera face signal has no on handler
E0004param_mismatcha handler's parameter count differs from its face signal
E0005duplicate_celltwo cells share a name
E0006duplicate_slottwo memory slots of one cell share a name
E0007duplicate_signaltwo handlers of one cell share a name
E0008shard_not_foundthe scale section shards a slot the cell does not declare
E0009consistency_mismatcha slot property contradicts the scale section's consistency
E0010promise_violationthe cell breaks a promise of its face
E0011interpolation_undefineda string interpolation names a variable that is not in scope
E0012dispatcha call resolves to no handler, to several, or with the wrong argument count
E0013unmatched_awaitan await names a signal nothing sends
E0014unmatched_handlera handler answers a signal the face does not declare
E0015signal_type_mismatcha handler's parameter types differ from its face signal
E0016custom_checker_faileda cell checker rule failed
E0017sum_type_issuea match over a sum type is not exhaustive, or names an unknown variant
E0018determinism_violationa [deterministic] handler uses a nondeterministic builtin
E0019model_capability_missingthe configured model lacks a capability the agent needs
E0020cost_exceededa declared cost bound is lower than what the handler can spend
E0021budget_exceededa declared memory budget is lower than the proven peak
E0022invariant_issuea memory invariant is malformed or names something it cannot read
E0023dead_codestatements that can never run
E0024guard_scopea transition guard reads a name the calling handler does not bind
E0025habitan idiom from another language that means something else in Soma
E0026foreign_slota handler touches a memory slot of another cell
E0027unknown_transition_targettransition() names a state the machine does not declare
E0028undefined_variablea name with no let, parameter, loop variable, match binding or slot
E0029function_as_valuea handler or builtin used as a value instead of being called
E0030ws_placementon ws outside the cell that owns request
E0031unknown_promisea promise no checker implements
E0032undefined_functiona call to a name that is neither a handler nor a builtin
E0033think_optionan unknown or mistyped think() option
E0034storage_collisiontwo slots would share one storage table
E0035slot_method_on_locala slot method (.set / .push / .delete) on a local value
E0036runtime_unknown_cellthe runtime section names a cell that does not exist
E0037runtime_signal_argsthe runtime section sends a signal with the wrong arguments
E0038native_vocabularya [native] handler uses something native code does not have
E0039int_as_boola number, string or list where a condition needs a Bool
E0040face_return_typea handler returns a value its face signal does not declare
E0041aritya call with the wrong number of arguments
E0042write_to_undefinedan assignment to a name that was never bound
E0043write_to_loop_copya write to a loop variable, which is a copy
E0044variant_shapea variant built with the wrong fields
E0045unused_valuean expression statement whose value is dropped
E0046unknown_typea type name nothing declares
E0047unknown_statea state name the machine does not declare
E0048unknown_handlera handler name nothing defines
E0049unknown_handler_propertyan unknown handler annotation
E0050unknown_checker_predicatea checker rule names a predicate nothing implements
E0051undefined_delegatea route delegates to a handler that does not exist
E0052transition_no_machinetransition() in a program without a state machine
E0053transition_effectan effect block on a transition does something it may not
E0054test_machine_ambiguousa test rule calls transition() with several machines in scope
E0055test_helper_shadowsa test helper named like a program handler or a builtin
E0056task_without_thinka [task] handler that never calls think()
E0057task_try_writea [task] handler writes inside a try that spans a think()
E0058task_transition_before_thinka [task] handler transitions before its last think()
E0059task_stale_reada [task] handler uses a value read before a think()
E0060task_native[task] and [native] on one handler
E0061task_ensureensure in a [task] handler undoes the current step only
E0062task_called_atomicallya [task] handler called from a plain handler
E0063state_annotationan unknown annotation on a state or transition
E0064slot_assignmentslot = value — a slot is written through its methods
E0065scale_memorythe scale section contradicts the memory section
E0066scalar_slota memory slot that is not a Map or a List
E0067rules_outside_testa rules block outside a cell test
E0068return_in_lambdareturn inside a lambda
E0069reserved_handlera handler named like a reserved builtin
E0070request_signatureon request with a signature serve cannot call
E0071refusal_discardeda refusal() value that is not returned
E0072quadratic_concata list or string grown by concatenation in a loop
E0073pipe_right_sidethe right side of |> is not a call
E0074param_shadows_slota parameter named like a memory slot
E0075no_initial_statea state machine without initial:
E0076nested_quotean unescaped quote inside an interpolation
E0077native_primitive_shadoweda handler named like a native primitive
E0078multiple_state_machinesmore than one state machine in a cell
E0079mock_targeta mock naming no handler
E0080local_shadows_slota let named like a memory slot
E0081lambda_scopea lambda reads a name that is not in scope where it runs
E0082lambda_assigna lambda assigns an outer local
E0083invariant_not_boolan invariant that is not a condition
E0084interpolation_trailingtext after the expression of an interpolation
E0085interpolation_malformedan interpolation that does not parse
E0086interpolation_format_speca format spec in an interpolation (use format())
E0087interior_timerevery / after in an interior cell
E0088interior_calla call into an interior cell from outside its parent
E0089immutable_writean overwrite or delete on an [immutable] slot
E0090guard_effecta guard that calls a handler, think() or writes a slot
E0091foreign_idiomsyntax carried over from another language
E0092face_mismatcha handler and its face signal disagree
E0093every_zeroevery 0 — an interval must be positive
E0094ensure_after_returnensure after a return never runs
E0095empty_test_cella test cell that asserts nothing
E0096empty_programa file with no cell
E0097empty_matcha match with no arm
E0098duplicate_edgethe same transition declared twice
E0099count_field_default.len / .size read as a field with a default
E0100cost_unprovablea declared cost bound that cannot be proven
E0101builtin_aritya builtin called with too few or too many arguments
E0102budget_annotationa malformed budget annotation
E0103break_outside_loopbreak / continue outside a loop
E0104assignment_without_letan assignment to a name that has no let
E0105argument_typean argument whose type differs from the parameter's
E0106argument_counta handler called with the wrong number of arguments
E0107ambiguous_slota slot name two cells declare
E0108syntaxa syntax error
E0109type_mismatchan expression whose inferred type cannot be used where it stands
E0110unknown_fielda field the record type does not declare
E0111maybe_absenta value that may be absent () used where a value is required
E0112editionan unknown edition in soma.toml
E0113untrusted_valuea model's answer or an HTTP reply decides a state, a URL, a file or a budget without a check
E0114loadthe program does not load: an import, a manifest or a file it needs
E0115ioa file the command was given cannot be read
E0116contracta face contract (requires / ensures) says something a caller could not evaluate, or sits on a handler that cannot carry one
E0117awaitan await stands where its handler could not be stopped and resumed: outside a [task] handler, or not as a whole statement of its body or of an if branch there
E0118tool_bindinga tool bound to a server ([mcp: …] / [openapi: …]) that soma.toml does not define, soma.lock does not pin, or whose declaration does not fit the pinned contract
E0119flesha flesh body that cannot go into a skeleton: no skeleton of that name, a second body for one signal, parameters that differ from the signal's, or a helper with an untyped parameter
E0120framea skeleton's frame that names something the skeleton does not have, or a flesh that does something its signal's frame does not grant (a write, a read, a call, an emit or a machine edge)
E0121skeleton_locka skeleton differs from the one skeleton.lock holds (frozen with soma skeleton --freeze)
E0122nominal_mismatchtwo nominal types mixed (cell type Lots = Int with Cents), or a plain value where a nominal one is declared
E1001expectedthe parser expected one token and found another
E1002unexpected_eofthe file ends inside a construct
E1003handler_return_typea return type on a handler — it goes on the face signal
E1004match_fat_arrow=> in a match arm — arms use ->
E1005reserved_worda keyword used as a name
E1006nesting_too_deepexpressions or blocks nested too deeply
E1007cell_constanta let / const directly inside a cell
E1008statement_as_valuea statement where a value is expected
E1009fix_ita near-miss the parser knows the correction for
E1010lexicala character, string or number the lexer cannot read
W0001unhandled_signalan emitted signal no cell handles
W0002property_implicationa slot property implies another that is missing
W0003unknown_propertya slot property nothing defines
W0004unknown_property_refa cell property refers to an unknown property
W0005unverifiable_promisea descriptive promise the compiler cannot check
W0006await_without_handleran await with no handler for its signal
W0007scale_eventual_consistencyeventual consistency on a slot that reads its own writes
W0008agent_missing_state_machinean agent cell without a state machine
W0009cost_advisorya cost bound that is an estimate, not a proof
W0010cost_provena cost bound that is proven (a note)
W0011dispatch_shadowa bare call that two definitions could answer
W0012native_semanticsnative code that would differ from the interpreter
W0013unreachablecode or states that cannot be reached
W0014habit_warningan idiom that probably does not mean what it does elsewhere
W0015interpolation_recoverablean undefined interpolation variable inside try / assert_fails
W0016budget_advisorya memory budget whose proof is incomplete
W0017budget_oka memory budget that holds (a note)
W0018type_advisorya type the inference could not settle; checked at run time
W0019frame_warninga skeleton that says more than the program does: a frame wider than its body, a machine edge or a slot no frame touches, a helper nothing calls