From a8ac7899b5087bdbc44e632fe2b834e095ec3af1 Mon Sep 17 00:00:00 2001 From: teddychenfeiyang-png Date: Sat, 12 Sep 2026 15:14:55 +1000 Subject: [PATCH] test(plugins): typo'd requires_hermes clause fails `plugins validate` admission Companion to the import fix: a clause whose version segment does not parse (`>=0.21.1,<0.x`) must fail admission rather than silently gate nothing. Salvage note: the source hunk (same import fix) and the duplicate positive test from PR #108842 were dropped in favour of the earlier #107553; only the negative test is carried here. --- tests/hermes_cli/test_plugin_validate.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/hermes_cli/test_plugin_validate.py b/tests/hermes_cli/test_plugin_validate.py index afe626a675..335ee750de 100644 --- a/tests/hermes_cli/test_plugin_validate.py +++ b/tests/hermes_cli/test_plugin_validate.py @@ -122,3 +122,18 @@ class TestCapabilityProbe: ) report = validate_plugin_dir(d) assert report.ok, report.failures + + +class TestRequiresHermesSpec: + """A typo'd ``requires_hermes`` clause must fail admission, not silently gate nothing.""" + + def test_typoed_clause_fails_admission(self, tmp_path): + d = _make_plugin( + tmp_path, manifest={**BASE_MANIFEST, "requires_hermes": ">=0.21.1,<0.x"} + ) + report = validate_plugin_dir(d) + assert not report.ok + assert any( + "requires_hermes" in f and "does not parse" in f for f in report.failures + ), report.failures +