Skip to content

Add malformed synthetic event-stream fixtures for parser regression #4

Description

@bsmensah-ctrl

Problem

The event-stream parser has good inline tests for malformed input, but contributors do not have reusable public fixtures that demonstrate the validation boundary.

Proposed change

Add a small invalid-fixture pack under fixtures/invalid/ and use it in parser regression tests.

Acceptance criteria

  • Include at least three minimal JSONL fixtures covering:
    • malformed JSON;
    • a missing or empty required string field;
    • a negative or non-integer PID/tick field.
  • Add a parametrized test that asserts the relevant InputError message for each fixture.
  • Document the invalid fixture pack in docs/FIXTURES.md, including that these files are expected to fail validation.
  • Keep every example fictional and synthetic; do not add live system data, acquisition code, or platform API access.
  • uv run --frozen pytest -q and uv run --frozen ruff check . pass.

Useful starting points

  • src/crossview_lab/simulator.py::load_event_stream
  • tests/test_simulator.py
  • docs/FIXTURES.md

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions