Skip to content

The agent that grows with you

test: main's two new tests on the unified runtime's seams

teknium1185d76d3eb2a
diff --git a/tests/cron/test_scheduler.py b/tests/cron/test_scheduler.py
index 3ef5d445086..1928651cda9 100644
--- a/tests/cron/test_scheduler.py
+++ b/tests/cron/test_scheduler.py
@@ -1065,9 +1065,12 @@ class TestRunJobConfigEnvVarExpansion:
}
def test_model_env_ref_in_config_yaml_is_expanded(self, tmp_path, monkeypatch):
- """${VAR} in config.yaml model: is expanded using env after .env is loaded."""
+ """${VAR} in config.yaml model: is expanded from the PROFILE's own secret scope. The owner
+ bridge runs the job under that profile's runtime scope, where a process-env value would be
+ another profile's leak, so the ref resolves from ``<home>/.env`` and never os.environ."""
(tmp_path / "config.yaml").write_text("model: ${_HERMES_TEST_CRON_MODEL}\n")
- monkeypatch.setenv("_HERMES_TEST_CRON_MODEL", "gpt-4o-mini-cron-test")
+ (tmp_path / ".env").write_text("_HERMES_TEST_CRON_MODEL=gpt-4o-mini-cron-test\n")
+ monkeypatch.setenv("_HERMES_TEST_CRON_MODEL", "leaked-from-process-env")
job = {"id": "env-job", "name": "env test", "prompt": "hi"}
fake_db = MagicMock()
diff --git a/tests/gateway/test_multiplex_hot_serve.py b/tests/gateway/test_multiplex_hot_serve.py
index e2d9b842ef6..48d23e86184 100644
--- a/tests/gateway/test_multiplex_hot_serve.py
+++ b/tests/gateway/test_multiplex_hot_serve.py
@@ -70,6 +70,10 @@ def _runner(tmp_path, monkeypatch):
runner._start_one_profile_adapters = _start
runner._adapter_credential_fingerprint = lambda adapter: getattr(adapter, "token", None)
runner._started = started
+ # The control socket's identify verb reads the runtime descriptor + ticket store that
+ # initialize_gateway_runtime installs; this adapters-only runner never ran it.
+ runner.session_runtime_descriptor = {"state": "ready", "served_profiles": [], "capabilities": []}
+ runner.session_ticket_store = None
return runner, home
@@ -192,7 +196,7 @@ async def test_profile_control_verbs_round_trip_and_refusals(tmp_path, monkeypat
@pytest.mark.linux_only
@pytest.mark.asyncio
async def test_profile_lifecycle_over_real_control_socket(tmp_path, monkeypatch):
- from gateway.run import _start_gateway_start_control_socket
+ from gateway.run_bootstrap import _start_gateway_start_control_socket
from gateway import control_socket
runner, home = _runner(tmp_path, monkeypatch)
secondary = _mkprofile(home, "worker")