Orchestrata Ultimate › Tests › Reference › scripts › test_force_test_observation
Tests reference — tests/scripts/test_force_test_observation.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_force_test_observation.py
source · 18 tests · 327 lines
Tests for .claude/hooks/force-test-observation.sh — the PreToolUse(Bash)
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_pytest_without_the_observer_is_denied |
75 | Rule 1: a real invocation with no live-observer plugin is blind. |
| function | test_observed_but_foreground_is_denied |
80 | Rule 2: the plugin makes a run observABLE; running it in the foreground |
| function | test_suite_runner_in_foreground_is_denied |
87 | The suite runners inject the observer themselves, so rule 1 exempts |
| function | test_bash_c_payload_is_not_a_hiding_place |
93 | -c wraps CODE, so the quote mask must not launder an invocation |
| function | test_mentions_are_not_invocations |
119 | A command that merely NAMES pytest — searching for it, formatting the |
| function | test_correctly_observed_background_run_is_allowed |
132 | The sanctioned form must pass, or the ruling is unfollowable. |
| function | test_observer_passed_as_a_quoted_runner_arg_is_allowed |
141 | The streaming runner takes the plugin as quoted -a= arguments. The |
| function | test_heredoc_bodies_are_data_not_shell_structure |
174 | A heredoc body is a payload, not shell code. |
| function | test_heredoc_fed_to_a_shell_is_still_an_execution_context |
185 | Masking heredoc bodies must not open an escape hatch: a body piped into |
| function | test_innocuous_commands_are_allowed |
192 | |
| function | test_unbalanced_quote_does_not_crash_or_leak |
196 | A command with an unterminated quote must still be graded, not error — |
| function | test_unparseable_payload_is_denied_not_allowed |
232 | A guard that cannot read its input must refuse, never wave through. |
| function | test_a_payload_without_the_field_still_allows |
247 | Fail-CLOSED must not mean fail-ALWAYS. A well-formed payload that |
| function | test_no_guard_hook_depends_on_jq |
255 | jq is not a declared dependency of this repo and was absent from the CI |
| function | test_a_run_in_another_repo_is_not_asked_for_this_repos_plugin |
279 | The observer plugin is a module IN THIS REPO, so requiring it of a run |
| function | test_a_foreign_repo_run_must_still_be_backgrounded |
296 | Scoping the PLUGIN rule must not weaken the ruling itself. Waiting |
| function | test_this_repos_runs_still_require_the_observer |
306 | The scope fix must not become an escape hatch for THIS suite. |
| function | test_hook_is_registered_as_a_bash_pretooluse_hook |
315 | RUL-023: a hook nothing invokes is not a delivery. |