Skip to content

Add regression tests for start pose and Frenet XY lookup - #17

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

Add regression tests for start pose and Frenet XY lookup#17
cursor[bot] wants to merge 2 commits into
devfrom
cursor/missing-test-coverage-6791

Conversation

@cursor

@cursor cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Adds focused regression coverage for recent merged behavior that shipped without matching tests.

Risky behavior now covered

  • State.set_start / reset: profile start snapshot restores full agent state (including velocity/type), not just x/y/theta
  • BasicSim.reset: restores ego + NPC start poses and keeps agents/controllers (does not despawn)
  • executor_factory + c40_start_pose: world and stack ego both initialize from the profile start pose; empty list falls back to plan start
  • TrajectoryTracker.convert_sd_to_xy: Frenet s before path start extrapolates along the first segment instead of snapping to wp0

Test files added/updated

  • test/c10_perception/test_c11_state_start_reset.py (new)
  • test/c40_execution/test_c46_basic_sim_spawn.py
  • test/c50_common/test_c54_trajectory_waypoint_update.py
  • test/c60_apps/test_c62_factory_smoke.py

Why this reduces regression risk

These paths sit on reset/spawn, stack assembly, and Frenet geometry used by planners/controllers. Silent regressions here break simulation reset, wrong spawn velocity restore, mis-placed ego at startup, and incorrect lateral/path conversions near the trajectory start.

Validation

pytest test/c10_perception/test_c11_state_start_reset.py \
  test/c40_execution/test_c46_basic_sim_spawn.py \
  test/c50_common/test_c54_trajectory_waypoint_update.py \
  test/c60_apps/test_c62_factory_smoke.py -v

All 30 tests passed. No production code changes.

Open in Web View Automation 

cursoragent and others added 2 commits July 30, 2026 10:02
Cover State.set_start/reset, BasicSim pose restore without despawn,
factory c40_start_pose wiring, and convert_sd_to_xy extrapolation
before the path start.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
executer.ego_state aliases pm.ego_vehicle; assert distinct plant ego via world.get_ego_state().

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