Description
Issue
In 17 of 45 languages, over 70% of that language's _SIMPLE_CASES entries have None in the negative-snippet slot (meaning zero false-positive/ghost-prevention testing for most of that language's signatures).
This mirrors exactly the "invalid — Ghost Prevention" tier gap epic #813's founding audit found in the extraction gauntlets and fixed before closing — the same rigor bar was never applied retroactively to this suite's non-extraction-pillar signatures.
Worst offenders (100% None in negative slot):
- kotlin: 49/49 cases
- lua: 49/49 cases
Very high (>90% None):
- ruby: 49/50 cases
- swift: 49/50 cases
- dart: 49/50 cases
- go: 49/50 cases
- php: 49/50 cases
High (>80% None):
- perl: 50/51 cases
- powershell: 48/49 cases
- java: 48/49 cases
- objective-c: 44/45 cases
- python: 33/37 cases
- javascript: 35/40 cases
- haskell: 43/44 cases
- solidity: 37/38 cases
- embedded_python: 46/50 cases
Solution
For each signature currently paired with None, add a realistic negative/lookalike snippet per how_to_add_a_language.md's Strict Testing Prompt item 1: "every positive snippet must be realistic code... not a synthetic string engineered to match" — same bar applies to negatives.
Priority order: by real-world language popularity, since a false-positive in a commonly-scanned language has the widest blast radius. Python, JavaScript, Java, Go, Rust, C++ should be prioritized before less commonly-scanned languages.
Process:
-
For each
_SIMPLE_CASESentry currently withNoneas the negative snippet:- Write a realistic lookalike that closely resembles the positive case in structure but should NOT match the rule's documented semantics.
- Example: if the signature is
apiand the positive case isrequests.get(url), a negative might beresponse.get()(method call, not HTTP API). - Test locally with
python -m pytest tests/extraction/languages/test_<lang>_strict.py -vto confirm the negative case indeed does NOT match.
-
After closing negative-case gaps for all 17 languages, re-run the full
_strict.pysuite to ensure no regressions and false-positive patterns are now caught.
Files to modify
All tests/extraction/languages/test_<lang>_strict.py files for: kotlin, lua, ruby, swift, dart, go, php, perl, powershell, java, objective-c, python, javascript, haskell, solidity, embedded_python, and one more to be identified in a full audit.
Related issues
- Epic Epic: Harden the strict structural-signature test suite (non-extraction-pillar rules) per language #1069: Harden the strict structural-signature test suite (non-extraction-pillar rules) per language
- Epic Epic: Harden the four extraction gauntlets (function/args/class/dependency) per language #813: Harden the four extraction gauntlets... per language (CLOSED 2026-08-03) — established the "invalid — Ghost Prevention" tier as mandatory
- Epic Epic: Strict & exact regex test coverage for all structural signatures, per language #518: Strict & exact regex test coverage for all structural signatures, per language (CLOSED)
Activity
test(extraction): close ghost-prevention negative-case gaps (#1073) (#…