Back to catalog

Behavior Correctness

H01 Avoid-Collision Behavior

Behavior correctness tests for BHV_AvoidCollision. These cases isolate the behavior contract: alert requests, contact information, lifecycle evidence, per-contact outputs, resolution signals, and collision-free transit.

Stem Mission

Baseline scenario context

The stem mission puts one ownship in a compact moving encounter with a synthetic contact. Unlike the app-level contact-manager harnesses, this stem focuses on what BHV_AvoidCollision requests, publishes, and resolves.

Examples

Representative runs

Head-on Resolve

Description: Starts the intruder at (70,-60) moving west at 1.2 m/s directly toward eastbound Abe; passes when contact info was received, the behavior ends with intruder resolved, Abe arrives, and collision total is zero.

No Alert Request Fail

Description: Sets no_alert_request=true while leaving the stationary intruder directly in Abe's lane; this expected-negative case passes when the behavior remains idle, CONTACT_INFO is never observed, no contact is resolved, Abe arrives, and at least one collision is recorded.

Baseline Resolve

Description: Places a stationary kayak named intruder at (30,-60), directly in Abe's eastbound lane, to exercise the stock spawned BHV_AvoidCollision; passes at the evaluation checkpoint when contact info was received, AVOIDING=end, CONTACT_RESOLVED=intruder, ARRIVED=true, and COLLISION_TOTAL=0.

Case Matrix

All cases

default_resolve_pass

Places a stationary kayak named intruder at (30,-60), directly in Abe's eastbound lane, to exercise the stock spawned BHV_AvoidCollision; passes at the evaluation checkpoint when contact info was received, AVOIDING=end, CONTACT_RESOLVED=intruder, ARRIVED=true, and COLLISION_TOTAL=0.

no_alert_request_absent_pass

Sets no_alert_request=true and moves the stationary intruder five meters off the lane to (30,-55); passes when the behavior remains idle with no resolved contact, Abe arrives, and collision total is zero.

post_per_contact_info_pass

Sets post_per_contact_info=true against the stationary on-lane intruder; when the reported range first reaches 26–27 meters, requires a closing speed of 1.9–2.3 m/s, then passes when the behavior resolves intruder, Abe arrives, and collision total remains zero.

behavior_filter_absent_pass

Sets match_type=submarine while the off-lane intruder is a kayak, exercising the behavior-owned type filter; passes when the behavior remains idle with no resolved contact, Abe arrives, and collision total is zero.

head_on_resolve_pass

Starts the intruder at (70,-60) moving west at 1.2 m/s directly toward eastbound Abe; passes when contact info was received, the behavior ends with intruder resolved, Abe arrives, and collision total is zero.

pwt_outer_too_small_fail

Shrinks the relevance distances to pwt_outer_dist=5, pwt_inner_dist=2, min_util_cpa_dist=1, and max_util_cpa_dist=3 against the baseline on-lane intruder; this expected-negative case first requires the spawned behavior to receive contact info and run, then passes when the on-lane collision occurs before the deadline.

pwt_grade_quadratic_pass

Sets pwt_grade=quadratic against the baseline on-lane intruder, exercising quadratic relevance shaping; passes when contact info was received, the behavior ends with intruder resolved, Abe arrives, and collision total is zero.

pwt_grade_quasi_pass

Sets pwt_grade=quasi against the baseline on-lane intruder, exercising quasi relevance shaping; passes when contact info was received, the behavior ends with intruder resolved, Abe arrives, and collision total is zero.

use_refinery_pass

Sets use_refinery=true, check_plateaus=true, and verbose=true against the baseline on-lane intruder; passes when the active spawned behavior publishes a successful plateau check and non-none refinery logic case before its 60-second missing-diagnostic deadline, with contact info received and no collision at that branch checkpoint.

contact_type_required_absent_pass

Uses the legacy contact_type_required=submarine alias while the off-lane intruder is a kayak; passes when the behavior remains idle with no resolved contact, Abe arrives, and collision total is zero.

no_alert_request_fail

Sets no_alert_request=true while leaving the stationary intruder directly in Abe's lane; this expected-negative case passes when the behavior remains idle, CONTACT_INFO is never observed, no contact is resolved, Abe arrives, and at least one collision is recorded.

bad_pwt_grade_fail

Sets the unsupported pwt_grade=banana; this expected-negative case passes only when the bridged IVPHELM_STATE value is exactly MALCONFIG before the 18-second deadline.

bad_completed_dist_fail

Sets completed_dist=-1; this expected-negative case passes only when the bridged IVPHELM_STATE value is exactly MALCONFIG before the 18-second deadline.

bad_time_on_leg_fail

Sets inherited time_on_leg=-1; this expected-negative case passes only when the bridged IVPHELM_STATE value is exactly MALCONFIG before the 18-second deadline.

bad_decay_fail

Sets the inherited contact decay window to 30,20, placing the stale threshold below the linear threshold; this expected-negative case passes only when the bridged IVPHELM_STATE value is exactly MALCONFIG before the 18-second deadline.

bad_collision_depth_fail

Sets collision_depth=2 in a course/speed-only IvP domain; this expected-negative case passes only when the bridged IVPHELM_STATE value is exactly MALCONFIG before the 18-second deadline.

Source links

Harness README Mission README