Summary
CLI commands (parse and validate) crash with an unhandled ParseError when processing malformed or truncated input files. Instead of handling the error gracefully, the application terminates with a full Python traceback.
This contradicts the framework’s goal of handling malformed and truncated telemetry streams.
Reproduction
-
Copy a valid sample file:
copy samples\valid_telemetry.sgf broken.sgf
-
Open broken.sgf and delete part of the second frame (truncate the file)
-
Run:
python -m sigflow parse broken.sgf
-
Observe the CLI crashes with a traceback
-
Repeat:
python -m sigflow validate broken.sgf
Expected Behavior
The CLI should handle malformed or truncated input gracefully and display a structured error message (e.g., "truncated input at offset X") instead of crashing with a full traceback.
Actual Behavior
The CLI crashes with an unhandled exception:
sigflow.core.exceptions.ParseError: truncated input
A full Python traceback is displayed instead of a user-friendly error message.
Environment
- Python version: 3.13.2
- sigflow version or commit: 0.1.0 (local install from repository)
- Operating system: Windows 10
Additional Context
The error originates from sigflow/parsers/base.py where ParseError is raised when truncated input is detected.
However, CLI commands in sigflow/cli/commands.py (specifically parse_command and validate_command) do not catch this exception, allowing it to propagate and terminate the program.
This makes the CLI tools less robust for real-world telemetry pipelines where malformed inputs are expected.
Summary
CLI commands (
parseandvalidate) crash with an unhandledParseErrorwhen processing malformed or truncated input files. Instead of handling the error gracefully, the application terminates with a full Python traceback.This contradicts the framework’s goal of handling malformed and truncated telemetry streams.
Reproduction
Copy a valid sample file:
copy samples\valid_telemetry.sgf broken.sgf
Open
broken.sgfand delete part of the second frame (truncate the file)Run:
python -m sigflow parse broken.sgf
Observe the CLI crashes with a traceback
Repeat:
python -m sigflow validate broken.sgf
Expected Behavior
The CLI should handle malformed or truncated input gracefully and display a structured error message (e.g., "truncated input at offset X") instead of crashing with a full traceback.
Actual Behavior
The CLI crashes with an unhandled exception:
sigflow.core.exceptions.ParseError: truncated input
A full Python traceback is displayed instead of a user-friendly error message.
Environment
Additional Context
The error originates from
sigflow/parsers/base.pywhereParseErroris raised when truncated input is detected.However, CLI commands in
sigflow/cli/commands.py(specificallyparse_commandandvalidate_command) do not catch this exception, allowing it to propagate and terminate the program.This makes the CLI tools less robust for real-world telemetry pipelines where malformed inputs are expected.