Skip to content

[Bug]: Incremental extraction keeps stale workspace edges after a pnpm-workspace.yaml edit #5607

Backlog

Description

@rvitaliy

What happened?

Editing only pnpm-workspace.yaml can change whether a bare package import resolves to local source. Both graphify extract and graphify update can keep the previous destination for an unchanged importer. In a pnpm monorepo this makes a successful refresh report the wrong dependencies.

Steps to reproduce

From an empty directory on Graphify 0.9.123:

mkdir -p packages/ports
printf '%s\n' '{"name":"@fixture/ports","exports":"./index.ts"}' > packages/ports/package.json
printf '%s\n' 'export function read() { return 1; }' > packages/ports/index.ts
printf '%s\n' 'import { read } from "@fixture/ports";' 'export function load() { return read(); }' > caller.ts
printf 'packages:\n  - packages/*\n' > pnpm-workspace.yaml
graphify extract . --code-only --no-cluster
printf 'packages:\n  - other/*\n' > pnpm-workspace.yaml
graphify extract . --code-only --no-cluster

Graph output

After the second extraction, the imports_from, imports and calls edges from caller.ts still point to packages/ports/index.ts. The package is outside the workspace at that point, so the local edges should disappear. A forced extraction produces the expected result. Restoring the original glob can cause the reverse problem if the prior graph was built with the package excluded.

Environment

Reproduced from a clean checkout of v8 at 5d962d2d (0.9.123), macOS arm64, Python 3.14.10, with no lockfile change.

Related to #462 and the resolver refresh mechanism introduced in #5534. pnpm-workspace.yaml is read by the workspace resolver and should also invalidate its graph edges.

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.

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