Skip to content

fix(calls_out): improve Python, Rust, Swift, C#, Scala, and Solidity call-graph ledger accuracy - #8795

Merged
squid-protocol merged 1 commit into
mainfrom
fix/multi-lang-call-graph-ledger
Nov 21, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/multi-lang-call-graph-ledger

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Consolidates #8792 (Python), #8794 (Rust), and #8795 (Swift, C#, Scala, Solidity) into a single PR cleanly rebased onto main (2f36dbfb0) to eliminate golden-crucible merge conflicts and cut CI usage 3x:

  1. Python (class_definition<block 30 FPs, inner-named-function_definition 10 FPs, engine-attributes-to-another-function 6 FNs, cross-newline non-calls 2 FPs)
    • Added CALLS_OUT_PYTHON (_shared_patterns.py, registered in QUALIFIED_CALLS_OUT_PATTERNS) with (?<!\bclass )(?<!\bclass\t) and same-line [ \t]*\(; added "True", "False", "None" to _calls_out_ignore (python.py).
    • Updated _slice_by_indentation (detector.py) to carry unclosed bracket depth from multi-line return annotations (-> AsyncIterator[\n T\n]:).
  2. Rust (struct_item<block 3 FPs, tuple_struct_pattern<tuple_pattern 2 FPs, macro_invocation/identifier 4 FNs, engine-attributes-to-another-function 1 FN)
    • Blanked nested tuple-struct declarations (_STRUCT_DECL), widened _ARM_PATTERN / _SELECT_ARM_PATTERN paren nesting to 4 levels, preserved Token![...] macro calls inside _blank_fn_params (rust.py), and switched CALLS_OUT_RUST's suffix to a positive lookahead (_shared_patterns.py).
  3. Swift (call_expression/- 68 FNs, call_expression/-+generic 2 FNs, pattern<switch_pattern 2 FPs)
    • Added CALLS_OUT_SWIFT for dotted trailing-closure calls (q.async { ... }, mutableState.write { ... }) and generic calls; added _blank_swift_patterns for switch case patterns (swift.py).
  4. C# (attribute<attribute_list 22 FPs)
    • Added _blank_csharp_attributes for standalone attribute lines ([Obsolete(...)], [Experimental(...)]) in csharp.py.
  5. Scala (instance_expression/- 49 FNs, call_expression/generic_function 7 FNs, case_class_pattern<case_clause 44 FPs)
    • Added CALLS_OUT_SCALA for bracket-generic calls (ArrayBuffer[T](...)) and parenthesis-less new pkg.Type[T]; added _blank_scala_patterns for case patterns and nested class headers (scala.py).
  6. Solidity (primitive casts 21 FPs, type(T) 2 FPs, emit 11 FPs, revert custom errors 3 FPs)
    • Added primitive type casts, type, emit, and revert to _calls_out_ignore and _blank_solidity_non_calls in solidity.py.

Golden Crucible Updates

  • Refreshed tests/golden_master_audit and tests/golden_master_zero_dep_audit once on top of origin/main (2f36dbfb0) via crucible_check.py --update --yes.

Verification

  • Added test_calls_out_python_ledger.py, test_calls_out_rust_ledger.py, and test_calls_out_multi_lang_ledger.py (including ReDoS immunity checks).
  • Updated CALLS_OUT_PYTHON / CALLS_OUT_SWIFT / CALLS_OUT_SCALA assertions in test_calls_out_keywords_3359.py and test_calls_out_generics_3644.py.
  • Verified all 127 consolidated extraction tests, ruff format --check, tests/ruff_audit.py --ci, and tests/doc_refs_audit.py --ci.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol force-pushed the fix/multi-lang-call-graph-ledger branch from dc73162 to 2dfa29a Compare November 20, 2026 20:06
@squid-protocol squid-protocol changed the title fix(calls_out): improve Swift, C#, Scala, and Solidity call-graph ledger accuracy fix(calls_out): improve Python, Rust, Swift, C#, Scala, and Solidity call-graph ledger accuracy Nov 20, 2026
@squid-protocol
squid-protocol force-pushed the fix/multi-lang-call-graph-ledger branch from 2dfa29a to 2967c9f Compare November 20, 2026 22:32
@squid-protocol
squid-protocol merged commit 08f7958 into main Nov 21, 2026
72 checks passed
@squid-protocol
squid-protocol deleted the fix/multi-lang-call-graph-ledger branch November 21, 2026 01:10
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