Point runtime-context tests at shared bootstrap
- SHA
3731911346590bab154e26687dc486391df38617- Parents
-
5a3f6fa - Tree
57b9a60
3731911
3731911346590bab154e26687dc486391df386175a3f6fa
57b9a60| Status | File | + | - |
|---|---|---|---|
| M |
tests/test_runtime_context.py
|
3 | 2 |
tests/test_runtime_context.pymodified@@ -5,6 +5,7 @@ from __future__ import annotations | ||
| 5 | 5 | from pathlib import Path |
| 6 | 6 | |
| 7 | 7 | from loader.agent.loop import Agent, AgentConfig |
| 8 | +from loader.runtime.bootstrap import build_runtime_context | |
| 8 | 9 | from loader.runtime.context import RuntimeContext |
| 9 | 10 | from loader.runtime.recovery import RecoveryContext |
| 10 | 11 | from tests.helpers.runtime_harness import ScriptedBackend |
@@ -18,7 +19,7 @@ def test_agent_builds_typed_runtime_context(temp_dir: Path) -> None: | ||
| 18 | 19 | project_root=temp_dir, |
| 19 | 20 | ) |
| 20 | 21 | |
| 21 | - context = agent._build_runtime_context() | |
| 22 | + context = build_runtime_context(agent) | |
| 22 | 23 | |
| 23 | 24 | assert isinstance(context, RuntimeContext) |
| 24 | 25 | assert context.project_root == temp_dir.resolve() |
@@ -47,7 +48,7 @@ def test_runtime_context_control_callbacks_stay_in_sync(temp_dir: Path) -> None: | ||
| 47 | 48 | project_root=temp_dir, |
| 48 | 49 | ) |
| 49 | 50 | |
| 50 | - context = agent._build_runtime_context() | |
| 51 | + context = build_runtime_context(agent) | |
| 51 | 52 | context.queue_steering_message("Re-check the current task.") |
| 52 | 53 | |
| 53 | 54 | assert context.drain_steering_messages() == ["Re-check the current task."] |