Back to catalog

Behavior Correctness

H01 TestFailure Behavior

Behavior correctness tests for BHV_TestFailure. These cases verify completion-triggered burn and hang stalls, default/malformed/negative/zero burn timing, crash/default-crash process loss, and an armed baseline that must not complete.

Examples

Representative runs

Burn Gap Detection

Description: Sets failure_type=burn,2.0, waits until pHelmIvP is publishing monitored iteration gaps, then completes the behavior and enters its busy loop; passes when the cached gap is between 16 and 24 times the selected warp before the observation deadline, TEST_FAILURE_DONE=true, and all watched processes remain present.

Crash Process Loss

Description: Completes immediately with failure_type=crash, triggering the behavior's assertion; the harness passes with expected=process_loss when pHelmIvP disappears, process-watch health becomes false, and load breach count is zero.

Case Matrix

All cases

baseline_armed_no_trigger_pass

Arms failure_type=burn,0 behind duration=50 and evaluates at eight seconds, before completion; passes while pHelmIvP remains healthy, load breach count is zero, and TEST_FAILURE_DONE remains false.

burn_gap_detected_pass

Sets failure_type=burn,2.0, waits until pHelmIvP is publishing monitored iteration gaps, then completes the behavior and enters its busy loop; passes when the cached gap is between 16 and 24 times the selected warp before the observation deadline, TEST_FAILURE_DONE=true, and all watched processes remain present.

hang_alias_gap_detected_pass

Uses failure_type=hang,2.0 under the same monitored completion fixture, testing that hang selects the burn loop rather than the crash path; passes on the same two-second gap band, the completion endflag, and preserved process health.

burn_default_time_gap_pass

Uses failure_type=burn with no time field, leaving the constructor's burn target at 3; passes when the cached gap is between 26 and 36 times the selected warp, the endflag fires, and all watched processes remain present.

burn_malformed_time_default_gap_pass

Uses failure_type=burn,not_a_number, which leaves the three-second default target unchanged because the suffix is not numeric; passes on the same three-second gap band, completion, and process-health evidence as the omitted-time case.

burn_negative_time_complete_pass

Uses failure_type=burn,-1, causing the completion loop's elapsed-time test to succeed immediately; passes when TEST_FAILURE_DONE=true, all watched processes remain present, and load breach count stays zero.

burn_zero_complete_pass

Uses failure_type=burn,0, exercising the zero-duration completion loop; passes when TEST_FAILURE_DONE=true, all watched processes remain present, and load breach count stays zero.

crash_on_complete_fail

Completes immediately with failure_type=crash, triggering the behavior's assertion; the harness passes with expected=process_loss when pHelmIvP disappears, process-watch health becomes false, and load breach count is zero.

unknown_type_default_crash_fail

Sets failure_type=unsupported_mode, which is accepted without changing the constructor's default crash mode; the harness passes with expected=process_loss when pHelmIvP disappears, process-watch health becomes false, and load breach count is zero.

Source links

Harness README Mission README