Skip to content

feat(r): extract R with tree-sitter and resolve calls corpus-wide - #2393

Open
fernando-duarte wants to merge 1 commit into
Graphify-Labs:v8from
fernando-duarte:feat/r-language-support
Open

feat(r): extract R with tree-sitter and resolve calls corpus-wide#2393
fernando-duarte wants to merge 1 commit into
Graphify-Labs:v8from
fernando-duarte:feat/r-language-support

feat(r): extract R with tree-sitter and resolve calls corpus-wide

4a58e56
Select commit
Loading
Failed to load commit list.
Graphify Labs / Graphify succeeded Aug 2, 2026 in 0s

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