Orchestrata Ultimate › Tests › Reference › scripts › test_workflow_default_sonnet

Tests reference — tests/scripts/test_workflow_default_sonnet.py

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

Prose pending.

tests/scripts/test_workflow_default_sonnet.py

source · 18 tests · 354 lines

Tests for .claude/hooks/workflow-default-sonnet.sh — the PreToolUse(Workflow)

Kind Name Line Description
function test_unspecified_model_is_blocked 100 Every call site that omits model must block — this is the whole
function test_block_message_names_the_offending_label 110 A block that does not say WHICH call is unspecified is unactionable in a
function test_block_message_offers_both_tiers 125 The remedy must not read as 'always Sonnet' — the rule is 'state the
function test_mixed_script_blocks_on_the_single_omission 135 One unspecified call among many specified ones still blocks: a partially
function test_script_path_is_read_when_script_is_absent 152 Iterating on a persisted workflow uses scriptPath; the guard must
function test_explicit_model_is_allowed 192 Naming ANY tier satisfies the hook. It forbids the silent inherit, not
function test_agent_mentioned_in_prose_is_not_a_call_site 222 A workflow script talks ABOUT agents constantly — in its meta
function test_prose_mention_does_not_mask_a_real_call 238 The masking must not become a way to smuggle a real call past the guard.
function test_call_inside_a_template_interpolation_is_still_graded 250 ${...} is code again, so an unspecified call nested in a template
function test_script_without_any_agent_call_is_allowed 266
function test_resume_is_allowed_even_when_unspecified 272 A resume replays cached (prompt, opts) pairs; changing opts busts the
function test_named_predefined_workflow_is_allowed 282 A saved workflow invoked by name carries no inline script for the hook to
function test_other_tools_pass_silently 291
function test_malformed_input_fails_open 307
function test_unreadable_script_path_fails_open 313
function test_hook_is_registered_as_a_workflow_pretooluse_hook 324
function test_hook_is_executable 340
function test_build_shaped_agent_definitions_declare_sonnet 345 The other half of the same policy: the Agent path must not regress to