Skip to content

Add regression tests for predictor sweeps, async snapshot, and harvest siblings - #20

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

Add regression tests for predictor sweeps, async snapshot, and harvest siblings#20
cursor[bot] wants to merge 3 commits into
devfrom
cursor/missing-test-coverage-439b

Conversation

@cursor

@cursor cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Adds focused regression coverage for high-risk paths that recent execution/planning work left thinly tested. Complements (does not duplicate) open draft PRs #17/#18.

Risky behavior now covered

  • Predictor-gated obstacle sweeps (precompute_obstacle_polygons): movers without SingleTrajectory stay static boxes; predicted agents sweep forward; far-behind agents are not beside-swept; just-behind agents use beside_sweep_time
  • Async combined planner worker: one get_sensor_frame per iteration shared by replan+perceive; no fetch when no stage module is active
  • stack_event harvest siblings: GlobalPlan.stack_event and localization pm.stack_event notify once then clear
  • DETECTION GT list-copy: stack clears cannot wipe world NPC lists; DETECTION-off clears stack agents only
  • update_waypoint_by_xy_forward: never moves current_wp backward; honors min_wp floor

Test files added/updated

  • test/c50_common/test_c55_collision_checking.py
  • test/c40_execution/test_c42_sensor_snapshot.py
  • test/c40_execution/test_c43_task_strategy.py
  • test/c50_common/test_c54_trajectory_waypoint_update.py

Why these tests materially reduce regression risk

These paths sit on lattice collision costs, CARLA-async sensor timing, task automation signals, GT detection isolation, and HDMap waypoint tracking. Silent regressions here produce unsafe lattice costs, stage desync on shared sensors, missed task events, despawned world NPCs, or path-index backjumps after sharp turns.

Validation

pytest test/c50_common/test_c55_collision_checking.py \
  test/c50_common/test_c54_trajectory_waypoint_update.py \
  test/c40_execution/test_c42_sensor_snapshot.py \
  test/c40_execution/test_c43_task_strategy.py -v

All 35 tests passed. No production code changes.

Open in Web View Automation 

cursoragent and others added 3 commits July 31, 2026 10:08
Cover that movers without SingleTrajectory stay static boxes, predicted
agents sweep forward, and beside/behind gates honor beside_rear_window.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Prove combined planner/perception worker fetches once per iteration and
skips get_sensor_frame when no stage module is active.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Add GlobalPlan/localization harvest notify-once tests, DETECTION GT
list-copy isolation from world NPCs, and update_waypoint_by_xy_forward
anti-backjump behavior.

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