Orchestrata Ultimate › Tests › Reference › scripts › test_forbidden_doubles_stop

Tests reference — tests/scripts/test_forbidden_doubles_stop.py

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

Prose pending.

tests/scripts/test_forbidden_doubles_stop.py

source · 22 tests · 461 lines

Tests for .claude/hooks/forbidden-doubles-stop.sh — the Stop hook that

Kind Name Line Description
function test_a_real_double_is_reminded 88 The whole point of the hook. Every exemption below must leave these
function test_naming_the_gate_is_not_proposing_a_double 116 Measured 2026-08-06: the hook fired on MOCK_IMPORT and on
function test_exemption_does_not_launder_a_real_double 127 The closed list must not become a way to smuggle one past: enforcement
function test_loop_protection_stays_silent 138 When the turn is already a continuation triggered by this hook, it must
function test_clean_turn_is_silent 147
function test_missing_transcript_is_silent 156 A hook that errors must not become a hook that nags every turn.
function test_malformed_input_is_silent 174
function test_hook_is_registered_as_a_stop_hook 188 RUL-023: a hook nothing invokes is not a delivery.
function test_naming_the_defect_is_not_proposing_a_double 227 Describing the anti-pattern is not proposing a double.
function test_defect_name_exemption_is_span_scoped_not_sentence_scoped 234 The tighter scoping that keeps the new exemption honest: unlike the
function test_defect_name_exemption_does_not_cover_a_bare_fake 245 The exemption requires the OUTCOME word. Faking a COMPONENT still fires.
function test_double_written_into_python_blocks_despite_innocent_prose 322 The artifact outranks the description. The closing prose says the work
function test_double_written_in_an_earlier_message_of_the_turn_still_blocks 332 A turn writes files early and summarizes last. Scanning only the final
function test_double_named_in_a_prose_file_does_not_block 348 Scoped to .py on purpose: contracts, specs and wiki pages quote
function test_clean_python_write_does_not_block 358 The artifact signal must not fire on ordinary code.
function test_naming_a_double_you_are_removing_is_not_proposing_one 382 Reporting a deletion must not read as a proposal.
function test_removal_exemption_does_not_launder_an_added_double 389 An additive verb between the removal verb and the double cancels it.
function test_removal_exemption_is_window_scoped_not_sentence_scoped 403 A removal verb far from the double does not reach it.
function test_a_bare_double_with_no_removal_verb_still_fires 418 The exemption requires the removal context; absence still fires.
function test_a_state_verb_is_not_a_removal_verb 423 gone / hiding / hid must NOT exempt.
function test_naming_the_banned_library_enforcer_is_not_proposing_a_double 443 The banned-LIBRARY half of the policy has enforcement identifiers too.
function test_banned_library_exemption_does_not_launder_the_next_sentence 456 Enforcement talk in one sentence does not license a double in the next.