Orchestrata Ultimate › Tests › Reference › kernel › test_policy_evaluator_extended
Tests reference — tests/kernel/test_policy_evaluator_extended.py
Module of tests/kernel, split out because the directory page would be too large.
Prose pending.
tests/kernel/test_policy_evaluator_extended.py
source · 24 tests · 574 lines
Covers: core.base.traces, infra.prolog_bridge, kernel.policy_evaluator
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_redis_cache_get_failure |
103 | Cover exception handler in _get_cached when Redis raises. |
| function | test_redis_cache_set_failure |
122 | Cover exception handler in _set_cached when Redis raises. |
| function | test_routing_decision_from_query_missing_key |
147 | When Prolog solution omits Decision key, default to ALLOW. |
| function | test_routing_decision_from_query_empty_solutions_success_true |
155 | F2: success=True but solutions empty is still "no policy result" — |
| function | test_evaluate_routing_queue |
181 | Evaluate routing returns a real QUEUE decision: both volks |
| function | test_permission_level_from_query_missing_key |
197 | When Prolog solution omits Level key, default to ALLOW. |
| function | test_permission_level_from_query_empty_solutions_success_true |
207 | F2: success=True but solutions empty is still "no policy result" — |
| function | test_check_permission_require_approval |
226 | Check permission returns a real REQUIRE_APPROVAL: governance.pl's |
| function | test_check_permission_query_error_defaults_to_deny |
238 | Cover PolicyQueryError handler in _execute_permission_query. |
| function | test_validate_ownership_empty_owner_string |
259 | Cover empty-owner branch in validate_ownership: check_constraint/4's |
| function | test_validate_ownership_success_true_empty_solutions |
271 | When success=True but solutions empty, default to valid. |
| function | test_validate_ownership_query_error |
286 | Cover PolicyQueryError handler in validate_ownership. |
| function | test_get_escalation_path_query_error |
305 | Cover PolicyQueryError handler in get_escalation_path. |
| function | test_get_escalation_path_unknown_severity |
320 | Unknown severity falls back to default 300s timeout (the Python |
| function | test_get_escalation_path_success_true_empty_solutions |
333 | When success=True but solutions empty, default to Orchestrator. |
| function | test_dry_run_sync_failure |
362 | Cover exception handler in dry_run when _execute_sync raises. |
| function | test_get_audit_log_combined_filters |
380 | Filter by both query_type and session_id simultaneously. |
| function | test_evaluate_routing_cache_hit_with_metadata |
398 | Cache hit restores redirect_to, queue_priority, and metadata. |
| function | test_check_permission_cache_hit_with_full_fields |
426 | Cache hit restores required_approvers and constraints. |
| function | test_validate_ownership_cache_hit_with_full_fields |
452 | Cache hit restores owner, delegated_to, and reason. |
| function | test_get_escalation_path_cache_hit_with_full_fields |
479 | Cache hit restores path, timeout_seconds, and reason. |
| function | test_execute_with_timeout_uses_default_timeout |
513 | _execute_with_timeout uses evaluator default when timeout arg is omitted. |
| function | test_evaluate_routing_works_despite_redis_failure |
530 | Full routing evaluation succeeds even when Redis is completely down. |
| function | test_check_permission_works_despite_redis_failure |
555 | Full permission check succeeds even when Redis is completely down. |