Add direct tests for runtime safeguard ownership
- SHA
0b56627db40ef2ea0d5829b05e00ef211d275703- Parents
-
59ebe9c - Tree
4bf72a1
0b56627
0b56627db40ef2ea0d5829b05e00ef211d27570359ebe9c
4bf72a1| Status | File | + | - |
|---|---|---|---|
| M |
tests/test_safeguard_services.py
|
6 | 1 |
tests/test_safeguard_services.pymodified@@ -2,12 +2,13 @@ | ||
| 2 | 2 | |
| 3 | 3 | from __future__ import annotations |
| 4 | 4 | |
| 5 | -from loader.agent.safeguards import RuntimeSafeguards | |
| 5 | +from loader.agent.safeguards import RuntimeSafeguards as AgentRuntimeSafeguards | |
| 6 | 6 | from loader.runtime.safeguard_services import ( |
| 7 | 7 | ActionTracker, |
| 8 | 8 | PreActionValidator, |
| 9 | 9 | ValidationResult, |
| 10 | 10 | ) |
| 11 | +from loader.runtime.safeguards import RuntimeSafeguards | |
| 11 | 12 | |
| 12 | 13 | |
| 13 | 14 | def test_action_tracker_detects_duplicate_write_after_recording(tmp_path) -> None: |
@@ -60,3 +61,7 @@ def test_runtime_safeguards_wrap_runtime_owned_services() -> None: | ||
| 60 | 61 | |
| 61 | 62 | assert isinstance(safeguards.action_tracker, ActionTracker) |
| 62 | 63 | assert isinstance(safeguards.validator, PreActionValidator) |
| 64 | + | |
| 65 | + | |
| 66 | +def test_agent_safeguards_reexport_runtime_safeguards() -> None: | |
| 67 | + assert AgentRuntimeSafeguards is RuntimeSafeguards | |