Skip to content

Extraction hardening: python - #1010

Merged
squid-protocol merged 2 commits into
mainfrom
fix-extraction-python-regex
Aug 3, 2026
Merged

Extraction hardening: python#1010
squid-protocol merged 2 commits into
mainfrom
fix-extraction-python-regex

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

This PR hardens the extraction regexes for Python and aligns its testing suite with strict line-by-line constraints.

Summary of Changes:

  • Issues Found & Fixed: Replaced \s+ with [ \t]+ in Python's func_start, args, class_start, and _dependency_capture rules to prevent invalid newline-crossing captures that are mathematically impossible for the re.M line-by-line engine.
  • Tests Updated: Stripped out artificial \n spacing in pathological test cases (like stacked decorators and split signatures) that were previously giving false positives due to the \s+ bug.
  • Notes & Limitations: Confirmed via crucible audit that this fix causes zero topological drift in the actual corpus, meaning the bugs were purely theoretical in the context of our current dataset but important for strict correctness.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 19e434d into main Aug 3, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the fix-extraction-python-regex branch August 3, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant