Repository navigation
Conversation
Scalar and string fields reject a null row (`check_not_null`) and sequence elements reject null elements (#3271), but the row of a sequence (`T[]`, `T[<=N]`), fixed array (`T[N]`) or nested-message column was never checked: `ListArray::value(0)`, `BinaryArray::value(0)` and the struct's child columns ignore the row's validity bit. A producer sending `None` for such a field had it go out as whatever the null row's buffers held: an empty sequence, or masked values the producer never meant to send. Every ROS2 message member has a value, so check once in `TypedValue::serialize`'s per-member loop, before dispatching on the member type, instead of in each column-type arm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8CSx6yQ4JbrB3dqSiU2ME
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
`cargo deny check advisories` fails every PR's Audit job with `error[yanked]: detected yanked crate` for yoke-derive 0.8.3 (via url -> idna -> icu). `cargo update -p yoke-derive` moves it to 0.8.4; no other lock entry changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8CSx6yQ4JbrB3dqSiU2ME (cherry picked from commit 2132289)
|
The Audit job fails on every PR right now: Generated by Claude Code |
|
🤖 Fully automated review by Claude Code. No human checked it. I found one gap in the fix. A null element inside a sequence or array of nested messages is still published. The new check in Example: a Python node sends Suggestion: reject A compatibility note, not a blocker: with pyarrow, a Tests: with the new check in Generated by Claude Code |
Problem
When the ros2-bridge serializes a message:
check_not_null);T[],T[<=N]), fixed array (T[N]) or nested-message column was never checked.ListArray::value(0),BinaryArray::value(0)and a struct's child columns all ignore the row's validity bit. So a producer that sendsNonefor such a field, e.g. pyarrowpa.array([None], pa.list_(pa.int32())), had it published as whatever the null row's buffers held. Arrow allows a null list slot whose offsets still span values, so a nullint32[]row over[1, 2, 3]went out to ROS2 as[1, 2, 3]. A nullBinaryrow went out as its bytes, and a null nested message went out as its masked child values.Fix
Every ROS2 message member must have a value. Check once in
TypedValue::serialize's per-member loop, before dispatching on the member type: a column whose row 0 is null is rejected withfield <Msg>.<field> is null, but ROS2 messages cannot represent null. This covers every member kind, including nested messages and kinds added later, without repeating the check in each column-type arm.Validation
Class: B (behaviour change: a null row that used to be published is now an error, matching the existing scalar/string/element behaviour)
New tests, all RED without the check and GREEN with it:
sequence::tests::null_sequence_row_is_rejectedint32[]List, null row over[1,2,3]sequence::tests::null_binary_sequence_row_is_rejecteduint8[]Binaryarray::tests::null_fixed_array_row_is_rejecteduint8[3]ListandBinarytests::null_nested_message_field_is_rejectedStructEach test also asserts that the same column without the null still serializes.
cargo test -p dora-ros2-bridge-arrow: ✅ 35 passed.cargo clippy -p dora-ros2-bridge-arrow --all-targets -D warnings: ✅.cargo fmt --check: ✅.🤖 Generated with Claude Code
https://claude.ai/code/session_01R8CSx6yQ4JbrB3dqSiU2ME
Generated by Claude Code