Skip to content

[Bug]: Incremental extract keeps stale TypeScript edges after an alias change #5533

Done

Description

@rvitaliy

What happened?

Incremental graphify extract can keep outdated TypeScript import and call edges after a change to an alias. It detects the modified config file, but the unchanged importers are left out of the AST batch.

Our monorepo uses graphify extract . --code-only --no-cluster for routine refreshes. After changing a path alias we currently need to run it with --force to make downstream navigation agree with the new config.

Steps to reproduce

# Run with graphify 0.9.121 on PATH.
cd "$(mktemp -d)"
printf 'export function read() { return 1; }\n' > alpha.ts
printf 'export function read() { return 2; }\n' > beta.ts
printf 'import { read } from "@ports";\nexport function acquire() { return read(); }\n' > caller.ts
printf '{"extends":"./tsconfig.base.json"}\n' > tsconfig.json
printf '{"compilerOptions":{"baseUrl":".","paths":{"@ports":["./alpha.ts"]}}}\n' > tsconfig.base.json
graphify extract . --code-only --no-cluster
printf '{"compilerOptions":{"baseUrl":".","paths":{"@ports":["./beta.ts"]}}}\n' > tsconfig.base.json
graphify extract . --code-only --no-cluster

In graphify-out/graph.json, inspect the targets of the imports_from, imports, and calls edges owned by caller.ts.

Actual and expected behavior

After the second run, all three edges still target nodes in alpha.ts. They should target nodes in beta.ts, as they do after graphify extract . --code-only --no-cluster --force.

#5017 and #5022 addressed the corresponding case for graphify update. Running two update . --no-cluster builds on the same fixture also produces the expected retargeting. The gap here is the extract CLI path.

Environment

Reproduced on v8 at 0f22ae762e3e3d0b689fc7ad2b8192740628413b (Graphify 0.9.121), macOS arm64, Python 3.14.6, installed from source with uv.

Activity

  1. github-actions commented on Nov 27, 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. added a commit that references this issue on Nov 28, 2026
    19de17a
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