Docs / Diagnostics

Read validator outcomes narrowly and correctly

This page explains how to distinguish accepted input, deterministic reject, and golden mismatch outcomes for the released Stage 1 validator line.

Use it to understand the current semantic diagnostic range, common operator mistakes, and the point at which a result should be escalated into a support report.

Accepted input

canon produces CANON:, canonical ASCII, HASH:, and the current _h value rendered as hex.

Rejected input

The validator returns a deterministic code, message, and usually a span. Syntax rejection and semantic rejection are not the same class.

Golden mismatch

The fixture expectation and actual validator result diverged. This is a conformance mismatch, not automatically a parser or platform failure.

Current semantic range

E100 through E107

These codes mean the input parsed far enough to hit the current shipped static semantics checks. Parser or lexer failures usually appear outside this range.

E100

Call arity mismatch

Wrong number of arguments for a builtin call.

Check the callee name and expected argument count first.

E101

Exact-decimal type mismatch

A strict exact-decimal comparison received the wrong type.

Check whether both comparison inputs are exact decimals.

E102

Builtin argument type mismatch

The call shape is valid, but one or more arguments have the wrong type.

Check the builtin and each argument type at the reported span.

E103

Match arm result type mismatch

Different match arms resolve to incompatible result types.

Check each arm output rather than only the scrutinee.

E104

Atomic or effect boundary violation

An atomic-only or effectful expression was used in the wrong context.

Check whether the operation belongs inside atomic{...} or a pure value position.

E105

Explicit barrier required

Exact comparison needs an explicit barrier conversion before the comparison happens.

Look for missing to_dec(...) before exact-decimal comparison.

E106

Pattern type mismatch

The pattern does not match the scrutinee type expected by the current validator.

Check the scrutinee type and the pattern kind at the reported span.

E107

Call target is not callable

The MVP rejected the call target itself.

Check whether the callee is actually a builtin or callable identifier.

Failure classes

Keep parser, semantic, and conformance failures separate

  • parser or lexer failures are usually malformed source and often appear outside E100 to E107
  • semantic rejection means the source parsed but hit a current shipped semantic rule
  • golden mismatch means the expected fixture result did not match actual validator behavior
  • setup and path mistakes are still real problems, but they are operator issues rather than validator semantics changes

Common operator mistakes

Check the narrow path before escalating

  • wrong input file path for canon
  • wrong fixture path or wrong fixture corpus for golden
  • reading a mismatch as proof of platform failure
  • confusing malformed source with semantic rejection
  • treating shipped demo fixtures and project-owned fixtures as interchangeable without intent

Escalation threshold

Report it when the result is reproducible and still unclear

  • capture the exact command, exact file, and exact output
  • include whether the issue happened in canon or golden
  • include the diagnostic code and span when present
  • include the validator version or release tag if relevant
  • state whether the input was shipped sample material or partner-owned material

Need escalation?

Route reproducible diagnostics and mismatch cases into support

The goal is not to explain away failures. The goal is to classify them correctly so support receives exact commands, exact inputs, exact outputs, and narrow issue framing.