5a581c78a2
Build / build (push) Has been cancelled
Docker / build (push) Has been cancelled
Lint / ruff (push) Has been cancelled
Test / pytest (ubuntu-latest, 3.11) (push) Has been cancelled
Test / pytest (ubuntu-latest, 3.12) (push) Has been cancelled
Test / pytest (windows-latest, 3.11) (push) Has been cancelled
Test / pytest (windows-latest, 3.12) (push) Has been cancelled
Introduce provider, model, and invocation contracts with encrypted configuration persistence. Add web runtime fencing, route fallback, recovery middleware, workspace scoping, and comprehensive tests.
18 lines
543 B
Python
18 lines
543 B
Python
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from EvoScientist.llm.contracts import EvoRuntimeError
|
|
from EvoScientist.web_runtime import _ToolRegistryFenceMiddleware
|
|
|
|
|
|
def test_tool_dispatch_fence_rejects_changed_registry(monkeypatch):
|
|
monkeypatch.setattr(
|
|
"EvoScientist.web_runtime.web_tool_registry_manifest",
|
|
lambda: ((), "registry-v2"),
|
|
)
|
|
middleware = _ToolRegistryFenceMiddleware("registry-v1")
|
|
|
|
with pytest.raises(EvoRuntimeError, match="TOOL_REGISTRY_STALE"):
|
|
middleware._require_current()
|