test: assert skills-guard scanner version is past v1, not pinned to v2

The pin to "skills-guard-v2" was a change-detector: every rule change that
bumps the scanner version (this PR moves to v3 so cached verdicts re-scan)
turned it red. The intent was "cached v1 verdicts are invalidated", so assert
the contract instead of the current value.
This commit is contained in:
teknium1
2026-09-14 14:41:50 -07:00
parent 30d78cd85e
commit fd60c70375

View File

@@ -34,10 +34,11 @@ def _scan(tmp_path: Path, content: str):
return scan_skill(skill_dir, source="community/test")
# The scanner version moved to v2 precisely so cached v1 dangerous verdicts
# for previously-blocked skills are invalidated and re-scanned.
# The scanner version moved past v1 precisely so cached v1 dangerous verdicts
# for previously-blocked skills are invalidated and re-scanned. Later bumps
# are expected whenever rules change; only regressing to v1 is a bug.
def test_scanner_version_bumped():
assert SCANNER_VERSION == "skills-guard-v2"
assert SCANNER_VERSION != "skills-guard-v1"
class TestFalsePositivesUnblocked: