File size: 648 Bytes
f736cfb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/env python3
"""Apply the validate.py mock heuristic detection fix."""
import os
path = os.path.join(os.path.dirname(__file__), "benchmarks", "validate.py")
with open(path, "r") as f:
content = f.read()
old = ' has_h = "Learned Strategies" in text and "None yet" not in text'
new = ' has_h = ("Learned Strategies" in text or "When:" in text) and "None yet" not in text'
if old in content:
content = content.replace(old, new, 1)
with open(path, "w") as f:
f.write(content)
print("✅ Applied validate.py heuristic detection fix")
else:
print("⚠️ Pattern not found — may already be patched")
|