claude-print/tests
jedarden 54834e5070 feat(bf-2f5): add comprehensive watchdog timeout mechanism
- Add Watchdog module with 4 timeout types:
  * PTY first-output timeout (90s default)
  * Stream-json first-output timeout (90s default)
  * Overall session timeout (3600s default)
  * Stop hook watchdog timeout (120s default)
- Timeout thread monitors child and sends SIGTERM on deadline
- Main thread detects timeout, kills child (SIGTERM→SIGKILL), exits non-zero (code 3)
- Clear diagnostics to stderr with specific timeout descriptions
- CleanupGuard ensures temp dir/FIFO removal on all exit paths
- Add CLI flags: --timeout, --first-output-timeout, --stream-json-timeout, --stop-hook-timeout
- Integration tests verify timeout fires and cleanup succeeds

This prevents indefinite hangs regardless of why child wedges.

Bead-Id: bf-2f5
2026-06-25 06:59:23 -04:00
..
fixtures Add Phase 9: NEEDLE integration — install.sh, claude-print.yaml, --check subcommand 2026-06-10 01:36:28 -04:00
integration Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
cli.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
emitter.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
hooks.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
integration.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
pty_integration.rs Implement Phase 6: Stop Poller (bf-64s) 2026-06-10 00:05:14 -04:00
startup.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
stop_poller.rs Implement Phase 6: Stop Poller (bf-64s) 2026-06-10 00:05:14 -04:00
terminal.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
transcript.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
version_compat.rs Add bf-5nr validation notes: claude-print-ci WorkflowTemplate YAML is valid 2026-06-10 02:11:37 -04:00
watchdog.rs feat(bf-2f5): add comprehensive watchdog timeout mechanism 2026-06-25 06:59:23 -04:00