Skip to content

[Bug]: Calls through a local const alias disappear inside indexed TypeScript callables #5613

Done

Description

@rvitaliy

What happened?

Graphify can index a local callable and find its direct imported calls, but miss calls through an immutable alias declared in that callable. In database and application code this leaves real persistence calls out of reverse impact queries.

Steps to reproduce

In an empty directory, create target.ts:

export function save() {}

Create factory.ts:

import { save } from './target';

export function factory() {
  const prepare = () => {
    const persist = save;
    return persist();
  };
  const control = () => save();
  return { prepare, control };
}

Run graphify extract . --code-only --no-cluster.

Graph output

prepare(), control(), and save() are indexed. The graph contains control() → save() and omits prepare() → save(). The latter should have the actual alias call's location and keep prepare() as its caller.

Environment

Reproduced on v8 at 5d962d2d (0.9.123), macOS arm64, Python 3.14.10, with a clean graph. This is a follow-up to the local callable ownership behavior in #5594.

Activity

  1. github-actions commented on Nov 28, 2026

    @github-actions

    Thanks for opening this issue, @rvitaliy. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  2. Komorebi-GZM commented on Nov 29, 2026

    @Komorebi-GZM
    Contributor

    I'd like to take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions