feat(apex): parse Apex with tree-sitter, add calls edges - #3122
feat(apex): parse Apex with tree-sitter, add calls edges#3122rsoesemann wants to merge 2 commits into
Graphify — worth a look
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Details
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Graphify review — findings
Adds a tree-sitter path to the Apex extractor that drives the shared engine walk via an Apex LanguageConfig and falls back to the existing regex extractor when the apex grammar is missing or the file fails to parse (including when tree-sitter returns a tree containing ERROR nodes). Layers Apex-only extraction on top of the engine result in _add_apex_specifics — extends/implements edges, the SObject a trigger fires on, SObjects behind SOQL FROM/SOSL RETURNING, DML statements, and entry-point annotations — reusing the engine's node-id scheme so both halves land on the same nodes. Filters out collection/primitive constructors and common built-in method names (e.g. add, send, serialize) from raw_calls so the cross-file resolver doesn't invent dependencies by binding bare method names to a single class that happens to declare them.
Worth a look
- Builtin-method filter drops legitimate same-file resolved calls —
graphify/extractors/apex.py· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- raw_calls builtin filter drops legitimate same-file calls to methods named add/get —
graphify/extractors/apex.py· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Unterminated test file prevents pytest collection —
tests/test_apex_calls.py:331· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- DML statements never produce edges in AST path —
graphify/extractors/apex.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- language pack path bypasses TypeError guard for grammar load failures —
graphify/extractors/engine.py:2884· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1726 functions depend on the 272 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 501 callers, 42 callees - new:
_rebuild_code()— 98 callers, 50 callees - new:
_extract_generic()— 20 callers, 24 callees - new:
extract_xaml()— 19 callers, 17 callees - new:
extract_js()— 83 callers, 3 callees - new:
dispatch_command()— 2 callers, 122 callees - new:
extract_objc()— 27 callers, 9 callees - new:
extract_julia()— 17 callers, 7 callees - …and 25 more — each is listed as a finding
Verification — 1726 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1076 function(s) in the blast radius were not formally verified this run