pyfcstm.diagnostics

Structured diagnostic codes and design-health reporting for pyfcstm state machines.

This package hosts the contract surface for the diagnostics that pyfcstm.model (and, in later PRs, a static model inspector) emits. It is not a formal-verification framework — Z3-based reachability and guard-satisfiability live under pyfcstm.solver.

This package currently exposes:

  • pyfcstm.diagnostics.codes — the single source of truth for diagnostic codes (codes.yaml + the CODE_REGISTRY loader).

  • CodesSchemaError — raised on import-time failure of the loader.

Future PRs in the Layer 1 / Layer 2 work add:

  • the structured ModelDiagnostic emit pipeline in pyfcstm.model

  • a static model inspector that produces design-health warnings

  • a static simulation auditor that dry-runs speculative validation across the model

See HansBug/pyfcstm issue #103 for the migration plan and codes.yaml for the authoritative code catalog.

__all__

pyfcstm.diagnostics.__all__ = ['CODE_REGISTRY', 'CodeFieldSpec', 'CodeSpec', 'CodesSchemaError', 'DiagnosticSink', 'EventInfo', 'ForLlmSpec', 'ModelInspect', 'ModelMetrics', 'StateInfo', 'TransitionInfo', 'VariableInfo', 'inspect_model', 'load_codes']

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.