Orchestrata Ultimate › Tests › Reference › scripts › test_session_start_hooks

Tests reference — tests/scripts/test_session_start_hooks.py

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

Prose pending.

tests/scripts/test_session_start_hooks.py

source · 10 tests · 256 lines

Tests for the six non-gating hooks — the SessionStart four, the Stop

Kind Name Line Description
function test_an_inert_hook_exits_zero_on_any_payload 106 A Stop hook that exits non-zero interferes with turn completion; it is
function test_an_inert_hook_emits_no_permission_decision 118 These run on lifecycle events where a permission decision is
function test_a_mutating_hook_is_syntactically_valid_bash 133 bash -n parses without executing. It catches the crash class — an
function test_a_mutating_hook_cannot_fail_the_session 149 Every exit in these must be 0. A SessionStart hook that exits non-zero
function test_a_non_gating_hook_exists_and_is_registered 169 RUL-023: a hook nothing invokes is not a delivery.
function test_a_non_gating_hook_is_not_registered_as_a_permission_gate 179 These belong on lifecycle events. Registered under PreToolUse they would
function test_the_codebase_map_exists_and_is_substantial 200 CLAUDE.md @imports this file into every session and every subagent, and
function test_the_on_demand_tier_is_populated_not_just_headers 210 Measured 2026-08-08: this file was found at 452 bytes — ten section
function test_the_two_tier_split_is_intact 232 The map is deliberately two-tier: the @imported header, plus a
function test_the_full_skeleton_is_not_imported_into_context 246 A bare @import of the full tier is the regression that killed the