Skip to content

Incremental manifest never retries files whose extractor failed on a missing extra #2543

Closed

Description

@bruno-growthsales

Summary

When an extractor hard-fails because its optional extra is not installed, the affected files are stamped into the incremental manifest as processed. Installing the extra and re-running does not repair the graph — the incremental gate reports the files as unchanged and skips them forever. The only recovery is deleting graphify-out/ entirely.

This is not specific to one language: it applies to every extra whose extractor returns a "not installed" error — [sql], [terraform], [dm], and any future one.

Reproduction

On a repo with 227 .sql files, graphifyy installed without the [sql] extra:

$ graphify extract . --code-only --out .
  warning: 227 .sql file(s) contributed nothing to the graph because a dependency is
  missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745)
[graphify extract] wrote graph.json: 7912 nodes, 19212 edges

Install the missing extra, then re-run:

$ uv tool install --force "graphifyy[sql] @ ..."
$ graphify extract . --code-only --out .
[graphify extract] 0 code, 0 docs, 0 papers, 0 images changed; 1228 unchanged; 0 deleted
[graphify extract] wrote graph.json: 7912 nodes, 19212 edges
[graphify extract] incremental summary: 1228 files cached/unchanged, 0 re-extracted, 0 deleted

Nothing is re-extracted and the warning is gone, so the run looks clean. The 227 SQL files are still absent from the graph.

Only after rm -rf graphify-out does the graph repair:

[graphify extract] wrote graph.json: 8675 nodes, 19820 edges

7912 → 8675 nodes. The intermediate state is the dangerous one: the second run gives every signal of success while the graph stays silently incomplete.

Why it happens

_manifest_files is derived from files_by_type — the full detect output — so a file gets its hash stamped regardless of whether its AST extraction returned an error. The next run's incremental gate compares hashes, sees no change, and skips.

Precedent for the fix

The codebase already applies this principle in the two neighbouring layers, just not here:

The AST side has no equivalent. A file whose extraction result carries an error (or that returned zero nodes while having a registered extractor) should not be stamped as up to date, so the next run retries it — exactly the shape #1948 already implements one pass over.

Note

The #1745 warning that surfaces the original failure goes to stderr, so in a piped or CI context it is easy to miss the one signal that something went wrong. Not a bug, but it compounds this one.

Happy to send a PR if you agree with the approach.

Activity

  1. safishamsi commented on Aug 8, 2026

    @safishamsi
    Member

    Fixed in v0.9.37 (graphifyy==0.9.37). A failed extraction is no longer stamped in the incremental manifest as up-to-date, so graphify update retries it instead of skipping it forever; a manifest already poisoned by the old behavior is healed on the next run, and genuinely-unchanged files are not re-processed. Thanks @michaelxer for the fix (PR #2546).

  2. added a commit that references this issue on Oct 17, 2026
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