Repository navigation
fix(checks): withhold state measurements for empty vectors - #735
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
👋 Hi @Lohith248 — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Before starting an issue, check its sidebar for an assignee or a linked pull request. Either one means somebody is already on it; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
[Medium impact] The PR appears safe to merge; no actionable issues were found.
|
kstonekuan
left a comment
There was a problem hiding this comment.
LGTM, merging. Thanks for the fix.
Summary
Empty selected state arrays crash
joint_discontinuityandidle_fraction, or produce false stationary/frozen evidence in the trajectory and integrity checks. All five checks now return only their sample count and no intervals for these inputs.ROS JointState permits empty state arrays. Unlike #666's zero-message case, these channels contain messages but no components in the selected field. The patch adds one parametrized regression using real MCAP messages and updates the public docstrings.
Evidence
tests/test_checks_nan_failopen.py::test_empty_position_vectors_withhold_motion_measurementsfail against unmodified main at6cf6e98.After: all five pass. A separate real-MCAP comparison confirms identical results for genuinely stationary positions across all five checks.
uv run --locked pytest tests/test_checks_nan_failopen.py tests/test_checks.py -q: 107 passed.uv run --locked pytest -q -n 4 -rs: 2,557 passed, 8 skipped on Python 3.14.8. Skips require opt-in network access, MediaPipe/model assets, Docker, or a live bucket.uv run --python 3.11 --locked pytest tests/test_checks_nan_failopen.py -q: 9 passed on Python 3.11.17 in a separate environment.uv run --locked ruff check --fix,uv run --locked ruff format, anduv run --locked ty check: passed.Validation used WSL Ubuntu 22.04, GCC 11.4.0, and verified FFmpeg/ffprobe 8.1 binaries on PATH.
Merge Danger
Door: two-way.
Reverting restores the previous check behavior without a data migration.
Blast Radius: checks.
Only selected arrays with no components take the new return paths. Public signatures, dependencies, schemas, and transform bytes are unchanged. Applications own their check versions; no transform behavior-version bump is needed.
Need help on this PR? Tag
@codesmith-botwith what you need.