diff --git a/common/libcommon.a b/common/libcommon.a index 4d6caf57c3..bf31ea76ab 100644 Binary files a/common/libcommon.a and b/common/libcommon.a differ diff --git a/common/params_pyx.so b/common/params_pyx.so index 843e603dcd..01fa36244c 100755 Binary files a/common/params_pyx.so and b/common/params_pyx.so differ diff --git a/scripts/speed_limit_vision/test_review_pipeline.py b/scripts/speed_limit_vision/test_review_pipeline.py index efa8dfd6e9..d310ba7ed9 100644 --- a/scripts/speed_limit_vision/test_review_pipeline.py +++ b/scripts/speed_limit_vision/test_review_pipeline.py @@ -1,5 +1,7 @@ import importlib.util +import pytest + from argparse import Namespace from pathlib import Path @@ -219,3 +221,17 @@ def test_corrected_bbox_regenerates_classifier_crop(tmp_path): assert crop is not None and crop.shape[:2] == (72, 96) assert crop.mean() > 150 assert crop_bbox == "52,14,148,86" + + +def test_corrected_bbox_requires_readable_source_frame(tmp_path): + row = { + "record_key": "missing-corrected-box-frame", + "frame_path": str(tmp_path / "missing-frame.jpg"), + "crop_path": str(tmp_path / "original-crop.jpg"), + "bbox": "0,0,20,20", + "crop_bbox": "0,0,24,24", + "review_bbox": "60,20,140,80", + } + + with pytest.raises(RuntimeError, match="unreadable frame"): + import_queue.corrected_classifier_crop(row, tmp_path, overwrite=False)