feat(r): extract R with tree-sitter and resolve calls corpus-wide - #2393
feat(r): extract R with tree-sitter and resolve calls corpus-wide#2393fernando-duarte wants to merge 1 commit into
Graphify — looks good
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Details
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR adds R language extraction support to graphify. It introduces a new bespoke extractor (graphify/extractors/r.py) that handles R's assignment-based function definitions (<-/=/<<-/right-assign), lambdas, imports (library/require/pkg::fn), and source() calls, plus a companion r_resolution module that resolves calls corpus-wide against a shared namespace rather than per-file. It wires the extractor into the dispatch tables (.r/.R extensions and the Rscript shebang), registers the R resolver, adds an [r] optional extra, and updates the existing no-AST-extractor warning comments since R is no longer the example of an unsupported-but-counted language. The changeset also touches the changelog and a broad set of test files covering extraction, R resolution, and related behavior. I'm only describing intent and surface area; I haven't assessed whether the extraction/resolution logic is correct.
No blocking issues surfaced. 3 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1632 functions depend on the 694 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
extract()— 365 callers, 29 callees - worse:
_get_extractor()— 26 callers, 6 callees - new:
extract_r()— 10 callers, 3 callees - new:
walk_calls()— 0 callers, 8 callees - new:
collect_definitions()— 0 callers, 6 callees
Verification — 1632 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: 1504 function(s) in the blast radius were not formally verified this run