Orchestrata Ultimate › Tests › Reference › scripts › test_reap_orphan_waiters

Tests reference — tests/scripts/test_reap_orphan_waiters.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_reap_orphan_waiters.py

source · 10 tests · 471 lines

Tests for .claude/hooks/reap-orphan-waiters.sh — the SessionStart cleanup

Kind Name Line Description
function test_an_orphaned_non_shell_quoting_a_loop_is_not_reaped 246 T1 — the incident's first victim: pid 930286 was a live agent
function test_a_waiter_whose_parent_is_alive_is_not_reaped 272 T2 — the incident's second half: pids 931060/931062 were a LIVE
function test_an_orphaned_shell_loop_past_the_age_gate_is_reaped 322 T3 — the whole point: an immortal loop whose launcher is GONE is
function test_the_default_adopter_set_does_not_claim_arbitrary_parents 341 T4 — with no $ORPHAN_WAITER_ADOPTER_PIDS override the adopter set is
function test_only_pids_scopes_the_sweep 360 T5 — the R3 test seam: a qualifying orphan whose pid is NOT in
function test_sh_and_bash_ec_payload_variants_are_reaped 381 T6 — R1's shell set and flag shape: sh -c and bash -ec
function test_the_reaper_never_gates_the_session 406 A SessionStart hook that can fail the session is worse than the leak.
function test_a_young_waiter_is_left_alone 416 A waiter younger than the age gate may belong to a LIVE agent.
function test_a_loop_without_sleep_or_empty_body_is_not_matched 438 while read line processing terminates on its own and must be spared.
function test_hook_is_registered_at_session_start 460 RUL-023: a hook nothing invokes is not a delivery.