Skip to content

replay command crashes with unhandled ParseError on malformed input #11

@Pragathi04-k

Description

@Pragathi04-k

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

  1. Clone the repository
  2. Install dependencies
pip install -e ".[dev]"
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions