Skip to content

[Bug] validate_frame silently accepts empty payload (size == 0) #17

@harshithabair47-pixel

Description

@harshithabair47-pixel

Summary

validate_frame() in sigflow/validators/frame.py does not
reject frames with an empty payload (size == 0), allowing
invalid frames to pass validation silently.

Reproduction

  1. Create a Frame with payload = b""
  2. Call validate_frame(frame)
  3. No ValidationError is raised

Expected Behavior

A frame with empty payload should raise ValidationError
as it carries no useful data and indicates a malformed frame.

Actual Behavior

frame.size returns 0 which passes all checks silently.

Environment

  • Python version: 3.10+
  • sigflow version: main
  • Operating system: Windows

Additional Context

frame.size is a property returning len(self.payload).
The validator checks size > max_payload but never checks
size == 0, allowing empty frames into the pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions