Orchestrata Ultimate › Tests › Reference › kernel › test_policy_evaluator
Tests reference — tests/kernel/test_policy_evaluator.py
Module of tests/kernel, split out because the directory page would be too large.
Prose pending.
tests/kernel/test_policy_evaluator.py
source · 85 tests · 1095 lines
Tests for kernel.policy_evaluator using real Prolog.
Covers: core.base.traces, kernel.policy_evaluator
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_routing_decision_values |
137 | |
| function | test_permission_level_values |
144 | |
| function | test_ownership_status_values |
151 | |
| function | test_routing_result_defaults |
163 | |
| function | test_routing_result_to_dict |
172 | |
| function | test_permission_result_defaults |
192 | |
| function | test_permission_result_to_dict |
200 | |
| function | test_ownership_result_defaults |
215 | |
| function | test_ownership_result_to_dict |
222 | |
| function | test_escalation_path_defaults |
238 | |
| function | test_escalation_path_to_dict |
245 | |
| function | test_dry_run_result_to_dict |
262 | |
| function | test_policy_audit_entry_to_dict |
276 | |
| function | test_policy_evaluation_error_is_exception |
302 | |
| function | test_policy_timeout_error |
306 | |
| function | test_policy_query_error |
314 | |
| function | test_constructor_defaults |
327 | |
| function | test_constructor_with_redis |
336 | |
| function | test_generate_cache_key_deterministic |
348 | |
| function | test_generate_cache_key_different_params |
355 | |
| function | test_local_cache_set_and_get |
366 | |
| function | test_local_cache_expires |
372 | |
| function | test_local_cache_miss |
383 | |
| function | test_redis_cache_set_and_get |
392 | |
| function | test_redis_cache_get_populates_local |
398 | |
| function | test_invalidate_cache_all |
412 | |
| function | test_invalidate_cache_pattern |
420 | |
| function | test_invalidate_cache_no_match |
429 | |
| function | test_log_audit_adds_entry |
440 | |
| function | test_get_audit_log_default_limit |
454 | |
| function | test_get_audit_log_limit |
461 | |
| function | test_get_audit_log_filter_by_query_type |
469 | |
| function | test_get_audit_log_filter_by_session_id |
477 | |
| function | test_clear_audit_log |
485 | |
| function | test_audit_log_bounded |
492 | |
| function | test_execute_sync_success |
505 | |
| function | test_execute_sync_failure_raises |
514 | |
| function | test_execute_with_timeout_success |
531 | |
| function | test_execute_with_timeout_raises_timeout |
542 | |
| function | test_execute_with_timeout_raises_query_error |
555 | |
| function | test_routing_decision_from_query_allow |
571 | |
| function | test_routing_decision_from_query_deny |
578 | |
| function | test_routing_decision_from_query_queue |
585 | |
| function | test_routing_decision_from_query_redirect |
592 | |
| function | test_routing_decision_from_query_no_solutions |
599 | |
| function | test_routing_decision_from_query_no_solutions_permissive_when_strict_false |
608 | |
| function | test_permission_level_from_query_allow |
624 | |
| function | test_permission_level_from_query_deny |
631 | |
| function | test_permission_level_from_query_require_approval |
638 | |
| function | test_permission_level_from_query_escalate |
645 | |
| function | test_permission_level_from_query_no_solutions |
652 | |
| function | test_permission_level_from_query_no_solutions_permissive_when_strict_false |
662 | |
| function | test_evaluate_routing_allow |
679 | |
| function | test_evaluate_routing_deny |
697 | |
| function | test_evaluate_routing_queue_when_recipient_offline |
706 | Real QUEUE: both volks registered, but the recipient is not |
| function | test_evaluate_routing_timeout_denies_under_strict_allows_permissive |
718 | A timeout is an ERROR outcome: strict (the default) fail-closes; |
| function | test_evaluate_routing_query_error_denies_under_strict_allows_permissive |
749 | A query error is an ERROR outcome: strict (the default) fail-closes; |
| function | test_evaluate_routing_uses_cache |
774 | |
| function | test_check_permission_allow |
790 | |
| function | test_check_permission_deny |
803 | |
| function | test_check_permission_denies_blocked_action |
810 | Real DENY via agent_action_blocked/2 (the same block predicate |
| function | test_check_permission_require_approval_for_delete |
821 | Real REQUIRE_APPROVAL: governance.pl:187 |
| function | test_check_permission_timeout_defaults_to_deny |
833 | |
| function | test_check_permission_uses_cache |
846 | |
| function | test_validate_ownership_valid |
861 | |
| function | test_validate_ownership_invalid |
876 | |
| function | test_validate_ownership_no_rule |
887 | No pam_owns fact for this component -- check_constraint/4's real |
| function | test_validate_ownership_timeout_defaults_to_invalid |
899 | |
| function | test_validate_ownership_uses_cache |
914 | |
| function | test_get_escalation_path_success |
931 | |
| function | test_get_escalation_path_security_related_escalates_to_human |
944 | Real discriminator: issue_security_related/1 (the same dynamic |
| function | test_get_escalation_path_critical_timeout |
957 | |
| function | test_get_escalation_path_low_timeout |
964 | |
| function | test_get_escalation_path_medium_severity |
971 | Real derivation for "medium" severity: escalation_target_for_severity |
| function | test_get_escalation_path_unrecognized_severity_escalates_to_human |
981 | An unrecognized severity string is a fail-safe escalation to human, |
| function | test_get_escalation_path_timeout_defaults_to_orchestrator |
990 | |
| function | test_get_escalation_path_uses_cache |
1005 | |
| function | test_dry_run_routing |
1018 | |
| function | test_dry_run_permission |
1037 | |
| function | test_dry_run_ownership |
1046 | |
| function | test_dry_run_escalation |
1052 | |
| function | test_dry_run_unknown_query_type |
1060 | |
| function | test_dry_run_logs_audit |
1068 | |
| function | test_evaluate_routing_with_session_id |
1080 | |
| function | test_check_permission_with_volk_id |
1090 |