Skip to content

Add runtime validation for ROS 2 message dataclasses#74

Draft
siliconlad wants to merge 2 commits intomainfrom
implement-validation-for-message-creation
Draft

Add runtime validation for ROS 2 message dataclasses#74
siliconlad wants to merge 2 commits intomainfrom
implement-validation-for-message-creation

Conversation

@siliconlad
Copy link
Owner

Summary

  • add runtime validators that enforce scalar ranges, constant values, and array shapes when ROS 2 dataclasses are constructed
  • switch the generated ROS 2 message modules to use the validated dataclass helper
  • add regression tests that exercise the new validation checks

Testing

  • uvx pre-commit run -a
  • uv run --group test pytest . (fails: tests/test_mcap_reader.py::test_reverse_order_messages[without_chunks], tests/test_mcap_reader.py::test_random_order_messages_from_pybag[without_chunks], tests/test_mcap_reader.py::test_random_order_messages_from_pybag[with_chunks], tests/test_mcap_reader.py::test_random_order_messages_from_official_mcap[with_chunks])

https://chatgpt.com/codex/tasks/task_e_68d06dcb2868832d9a8c85e102d3dc38

@siliconlad siliconlad self-assigned this Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant