pyfcstm.diagnostics

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

This package hosts the contract surface for diagnostics emitted by pyfcstm.model and by inspect-based design-health analyzers. 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.

  • inspect_model() and the related inspect dataclasses used by pyfcstm / jsfcstm parity checks and design-health diagnostics.

  • DiagnosticSink for strict-mode and collect-mode diagnostic emission.

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

__all__

pyfcstm.diagnostics.__all__ = ['CODE_REGISTRY', 'ActionInfo', 'CodeFieldSpec', 'CodeSpec', 'CodesSchemaError', 'DEFAULT_DEEP_HIERARCHY_THRESHOLD', 'DEFAULT_LARGE_COMPOSITE_THRESHOLD', 'DEFAULT_VAR_TO_LEAF_RATIO_THRESHOLD', 'DiagnosticSink', 'EventInfo', 'ForcedTransitionInfo', 'ForLlmSpec', 'ModelInspect', 'ModelMetrics', 'StateInfo', 'SuggestedFixSpec', 'TransitionInfo', 'VariableInfo', 'inspect_model', 'load_codes', 'refs_with_suggested_fix', 'render_suggested_fix']

Built-in mutable sequence.

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