Skip to content

deep mode: nodes with out-of-scope source_file are warned about but still written to graph.json #1895

Closed

Description

@Nyxx0x

Version: 0.9.15

Deep-mode extraction created nodes whose source_file points at files that .graphifyignore excludes and that were never dispatched to the extractor. The LLM saw references to those files inside documents it did read, and set source_file to the referent rather than to the containing document. The node therefore asserts a provenance that never existed.

graphify partially detects this. Per offending file it emits:

RuntimeWarning: semantic cache skipped out-of-scope source_file '<path>';
the file was not dispatched for extraction

and correctly keeps the entry out of the cache — but the node is still written to graph.json. So the warning implies the situation was handled, while the graph carries the fabricated provenance.

Observed

3 warnings, and exactly 3 corresponding out-of-scope nodes in the final graph (paths under scripts/ and spine/attestations/, excluded by the ignore file's globs). The warning count was a reliable detector; the graph was not actually protected by it.

Expected

The same out-of-scope check that guards the cache write should also run before the graph write — dropping the node, re-attributing source_file to the containing document, or at minimum flagging it in the node so downstream consumers can filter it.

Related: #1757 fixed the cache-overwrite consequence of this same source_file mis-attribution. The graph-write consequence appears to remain.

Activity

  1. safishamsi commented on Jul 14, 2026

    @safishamsi
    Member

    Fixed on v8 in 0cacd70 (will ship in 0.9.17). A node whose source_file was never dispatched is now dropped from the merged graph, not just skipped from the cache - closing the graph-side gap of the #1757 cache guard.

  2. added a commit that references this issue on Jul 16, 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