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.
This commit is contained in:
teddychenfeiyang-png
2026-09-12 15:14:55 +10:00
committed by Teknium
parent c4c508579d
commit a8ac7899b5
+15
View File
@@ -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