Skip to content

Add read/write roundtrip tests #19

@msto

Description

@msto

Source: Expert Software Review (2026-02-17) — Testing for Software Correctness

Description

There are no end-to-end roundtrip tests that write metrics to a file with MetricWriter and then read them back with Metric.read() to verify the data survives the full cycle. While individual read and write tests exist, a roundtrip test would catch serialization/deserialization mismatches.

Acceptance Criteria

  • Roundtrip test for simple metric (str + int fields)
  • Roundtrip test for metrics with Optional fields (None preserved)
  • Roundtrip test for metrics with list[int] fields
  • Roundtrip test for metrics with Counter[StrEnum] fields
  • Roundtrip test for empty file (header only, zero rows)

Notes

Could live in tests/test_metric_writer.py or a new tests/test_roundtrip.py.


Issue ID: ISS-003
Created from: agent_notes/issues/issues_2026-02-17_fgmetric_review.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-generatedCreated by Claude from expert reviewenhancementNew feature or requestpriority:lowLow prioritytestingTest coverage and quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions