From 1bbe3d2de07f136a93f0c5a287b5ecb22e1561fe Mon Sep 17 00:00:00 2001 From: Jens Caers Date: Wed, 26 Aug 2026 22:16:22 +0200 Subject: [PATCH] test: keep production GIS available without AI scope evidence --- backend/tests/test_secure_runtime_defaults.py | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/backend/tests/test_secure_runtime_defaults.py b/backend/tests/test_secure_runtime_defaults.py index ed7b1c67..bf45a9ef 100644 --- a/backend/tests/test_secure_runtime_defaults.py +++ b/backend/tests/test_secure_runtime_defaults.py @@ -26,28 +26,21 @@ def test_production_yolo_rejects_disabled_validation_scope() -> None: app_env="production", yolo_enabled=True, yolo_enforce_validation_scope=False, - ) - - -def test_production_yolo_requires_validation_scope_manifest() -> None: - with pytest.raises(ValidationError, match="YOLO_VALIDATION_SCOPE_MANIFEST_PATH"): - _settings( - app_env="production", - yolo_enabled=True, yolo_require_cuda=True, yolo_device="cuda:0", ) -def test_production_yolo_requires_validation_scope_hash() -> None: - with pytest.raises(ValidationError, match="YOLO_VALIDATION_SCOPE_MANIFEST_SHA256"): - _settings( - app_env="production", - yolo_enabled=True, - yolo_validation_scope_manifest_path="/app/storage/model-scope.json", - yolo_require_cuda=True, - yolo_device="cuda:0", - ) +def test_production_yolo_can_start_without_scope_evidence() -> None: + settings = _settings( + app_env="production", + yolo_enabled=True, + yolo_require_cuda=True, + yolo_device="cuda:0", + ) + assert settings.yolo_enforce_validation_scope is True + assert settings.yolo_validation_scope_manifest_path is None + assert settings.yolo_validation_scope_manifest_sha256 is None def test_production_yolo_requires_cuda() -> None: @@ -55,8 +48,6 @@ def test_production_yolo_requires_cuda() -> None: _settings( app_env="production", yolo_enabled=True, - yolo_validation_scope_manifest_path="/app/storage/model-scope.json", - yolo_validation_scope_manifest_sha256="a" * 64, yolo_require_cuda=False, yolo_device="cuda:0", ) @@ -67,8 +58,6 @@ def test_production_yolo_requires_cuda_device() -> None: _settings( app_env="production", yolo_enabled=True, - yolo_validation_scope_manifest_path="/app/storage/model-scope.json", - yolo_validation_scope_manifest_sha256="a" * 64, yolo_require_cuda=True, yolo_device="cpu", )