Orchestrata Ultimate › Tests › Reference › claude › test_start_ast_daemon_hook

Tests reference — tests/claude/test_start_ast_daemon_hook.py

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

Prose pending.

tests/claude/test_start_ast_daemon_hook.py

source · 14 tests · 553 lines

Tests for .claude/hooks/start-ast-daemon.sh — the SessionStart AST-daemon

Kind Name Line Description
function test_hook_bash_syntax_ok 142
function test_branch1_deployed_daemon_answering_starts_nothing 149 A daemon already serving this repo from under the prefix: the hook
function test_branch2_replaces_a_working_tree_daemon 176 A daemon from the checkout's own scripts/ast_daemon.py (code_root
function test_branch2_cold_start_runs_the_deployed_unit 207 Nothing on the socket: the hook starts the unit instance and the
function test_branch2_is_idempotent_when_run_twice 234 A second SessionStart finds the deployed daemon and starts nothing
function test_branch3_no_deployment_prints_one_line_and_spawns_nothing 248
function test_failed_unit_start_never_blocks_the_session 270 The unit loads but its start fails (no .git in the repo trips the
function test_hook_never_signals_the_session_that_runs_it 315 ADR-0067 (P4): a /health answer whose pid is THIS test process (as when a harness
function test_hook_refuses_to_signal_a_process_that_is_not_an_ast_daemon 333 ADR-0067 (P4): a pid whose argv is plainly not the daemon script is
function test_hook_refuses_a_process_whose_argv_only_mentions_the_daemon_test_path 352 ADR-0067 (P4 fix round 3, N1): identity is an argv ELEMENT, not a
function test_hook_accepts_the_units_main_pid_without_an_ast_daemon_argv 467 ADR-0067 (P4 fix round 4): the pid-identity check's MainPID branch. The
function test_hook_refuses_a_pid_that_is_neither_the_main_pid_nor_an_ast_daemon 488 ADR-0067 (P4 fix round 4): the same running unit, but its /health names a
function test_socket_answering_without_identity_is_left_alone 515 ADR-0067 (P4): a reply without code_root/pid is left alone.
function test_unloadable_template_kills_nothing 528 ADR-0067 (P4): pre-flight runs BEFORE the kill: with no loadable unit template the