Description
The replay command crashes when executed on a malformed telemetry stream (samples/malformed_frame.sgf) instead of handling the parsing failure gracefully.
Instead of returning a structured diagnostic or user-friendly error message, the CLI terminates with an unhandled traceback.
Root Cause Analysis
The issue appears to originate in the replay workflow where Engine().process(data) raises a ParseError that is not caught.
Traceback path:
sigflow/cli/commands.py -> replay_command() -> Engine().process() -> parser.parse()
Specifically:
sigflow/parsers/base.py
require() raises:
ParseError("truncated input", offset=offset)
This exception propagates upward without being handled inside the CLI replay command.
Steps to Reproduce
- Clone the repository
- Install dependencies
- Run:
python -m sigflow replay samples/malformed_frame.sgf
Actual Behavior
The command crashes with an unhandled exception:
sigflow.core.exceptions.ParseError: truncated input
Expected Behavior
The CLI should handle malformed input gracefully by:
- showing a structured diagnostic message, or
- returning a controlled error message without a full traceback
Example:
error: malformed stream - truncated input at offset X
Impact
This affects reliability and usability of the replay workflow, especially since the framework is intended to process malformed or forensic telemetry streams. A malformed sample file causing a CLI crash can interrupt automation or debugging pipelines.
Description
The
replaycommand crashes when executed on a malformed telemetry stream (samples/malformed_frame.sgf) instead of handling the parsing failure gracefully.Instead of returning a structured diagnostic or user-friendly error message, the CLI terminates with an unhandled traceback.
Root Cause Analysis
The issue appears to originate in the replay workflow where
Engine().process(data)raises aParseErrorthat is not caught.Traceback path:
sigflow/cli/commands.py -> replay_command() -> Engine().process() -> parser.parse()Specifically:
sigflow/parsers/base.pyrequire()raises:This exception propagates upward without being handled inside the CLI replay command.
Steps to Reproduce
pip install -e ".[dev]"Actual Behavior
The command crashes with an unhandled exception:
Expected Behavior
The CLI should handle malformed input gracefully by:
Example:
Impact
This affects reliability and usability of the replay workflow, especially since the framework is intended to process malformed or forensic telemetry streams. A malformed sample file causing a CLI crash can interrupt automation or debugging pipelines.