Skip to content

feat: calls_out Phase 3 foundation — per-language ignore mechanism + family paradigm constants (#3282) - #3288

Merged
squid-protocol merged 2 commits into
mainfrom
feat/3264-p3-batch0-foundation
Sep 22, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/3264-p3-batch0-foundation

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3282. Epic #3264 Phase 3, Batch 0 of 6.

What

  • detector.py: the inline ignore_keywords literal (rebuilt every call) becomes module-level _CALLS_OUT_GLOBAL_IGNORE (contents verbatim), unioned with an optional per-language rules["calls_out_ignore"] frozenset — authored lowercase, compared casefolded, so case-insensitive languages filter their keywords in any spelling. Global set behavior unchanged.
  • _shared_patterns.py §5: three new paradigm constants — CALLS_OUT_CALL_VERB (fortran/pli/rexx/db2_sql/assembly CALL name; deliberately not cobol's regex — GO TO would capture fortran numeric labels), CALLS_OUT_LISP_FAMILY, CALLS_OUT_COMMAND_POSITION.
  • Strict tests for all three (groups==1, keyword negatives, ReDoS immunity) + a detector unit test for the union/casefold filter.

Output-neutral

No language profile consumes any of this yet — every batch that does lands separately (#3283–#3287) with rosetta:rebless-owed. This PR's rosetta-audit must be green with zero diffs; that is the neutrality proof.

Truth oracle for the follow-up batches: squid-protocol/keyword-rosetta#144.

Verification

  • tests/extraction full suite: 8326 passed (worktree, v6 venv)
  • ruff format --check + ruff check clean on changed source (test-file S101s pre-exist); mypy delta vs origin/main: none (tiktoken stub error pre-exists)

🤖 Generated with Claude Code

Foundation for Epic #3264 Phase 3, output-neutral by construction:

- detector.py: hoist the inline ignore_keywords literal to module-level
  _CALLS_OUT_GLOBAL_IGNORE (contents verbatim) and union it with an
  optional per-language rules['calls_out_ignore'] frozenset, authored
  lowercase and compared casefolded so case-insensitive languages
  (fortran/abap/pli/rexx/db2_sql/ada) filter keywords in any spelling.
- _shared_patterns.py: add CALLS_OUT_CALL_VERB, CALLS_OUT_LISP_FAMILY,
  CALLS_OUT_COMMAND_POSITION. No profile consumes any of this yet.
- strict tests for the three constants (positives from the rosetta
  control-shell idioms, keyword/label negatives, groups==1, ReDoS) and
  a detector unit test proving the union/casefold filter.

Full extraction suite: 8326 passed. rosetta-audit must show zero diffs.

Co-Authored-By: Claude Fable 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…land

The foundation ships the read site ahead of the per-language writers
(#3284-#3287) by design; the entry documents its own removal condition.

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

calls_out Phase 3 Batch 0: foundation — per-language ignore mechanism + family paradigm constants

1 participant