From ba8595b43f3b21af872659234ffc71f43a727fd7 Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:35:54 -0400 Subject: [PATCH] test: annotate classifier controls and bind canonical resources --- manifests/context-packs/skill-triggers@1.json | 2 +- skills/skill-comply/tests/test_classifier.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/context-packs/skill-triggers@1.json b/manifests/context-packs/skill-triggers@1.json index 1d92259c4..f77ba09c6 100644 --- a/manifests/context-packs/skill-triggers@1.json +++ b/manifests/context-packs/skill-triggers@1.json @@ -10,7 +10,7 @@ "id": "hand-seeded", "source": "manual-curation-pending-regeneration" }, - "registryDigest": "b21e33d7de6c1f8c1934a7b11d9cb9c5135abb5fd51c7db155eb393cff5fa959", + "registryDigest": "c86166ed37f558c3981a97c5f73bb08635b868e2e44e24dae8725f89ed9c3ff3", "schemaVersion": 1, "triggers": { "skill:agent-runtime-gateway-smoke-test": [ diff --git a/skills/skill-comply/tests/test_classifier.py b/skills/skill-comply/tests/test_classifier.py index 95d82ef8b..3144da903 100644 --- a/skills/skill-comply/tests/test_classifier.py +++ b/skills/skill-comply/tests/test_classifier.py @@ -11,36 +11,36 @@ from scripts.parser import ComplianceSpec, Detector, ObservationEvent, Step class TestParseClassification: - def test_plain_json(self): + def test_plain_json(self) -> None: assert _parse_classification('{"a": [0, 2]}') == {"a": [0, 2]} - def test_fenced_json(self): + def test_fenced_json(self) -> None: assert _parse_classification('```json\n{"a": [1]}\n```') == {"a": [1]} - def test_dict_without_list_values_is_empty(self): + def test_dict_without_list_values_is_empty(self) -> None: assert _parse_classification('{"a": "x"}') == {} - def test_empty_object_is_valid(self): + def test_empty_object_is_valid(self) -> None: assert _parse_classification("{}") == {} - def test_garbage_raises(self): + def test_garbage_raises(self) -> None: with pytest.raises(classifier.ClassifierParseError, match="failed to parse"): _parse_classification("sorry, I cannot classify these") - def test_non_dict_json_raises(self): + def test_non_dict_json_raises(self) -> None: with pytest.raises(classifier.ClassifierParseError, match="non-dict"): _parse_classification("[1, 2, 3]") - def test_non_integer_indices_raise(self): + def test_non_integer_indices_raise(self) -> None: with pytest.raises(classifier.ClassifierParseError, match="failed to parse"): _parse_classification('{"a": ["x"]}') - def test_is_runtime_error(self): + def test_is_runtime_error(self) -> None: assert issubclass(classifier.ClassifierParseError, RuntimeError) @pytest.mark.parametrize("response", ["not JSON", "[]", '{"a": ["x"]}']) -def test_grader_propagates_classifier_parse_failure(response): +def test_grader_propagates_classifier_parse_failure(response: str) -> None: """An invalid successful subprocess response cannot become a zero score.""" spec = ComplianceSpec( id="fixture", name="Fixture", source_rule="fixture", version="1",