Repository navigation
fix(checks): skip empty state streams in timestamp sync offsets (#691) - #695
Merged
kstonekuan merged 1 commit intoOct 6, 2026
Conversation
Contributor
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #691. Mirrors the empty camera guard introduced in #668 by ensuring candidate reference state streams actually have recorded timestamps (
stamps_ns.size > 0) before picking a sync reference and computing start/end offsets.Problem
When an MCAP file has summary metadata indicating messages for a non-camera topic (
message_count >= 2), but zero actual records are written to disk,timestamp_regularitypicked that empty state stream as the reference stream and crashed withIndexError: index -1 is out of bounds for axis 0 with size 0onref_stamps[-1].Changes
_timestamp_regularity_keys: Filterstate_topicsto only those whereepisode.channel(topic).timestamps.size > 0._measure_timestamp_regularity: Filterstate_topicsto only those whereper_topic[topic].stamps_ns.size > 0.max()selects the densest populated state stream instead of the empty one.tests/test_checks.py.All 2,478 tests pass and linting checks are clean.