Skip to content

v1.3.0 — Extensional Enumeration Detection & Detection Gap Fixes

Choose a tag to compare

@Nick-is-building Nick-is-building released this 28 May 05:55
· 135 commits to main since this release

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 Const with 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.eval detection: builtins module now recognized alongside __builtins__
  • Syntax-error telemetry fix: No longer corrupts telemetry data on unparseable generated code
  • Exception handling: except SyntaxError instead of except 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"