v1.3.0 — Extensional Enumeration Detection & Detection Gap Fixes
What's New
Check 5 — Extensional Enumeration Detector
Detects functions that replace algorithmic logic with exhaustive input-output mappings (compare-return chains). Based on the extensional enumeration pattern identified by Helff et al. ("LLMs Gaming Verifiers", arXiv:2604.15149).
- Flags functions where ≥70% of if-statements are
if x == Const: return Constwith minimal loop logic - WARNING individually, CRITICAL in combination with Check 1 or Check 2
- Configurable thresholds:
enumeration_ratio,enumeration_min_ifs - Supports
match/case(Python 3.10+)
Detection Gap Fixes
- Check 2 rename bypass closed: File-level complexity fallback when function names differ between original and generated code
builtins.evaldetection:builtinsmodule now recognized alongside__builtins__- Syntax-error telemetry fix: No longer corrupts telemetry data on unparseable generated code
- Exception handling:
except SyntaxErrorinstead ofexcept Exception— analyzer bugs now propagate correctly
GitHub Action
Native SARIF scanning action for CI/CD pipelines with optional upload to GitHub Security tab:
- uses: Nick-is-building/ast-guard/.github/actions/ast-guard@main
with:
original: original.py
generated: optimized.py
mode: strict
upload-sarif: "true"