Skip to content

Add regression tests for LiDAR hits, CV/FastBEV perception, and control dual-write - #31

Draft
cursor[bot] wants to merge 3 commits into
devfrom
cursor/missing-test-coverage-bb6f
Draft

Add regression tests for LiDAR hits, CV/FastBEV perception, and control dual-write#31
cursor[bot] wants to merge 3 commits into
devfrom
cursor/missing-test-coverage-bb6f

Conversation

@cursor

@cursor cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Adds focused regression coverage for high-risk paths that remained untested on dev, while avoiding duplication of open drafts #17/#20/#22#30.

Risky behavior now covered

  • BasicSim LiDAR raycasting: empty scenes; forward hits on boundary walls and agent BB near faces; misses beyond c46_lidar_range; nearest-hit selection when wall and agent both intersect a ray
  • ConstantVelocityPrediction.predict: empty-agent clear; horizon/heading extrapolation keyed by agent_id; None perception model raises
  • FastBEVLidarDetection.detect: gap > mu splits clusters; diagonal outside [delta_min, delta_max] dropped; edge-on/collinear clusters get default L/W boxes pushed away from ego; 3D z-band filter clears/accepts points
  • VisualizerApp.apply_world_control: after world/stack ego split, Control Step/Steer advances the plant then copies into pm.ego_vehicle in place

Test files added/updated

  • test/c40_execution/test_c46_basic_sim_lidar.py (new)
  • test/c10_perception/test_c15_constant_velocity_prediction.py (new)
  • test/c10_perception/test_c15_fast_bev_detection.py (new)
  • test/plugins/test_p60_visualizer_tk/test_p61_apply_global_plan.py

Why these tests materially reduce regression risk

BasicSim LiDAR feeds FTG, FastBEV, and lidar localization in the default sim bridge—silent ray math bugs corrupt every LiDAR consumer. Constant-velocity prediction is the default predictor in bundled profiles; wrong horizon/heading changes lattice and velocity collision sweeps. FastBEV is the active detector in perception.yaml with complex segmentation/MBR edge cases. apply_world_control is the merged fix path for Control Step/Steer desync after the world/stack ego split.

Validation

pytest \
  test/c40_execution/test_c46_basic_sim_lidar.py \
  test/c10_perception/test_c15_constant_velocity_prediction.py \
  test/c10_perception/test_c15_fast_bev_detection.py \
  test/plugins/test_p60_visualizer_tk/test_p61_apply_global_plan.py -v

All 17 tests passed. No production code changes.

Open in Web View Automation 

cursoragent and others added 3 commits August 5, 2026 10:06
Cover empty scenes, boundary and agent BB hits, range misses, and
nearest-hit selection so silent ray math regressions fail fast.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Lock down the default predictor horizon/heading math and FastBEV
segmentation, diagonal gating, edge-on default boxes, and z-band filter.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Regression coverage for Control Step/Steer after the world/stack ego
split: plant advances then pm.ego_vehicle is copied in place.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant