Skip to content

R: box::use() import declarations produce no IMPORTS edges #218

@marcusyoung

Description

@marcusyoung

Summary

When indexing R code that uses the box module system (common in Rhino-framework Shiny applications), box::use() declarations are not parsed into IMPORTS edges in the knowledge graph. The result is a silent gap: queries that rely on import relationships — trace_path caller chains, query_graph module dependency questions — return incomplete results with no indication that edges are missing.

Expected behaviour

A box::use() declaration should produce IMPORTS edges equivalent to those produced by library(), require(), or source() in base R. For example:

box::use(
  shiny[moduleServer, NS],
  app/logic/validation[validate_input]
)

should produce IMPORTS edges from the current module to shiny, and from the current module to app/logic/validation.

Actual behaviour

No IMPORTS edges are created. The module appears to have no import relationships in the graph.

Impact

box is the standard import mechanism for the Rhino framework (Appsilon), which is a production-grade structure for large R/Shiny applications. Projects using Rhino exclusively use box::use()library() is explicitly discouraged. Without IMPORTS edge support, the call graph for any Rhino project is structurally incomplete.

The failure is silent: trace_path returns partial caller lists rather than an error. This produces false confidence in impact assessments made by agents using the tool.

Version

0.6.0 (Windows amd64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edges

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions