Skip to content

Add regression tests for HD-map chopping, plan load validation, and FTG safety - #39

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

Add regression tests for HD-map chopping, plan load validation, and FTG safety#39
cursor[bot] wants to merge 3 commits into
devfrom
cursor/missing-test-coverage-1a44

Conversation

@cursor

@cursor cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Risky behavior now covered

  1. OpenDRIVE lane-sign path chopschop_path / chop_path_from_two_sides reverse positive-id lanes and slice start/goal indexes. A regression here emits a reversed or truncated HD-map global path. _inset_d and smoothen_path_savgol keep corridor bounds and velocity samples aligned.
  2. GlobalPlan file validation and zero-start rampis_loadable rejects missing keys, empty arrays, nested bounds, and non-JSON. from_file replaces velocity[0] <= 0 with c20_min_ramp_start_velocity so a stored 0-speed first waypoint does not pin the ego at a standstill.
  3. Follow-the-Gap safety filters — 3D z-band discard, footprint bubble, no-forward / all-in-bubble zero command, and preferring a narrow interior corridor over wider ±90° edge openings.
  4. GoalArrivalMonitor missing-goal guards — no local planner, missing/short goal_point, and reset() re-arming the rising edge so a false GOAL_ARRIVED cannot stop the run.

Test files added/updated

  • test/c20_planning/test_c24_global_hdmap_planners.py (added)
  • test/c20_planning/test_c21_planning_model.py (added)
  • test/c30_control/test_c35_pure_pursuit.py (updated)
  • test/c40_execution/test_c47_execution_tasks.py (added)

Why these tests materially reduce regression risk

These are shared, high-blast-radius surfaces that landed on dev without dedicated tests: HD-map route geometry, stored global-plan ingest, LiDAR steering safety, and goal-stop event gating. They were not claimed by open coverage/bugfix drafts #17/#20/#22#38.

Validation

PYTHONPATH=/workspace python3 -m pytest \
  test/c20_planning/test_c21_planning_model.py \
  test/c20_planning/test_c24_global_hdmap_planners.py \
  test/c30_control/test_c35_pure_pursuit.py \
  test/c40_execution/test_c47_execution_tasks.py -q

41 passed. Deterministic unit tests; no slow / requires_data markers.

Open in Web View Automation 

cursoragent and others added 3 commits August 17, 2026 05:08
…TG safety.

Cover untested OpenDRIVE lane-sign path chops, GlobalPlan is_loadable/from_file
velocity ramping, Follow-the-Gap z-band/bubble/interior-gap guards, and
GoalArrivalMonitor missing-planner/goal edges.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
…ompare.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
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