Skip to main content
Sifr organizes every diagnostic into a named family. Each code follows the format SIFR-<FAMILY>-dddd, where the four-digit number is scoped within its family. This page lists all 24 families and every active code in each one. Use sifr --explain <CODE> in your terminal to get full detail, message templates, and fix guidance for any specific code.
The PARSE family covers errors that the parser encounters before any semantic analysis. These diagnostics fire when your source file contains syntax the Sifr parser cannot recover from.
CodeSeverityDescription
SIFR-PARSE-0002ErrorExpected token or generic parser recovery failure.
SIFR-PARSE-0003ErrorLexical or interpolated string parser failure.
SIFR-PARSE-0004ErrorIndentation or same-line statement layout parser failure.
SIFR-PARSE-0005ErrorInvalid assignment, delete, starred, or named-expression target syntax.
SIFR-PARSE-0006ErrorInvalid call argument order or unpacking syntax.
SIFR-PARSE-0007ErrorEmpty or malformed declaration list syntax.
SIFR-PARSE-0008ErrorInvalid match-pattern syntax.
SIFR-PARSE-0009ErrorUnsupported parser syntax or interactive-only syntax.
The NAME family covers errors that arise when the compiler cannot resolve an identifier — a variable, function, type, or member — to a known declaration.
CodeSeverityDescription
SIFR-NAME-0001ErrorUndefined variable.
SIFR-NAME-0002ErrorUndefined function or callable.
SIFR-NAME-0003ErrorUnknown type or generic type name.
SIFR-NAME-0004ErrorMissing module or class member.
SIFR-NAME-0005ErrorDuplicate function definition in a module.
SIFR-NAME-0006ErrorVariable declaration lacks a required initializer.
The IMPORT family covers errors that occur when resolving import and from … import statements. These diagnostics fire before type-checking when the module graph cannot be built.
CodeSeverityDescription
SIFR-IMPORT-0001ErrorForbidden intrinsic import.
SIFR-IMPORT-0002ErrorUnknown source module import target.
SIFR-IMPORT-0003ErrorUnsupported import statement form.
SIFR-IMPORT-0004ErrorPrivate module member import.
SIFR-IMPORT-0005ErrorAmbiguous source module import target.
SIFR-IMPORT-0006ErrorSource module namespace and file import collision.
SIFR-IMPORT-0007ErrorCircular source module import graph.
SIFR-IMPORT-0008ErrorBare CPython-style stdlib import attempt.
SIFR-IMPORT-0009ErrorUnsupported legacy Sifr stdlib module import.
SIFR-IMPORT-0008 fires when you write from math import floor instead of from sifr.math import floor. Sifr’s standard library lives under the sifr.* namespace.
The TYPE family covers type system violations detected during static analysis and lowering. These diagnostics indicate that the inferred or annotated types in your program are not compatible with each other or with the operation being performed.
CodeSeverityDescription
SIFR-TYPE-0002ErrorExpected and actual types are incompatible.
SIFR-TYPE-0003ErrorIf-expression or conditional branches have incompatible types.
SIFR-TYPE-0004ErrorA required type annotation is missing.
SIFR-TYPE-0005ErrorUnsupported operator or operand types.
SIFR-TYPE-0006ErrorInt and bigint are mixed without an explicit conversion.
SIFR-TYPE-0007ErrorInvalid type annotation shape.
SIFR-TYPE-0008ErrorContainer literal elements, keys, or values have conflicting types.
SIFR-TYPE-0009ErrorTuple or list unpacking shape mismatch.
SIFR-TYPE-0010ErrorTypeVar constraints are not satisfied by the inferred concrete type.
SIFR-TYPE-0011ErrorUnsupported default argument expression.
SIFR-TYPE-0012ErrorUnsupported expression form.
SIFR-TYPE-0901WarningInteger arithmetic may overflow at runtime.
SIFR-TYPE-0902NoteReveal the inferred static type of an expression.
The ASYNC family covers violations of Sifr’s async effect system. Sifr tracks whether functions perform real suspension, and it enforces that blocking or CPU-heavy work is never called directly from an async context.
CodeSeverityDescription
SIFR-ASYNC-0001ErrorAsync function body has no real suspension effect.
SIFR-ASYNC-0002ErrorAwaited same-task coroutine has no real suspension effect.
SIFR-ASYNC-0003ErrorBlocking I/O function called directly from async context.
SIFR-ASYNC-0004ErrorCPU-heavy function called directly from async context.
SIFR-ASYNC-0005ErrorBlocking offload target is not classified as blocking I/O or CPU-heavy work.
SIFR-ASYNC-0006ErrorSynchronous workload annotation applied to async function.
SIFR-ASYNC-0007ErrorShell execution function called directly from async context.
The DECIMAL family covers errors in Sifr’s Decimal and BigDecimal numeric types. Sifr’s decimal types are distinct from Python floats and have their own literal syntax, scale rules, and construction constraints.
CodeSeverityDescription
SIFR-DECIMAL-0001ErrorInvalid Decimal exact literal.
SIFR-DECIMAL-0002ErrorInvalid BigDecimal exact literal.
SIFR-DECIMAL-0003ErrorFloat mixed with a decimal numeric type.
SIFR-DECIMAL-0004ErrorDecimal and BigDecimal mixed in one operation.
SIFR-DECIMAL-0005ErrorDecimal float construction or conversion is forbidden.
SIFR-DECIMAL-0006ErrorBigDecimal float construction or conversion is forbidden.
SIFR-DECIMAL-0007ErrorDecimal scale argument is invalid.
SIFR-DECIMAL-0008ErrorBigDecimal scale or context argument is invalid.
The INT family covers errors in Sifr’s exact integer (int) and fixed-width integer types (i8i128, u8u128). Sifr enforces explicit conversions and overflow handling rather than silently wrapping or truncating.
CodeSeverityDescription
SIFR-INT-0001ErrorFixed-width integer literal or const expression is out of range.
SIFR-INT-0003ErrorReserved integer width name used before support lands.
SIFR-INT-0004ErrorCompile-time integer evaluation budget exceeded.
SIFR-INT-0005ErrorInteger division, modulo, or exponentiation requires handling a typed failure.
SIFR-INT-0006ErrorExact integer to float conversion requires handling precision loss.
SIFR-INT-0007ErrorBool and integer comparison requires explicit conversion.
SIFR-INT-0011WarningTemporary bigint transition alias used.
The IO family covers errors at the boundary between text-mode and binary-mode file operations. Sifr requires that text-mode file opens declare an explicit encoding at compile time.
CodeSeverityDescription
SIFR-IO-0801ErrorText-mode open requires an explicit encoding.
SIFR-IO-0802ErrorOpen mode must be statically known.
The ENCODING family covers errors related to text encoding configuration. Sifr requires that encoding error handlers be statically known so that encoding behavior is predictable and verifiable at compile time.
CodeSeverityDescription
SIFR-ENCODING-0803ErrorEncoding error handler must be statically known.
The CALL family covers errors at call sites: wrong argument counts, unexpected keyword arguments, duplicate arguments, missing required arguments, and uncallable expressions.
CodeSeverityDescription
SIFR-CALL-0001ErrorWrong positional argument count.
SIFR-CALL-0002ErrorUnexpected keyword argument.
SIFR-CALL-0003ErrorDuplicate argument from positional and keyword overlap.
SIFR-CALL-0004ErrorMissing required argument.
SIFR-CALL-0005ErrorCallable arity failure or expression is not callable.
The OWN family covers violations of Sifr’s ownership and borrow model. Because Sifr compiles to Rust, it enforces that values are not used after being moved, that borrows do not conflict, and that values respect sendability and shareability boundaries across task and channel boundaries.
CodeSeverityDescription
SIFR-OWN-0001ErrorUse after move.
SIFR-OWN-0002ErrorSame-call borrow conflict.
SIFR-OWN-0003ErrorBorrowed parameter escapes by return or store.
SIFR-OWN-0004ErrorMoved value is reused across loop iterations.
SIFR-OWN-0005ErrorImmutable parameter is mutated.
SIFR-OWN-0006ErrorImmutable parameter is reassigned.
SIFR-OWN-0007ErrorImmutable bytes value is mutated.
SIFR-OWN-0008ErrorImmutable bytes value is mutated by augmented assignment.
SIFR-OWN-0009ErrorMutable borrow remains live across an await point.
SIFR-OWN-0010ErrorNon-sendable value crosses a spawned task boundary.
SIFR-OWN-0011ErrorNon-sendable value is sent through a channel.
SIFR-OWN-0012ErrorNon-share-safe value is wrapped in sync.Shared.
SIFR-OWN-0013ErrorNon-IPC-serializable value is used as a typed IPC payload.
The FLOW family covers control-flow correctness: invalid break/continue placement, missing return values, unsupported loop forms, and constructs that HIR lowering cannot represent.
CodeSeverityDescription
SIFR-FLOW-0001Errorbreak outside a loop.
SIFR-FLOW-0002Errorcontinue outside a loop.
SIFR-FLOW-0003ErrorInvalid nonlocal or nested-function flow.
SIFR-FLOW-0004ErrorFunction may finish without returning a required value.
SIFR-FLOW-0005ErrorControl-flow condition has an unsupported type.
SIFR-FLOW-0006ErrorStatement form is unsupported by HIR lowering.
SIFR-FLOW-0007ErrorAssignment target form is unsupported by HIR lowering.
SIFR-FLOW-0008ErrorFor-loop iteration form or source is invalid.
SIFR-FLOW-0901WarningUnreachable statement ignored during lowering.
The FMT family covers formatting enforcement. It fires when sifr fmt --check detects that one or more source files have drifted from canonical Sifr formatting.
CodeSeverityDescription
SIFR-FMT-0001ErrorSource formatting drift detected by sifr fmt --check.
Run sifr fmt (without --check) to automatically rewrite all files to canonical formatting and resolve SIFR-FMT-0001.
The LINT family covers the policy-rule engine (sifr lint). These are Warning-severity diagnostics that can be suppressed per-line with # sifr: ignore[rule-id]. The family also includes meta-diagnostics about suppression hygiene.
CodeSeverityDescription
SIFR-LINT-0001WarningSuppression references an unknown policy rule ID.
SIFR-LINT-0002WarningSuppression did not suppress any diagnostic.
SIFR-LINT-0003WarningSuppression must list explicit Sifr policy rule IDs.
SIFR-LINT-0004WarningLine ends with trailing horizontal whitespace.
SIFR-LINT-0005WarningComment contains a tracked TODO or FIXME marker.
SIFR-LINT-0006WarningCall passes a boolean literal positionally.
SIFR-LINT-0007WarningFunction has more parameters than the policy limit.
SIFR-LINT-0008WarningImport duplicates a module/name pair already imported in the same source file.
The MATCH family covers match statement correctness. Sifr requires that match statements are exhaustive over enum types and that patterns are well-formed.
CodeSeverityDescription
SIFR-MATCH-0001ErrorNon-exhaustive match — one or more enum variants are not covered.
SIFR-MATCH-0002ErrorMatch guard must be bool.
SIFR-MATCH-0003ErrorInvalid class pattern field.
SIFR-MATCH-0004ErrorInvalid or unsupported match pattern form.
The PROTO family covers violations of Sifr’s structural protocol system: iterator and reversible protocols, context-manager protocols, and hashability/comparability constraints.
CodeSeverityDescription
SIFR-PROTO-0001ErrorProtocol bound or conformance failure.
SIFR-PROTO-0002ErrorInvalid iterator or reversible protocol signature.
SIFR-PROTO-0003ErrorContext-manager protocol is missing (__enter__ or __exit__ absent).
SIFR-PROTO-0004ErrorHashable or comparable protocol is required.
The CLASS family covers class-level structural errors: missing field initializers, field ordering violations, duplicate enum variants, invalid base classes, and unsupported class forms.
CodeSeverityDescription
SIFR-CLASS-0001ErrorClass fields require an initializer or super initializer.
SIFR-CLASS-0002ErrorRequired field declared after a defaulted field.
SIFR-CLASS-0003ErrorDuplicate enum or class value, or invalid variant.
SIFR-CLASS-0004ErrorMissing class field.
SIFR-CLASS-0005ErrorInvalid class base.
SIFR-CLASS-0006ErrorUnsupported class declaration.
The RESULT family covers Sifr’s checked error-handling model. Sifr requires that Result values are explicitly handled, that error types are valid, and that try/except blocks cover all possible error types from the try body.
CodeSeverityDescription
SIFR-RESULT-0001ErrorUnused Result value.
SIFR-RESULT-0002ErrorInvalid Result error type.
SIFR-RESULT-0003ErrorInvalid raise expression.
SIFR-RESULT-0004Errorexcept arm references an unknown error type.
SIFR-RESULT-0005Errortry body error types are not fully covered by except arms.
SIFR-RESULT-0006Errorexcept arm type expression has an unsupported form.
SIFR-RESULT-0001 fires whenever you call a function that returns Result and discard the return value without handling it. Use match, unwrap(), or propagate the result with ? syntax to resolve it.
The STDLIB family covers errors related to Sifr’s embedded standard library. These diagnostics fire when a stdlib constructor or method is called in an unsupported way, or when the stdlib bootstrap or cache has a problem.
CodeSeverityDescription
SIFR-STDLIB-0001ErrorUnsupported standard-library constructor, method, or surface.
SIFR-STDLIB-0003ErrorEmbedded standard-library bootstrap failure.
SIFR-STDLIB-0004ErrorStandard-library cache build or reuse failure.
The WORKSPACE family covers errors in workspace configuration: malformed manifests, source roots that escape the workspace boundary, and invalid source root entries. It also includes legacy import resolution errors that mirror the IMPORT family for workspaces not yet migrated to the current module system.
CodeSeverityDescription
SIFR-WORKSPACE-0001ErrorMalformed workspace manifest.
SIFR-WORKSPACE-0002ErrorWorkspace source root escapes the workspace root.
SIFR-WORKSPACE-0003ErrorWorkspace source root is not a directory.
SIFR-WORKSPACE-0004ErrorWorkspace source root entry has an invalid shape or path.
SIFR-WORKSPACE-0101ErrorLegacy workspace import target could not be resolved.
SIFR-WORKSPACE-0102ErrorLegacy workspace import target is ambiguous.
SIFR-WORKSPACE-0103ErrorLegacy workspace namespace package collision.
SIFR-WORKSPACE-0104ErrorLegacy workspace import graph cycle.
The PACKAGE family is the largest family and covers the full lifecycle of Sifr packages: manifest validation, dependency resolution, import scope enforcement, trust policy, archive integrity, and publish guardrails.
CodeSeverityDescription
SIFR-PACKAGE-0001ErrorMissing or invalid Cargo Sifr discovery metadata.
SIFR-PACKAGE-0002ErrorMissing or invalid sifr.toml package manifest.
SIFR-PACKAGE-0003ErrorUnsupported Sifr compiler metadata appears in Cargo metadata.
SIFR-PACKAGE-0101ErrorCargo command invocation failed.
SIFR-PACKAGE-0102ErrorA selected Cargo package is Rust-only.
SIFR-PACKAGE-0103ErrorCargo metadata parsing or normalization failed.
SIFR-PACKAGE-0104ErrorPackage source is unavailable in offline or frozen mode.
SIFR-PACKAGE-0106ErrorRust-only package depends directly on a Sifr source package.
SIFR-PACKAGE-0201ErrorDirect package import root resolves to multiple package instances.
SIFR-PACKAGE-0202ErrorPackage imports a module outside its direct dependency scope.
SIFR-PACKAGE-0203ErrorPackage imports a private module from another package.
SIFR-PACKAGE-0204ErrorType identity crosses resolved package instances.
SIFR-PACKAGE-0301ErrorBackend Rust crate is not allowed by the Sifr trust policy.
SIFR-PACKAGE-0305ErrorTrust policy names a backend crate that is not a direct dependency.
SIFR-PACKAGE-0401ErrorCargo package archive is missing required Sifr source.
SIFR-PACKAGE-0402ErrorPackage publish or archive validation failed.
SIFR-PACKAGE-0403ErrorCargo include/exclude rules omit required Sifr files.
SIFR-PACKAGE-0404ErrorCargo package archive contains an unsafe path.
SIFR-PACKAGE-0501ErrorPure Sifr Rust marker contains implementation.
SIFR-PACKAGE-0601ErrorPackage selector is ambiguous or invalid.
SIFR-PACKAGE-0602ErrorWorkspace selection contains duplicate import roots.
SIFR-PACKAGE-0603ErrorChanged file could not be mapped to a package.
SIFR-PACKAGE-0604ErrorOutdated query cannot inspect this Cargo source.
SIFR-PACKAGE-0605ErrorRunnable package target or script selection is missing or ambiguous.
SIFR-PACKAGE-0606ErrorDiscovered app target name is invalid.
SIFR-PACKAGE-0607ErrorSelected workspace members use the same Sifr package name.
SIFR-PACKAGE-0701ErrorProduction sifr.toml uses manifest-level exports.
SIFR-PACKAGE-0703ErrorSifr-managed Cargo projection manifest pointer drift.
SIFR-PACKAGE-0704ErrorSifr-managed Cargo projection include rules omit required package files.
SIFR-PACKAGE-0709ErrorPure package marker is missing from Sifr-managed projection.
SIFR-PACKAGE-0710ErrorExplicit Sifr file target is outside the package source root.
SIFR-PACKAGE-0711ErrorProduction sifr.toml uses manifest binary target tables.
SIFR-PACKAGE-0713ErrorPublic API symbol is exported more than once.
SIFR-PACKAGE-0714ErrorPackage script expansion attempted to invoke another script.
The CODEGEN family is reserved for diagnostics that arise during the Rust lowering and code-generation phase, after HIR construction. No codes are active yet; this family is reserved for future use.
CodeSeverityDescription
(no active codes)This family has no active codes in the current release.
The BUILD family covers failures in Sifr’s build pipeline: file materialization, temporary workspace creation, Cargo manifest generation, Rustc/Cargo execution, and missing artifacts.
CodeSeverityDescription
SIFR-BUILD-0002ErrorBuild file materialization failed.
SIFR-BUILD-0003ErrorTemporary build workspace creation failed.
SIFR-BUILD-0004ErrorCargo manifest generation failed.
SIFR-BUILD-0005ErrorRustc or Cargo execution failed.
SIFR-BUILD-0006ErrorExpected build artifact was not produced.
SIFR-BUILD-0901ErrorStandalone install receipt is missing or outside the self-update contract.
The INTERNAL family covers compiler-internal failures that escape the panic boundary. If you see an INTERNAL diagnostic, it indicates a compiler bug rather than a problem with your source code.
CodeSeverityDescription
SIFR-INTERNAL-0001ErrorUnclassified compiler panic after a panic boundary.
SIFR-INTERNAL-0002NoteStructured recovery-cap omission summary.
SIFR-INTERNAL-0001 always indicates a compiler bug. If you encounter it, please file a report with the Sifr issue tracker and include a minimal reproduction of the failing source file.