Files
Jordan Ritter 5cfb6ac717 test(showcase/langgraph-typescript): make watchdog tests genuinely gate
The watchdog test cluster in test_entrypoint_watchdog.py had three soundness
defects that let tests pass without exercising real behavior.

1. test_size_pid_reaped_by_in_subshell_trap asserted the literal
   trap kill $SIZE_PID string, which exists ONLY in an explanatory comment
   describing the old design. The shipped code registers
   trap _reap_watchdog_children EXIT, so the test passed even when the real
   trap registration was removed. Now asserts the shipped registration on an
   executable (comment-stripped) line and that the named handler is defined.

2. test_size_pid_reaped_on_watchdog_exit_behavioral wrote its own mock
   watchdog using the older SIZE_PID trap shape and never invoked shipped
   code, so it passed even when the shipped reaper was gutted. Now extracts
   the real _agent_descendants and _reap_watchdog_children definitions
   verbatim from entrypoint.sh and drives them with the shipped order.

3. dummy_was_killed used a single-shot dummy.poll() immediately after the
   run returned, racing the asynchronous SIGKILL delivery. Replaced with
   bounded _wait_process_exited / _assert_still_alive helpers selected by
   return code, making the killed/alive assertion deterministic.

entrypoint.sh unchanged. 22 passed; determinism confirmed by repeated runs.
2026-07-13 11:15:25 -07:00
..