Skip to content

Persist external calls and header include counts so a scan can scope a rename (fcall_external, gitgalaxy reach) #8529

Closed

Description

@squid-protocol

What

External calls (standard library, macros, third-party packages, built-ins; resolution class external, step none) are counted in fcall_rate_data but not stored, so a scan cannot say who calls free or SSL_new, and a rename of a name the repository does not define cannot be scoped from a scan. A second gap: header include counts are not persisted, and the file-graph columns only reach +0.38 to +0.71 against a real include count on C repositories, inconsistently across repositories.

Evidence (one snapshot per repository)

fcall_rate_data, language *, caller-callee pairs:

repo resolved (scoped + unique) ambiguous external external share
curl 18,836 283 16,681 46.6%
libgit2 41,369 68 20,930 33.6%
redis 24,811 1,019 18,824 42.2%
prometheus 19,760 11,505 31,358 50.1%

Consequence: callers the scan could list are missing (against a text search the engine's callers were always real but about half complete), and a repository-wide rename such as free to curlx_free could not be scoped.

Slices

  1. fcall_external table (PR linked below): one aggregated row per (calling file, callee name). Not rows in fcall_data, which would roughly double it.
  2. gitgalaxy reach: a read-only post-scan command over the scan database (caller counts, header include counts, scope of a name).
  3. Open: header include counts. Check whether the include resolver can be improved before adding a table; persist per-header counts if not.

Out of scope: same-named method merging in Go and Python (the callee string is a bare name), which belongs to the call-graph resolver work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    call-graphenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions