Orchestrata Ultimate › Tests › Reference › governance › e2e

Tests reference — tests/governance/e2e

tests/governance/e2e — 6 test modules, 31 test functions. Source tree: tests/governance/e2e at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.

Prose pending.

Modules

Module Tests Covers
test_escalation_enforcement_proof.py 6 3
test_governance_prolog_client_enforcement_proof.py 8 2
test_no_circular_facts_guard.py 2 0
test_pipeline_may_complete_enforcement_proof.py 2 2
test_policy_evaluator_dispatcher_enforcement_proof.py 8 7
test_retro_incidents.py 5 5

Module details

tests/governance/e2e/test_escalation_enforcement_proof.py

source · 6 tests · 187 lines

W1-P5 enforcement-proof: the escalation surface -- F4

Covers: core.paths, infra.prolog_bridge, governance.escalation_handler/ (package)

Kind Name Line Description
class TestMultiHopEscalationEnforcement 100
method TestMultiHopEscalationEnforcement.test_real_path_includes_registered_owner 102 pam_owns/2 (NOT multi_hop_escalation itself) is the only fact
method TestMultiHopEscalationEnforcement.test_real_path_for_unowned_component_is_not_the_naive_fallback 119 F4 regression proof: before this fix, multi_hop_escalation/2 did
class TestTerminalAuthorityEnforcement 140
method TestTerminalAuthorityEnforcement.test_real_true_for_level_2_authority 142 pam_rules.pl:246-247 -- U:Ox is the shipped level_2 (terminal)
method TestTerminalAuthorityEnforcement.test_real_false_for_level_1_authority 148 U:Ar is only level_1 -- genuinely NOT terminal, discriminating
class TestSlaThresholdEnforcement 159
method TestSlaThresholdEnforcement.test_real_query_succeeds_with_no_error_logged 161 sla_threshold/2 is NOT dynamic (pam_rules.pl has no per-component
method TestSlaThresholdEnforcement.test_f4_retro_wrong_arity_query_shape_would_error 177 F4 acid test: pam:sla_threshold/1 (component only, no Minutes

tests/governance/e2e/test_governance_prolog_client_enforcement_proof.py

source · 8 tests · 172 lines

W1-P5 enforcement-proof: GovernancePrologClient via the PRODUCTION

Covers: governance.prolog_client, infra.prolog_bridge

Kind Name Line Description
class TestMayExecuteEnforcement 92
method TestMayExecuteEnforcement.test_real_allow_shipped_role_fact 93 governance.pl:863 -- may_execute('U:Qa', run_tests) is a shipped
method TestMayExecuteEnforcement.test_real_deny_blocked_action 98 agent_action_blocked/2 -- a DIFFERENT predicate than may_execute
class TestMayAccessEnforcement 120
method TestMayAccessEnforcement.test_real_allow_unprotected_read 121 resources.pl:41-43 -- a workspace-scoped read is genuinely
method TestMayAccessEnforcement.test_real_deny_protected_system_path 127 resources.pl:74-86 -- /etc is a protected system path; read
class TestValidPolicyEnforcement 138
method TestValidPolicyEnforcement.test_real_allow_recognized_decision 139 governance.pl:633-634 -- 'allow' is one of the six recognized
method TestValidPolicyEnforcement.test_real_deny_unrecognized_decision 144 An unrecognized decision value has zero solutions for
class TestHasPermissionEnforcement 157
method TestHasPermissionEnforcement.test_real_allow_shipped_ownership_fact 158 pam_rules.pl:76 -- pam_owns('U:Cd', code) is a shipped fact;
method TestHasPermissionEnforcement.test_real_deny_no_ownership_or_grant 166 A random actor/resource pair owns nothing and has no active

tests/governance/e2e/test_no_circular_facts_guard.py

source · 2 tests · 200 lines

W1-P5 deliverable #3: a guard test that protects the "assert INPUT facts

Kind Name Line Description
function test_no_file_asserts_and_queries_the_same_predicate 175 The circularity fingerprint: for every OTHER file in this directory,
function test_guard_itself_has_at_least_one_sibling_file_to_scan 197 Fails loudly if the directory glob ever stops matching (e.g. a

tests/governance/e2e/test_pipeline_may_complete_enforcement_proof.py

source · 2 tests · 122 lines

W1-P5 enforcement-proof: the may_complete completion gate

Covers: kernel.pipeline, core.packet/ (package)

Kind Name Line Description
class TestMayCompleteEnforcement 78
method TestMayCompleteEnforcement.test_real_deny_no_artifacts_collected 79 No packet has ever routed through _collect_artifacts for this
method TestMayCompleteEnforcement.test_real_allow_after_real_collect_artifacts_call 95 Drives a REAL stage-transition packet (subject='implement',

tests/governance/e2e/test_policy_evaluator_dispatcher_enforcement_proof.py

source · 8 tests · 266 lines

W1-P5 enforcement-proof: PolicyEvaluator via the PRODUCTION

Covers: agents.volk_registry, core.paths, cxp.servicer, cxp.transport, kernel.dispatcher, kernel.policy_evaluator, core.packet/ (package)

Kind Name Line Description
class TestToolAllowedThroughDispatcher 112
method TestToolAllowedThroughDispatcher.test_real_allow_operational_volk 114
method TestToolAllowedThroughDispatcher.test_real_deny_unregistered_volk 130 Zero facts asserted: an unregistered volk is genuinely denied by
class TestPolicyPermitsThroughFullDispatch 145
method TestPolicyPermitsThroughFullDispatch.test_real_allow_verdict_logged_through_dispatch 147
method TestPolicyPermitsThroughFullDispatch.test_real_deny_verdict_logged_through_dispatch 179 Zero facts asserted: an unregistered sender denies by
class TestCheckConstraintOwnershipThroughDispatcher 207
method TestCheckConstraintOwnershipThroughDispatcher.test_real_allow_ownership_matches 209 governance.pl:602-620: check_constraint(ownership, ...) delegates
method TestCheckConstraintOwnershipThroughDispatcher.test_real_deny_owned_by_someone_else 227 kernel/policy_evaluator.py:876-878 -- Owner is set (from a real
class TestEscalationTargetThroughDispatcher 251
method TestEscalationTargetThroughDispatcher.test_real_critical_escalates_to_human 253
method TestEscalationTargetThroughDispatcher.test_real_high_non_security_escalates_to_senior_volk 260 The genuine discriminator: 'high' + not-security-related routes

tests/governance/e2e/test_retro_incidents.py

source · 5 tests · 266 lines

W1-P5 retro-verification: named tests for the governance-wiring incidents

Covers: core.paths, governance.prolog_client, infra.prolog_bridge, orchestrator.intent_types, orchestrator.intent_validator

Kind Name Line Description
function test_incident_1_a064fc6e_policy_engine_bridge_actually_consults_rules 75 Incident 1: gateway/server.py's PolicyEngine bridge NEVER consulted
function test_incident_2_14d6a2f8_permission_granted_allow_and_deny 109 Incident 2: permission_granted/2 (the SPEC-003 fail-closed
function test_incident_3_88e88797_may_execute_correct_contract_enforces 170 Incident 3: governance/prolog_client.py queried a nonexistent
function test_incident_3b_88e88797_unknown_agent_is_denied_d1_landed 202 Incident 3b: D1 has LANDED, and this test flipped with it.
function test_f2_evaluator_4ary_family_arity_boundary_is_real 238 F2: kernel/policy_evaluator.py queried tool_allowed/4,