Skip to content

GRAPH_REPORT.md offers 'undocumented components' as a possible cause on graphs that structurally cannot have one #3801

Description

@BloodyBeard

Summary

GRAPH_REPORT.md's Knowledge Gaps section always offers the same two possible explanations for an isolated node, regardless of whether the graph could ever actually support one of them:

These have ≤1 connection - possible missing edges or undocumented components.

"Undocumented components" only means anything when a semantic layer exists — document/paper/image nodes an LLM extracted meaning from, where an isolated node genuinely could be "mentioned but never explained further." A code-only graph (--code-only, or any run where semantic extraction never happened) has no such layer at all: there is nothing to be "undocumented" about, ever, on that graph. Offering it as a live possibility on every report regardless is misleading — a reader with a pure-code graph has no way to know that half the explanation offered to them can never be true.

Verified across 12 real code-only projects in this run: 0/12 ever had a document/paper/image node, and 100% of their isolated-node messages still offered "undocumented components" as if it might apply.

Root cause

report.py, the Knowledge Gaps section:

lines.append(
    "  These have ≤1 connection - possible missing edges or undocumented components. "
    ...
)

This string is unconditional — it never checks whether the graph has anything that could BE undocumented.

Suggested fix

The information needed is already in the graph, no new build-time flag required — VALID_FILE_TYPES (validate.py) already distinguishes document/paper/image from code/rationale/concept:

has_semantic_layer = any(
    G.nodes[n].get("file_type") in ("document", "paper", "image")
    for n in G.nodes()
)
reason = (
    "possible missing edges or undocumented components"
    if has_semantic_layer else "possible missing edges"
)
lines.append(f"  These have ≤1 connection - {reason}. ...")

Patched and verified locally: regenerated all 12 real code-only projects' GRAPH_REPORT.md — every one now reads "possible missing edges" only, with no wording claiming a possibility the graph structurally cannot have.

Related

Environment

  • graphifyy==0.9.65 (PyPI)
  • Windows 11
  • AST-only extraction (--code-only --no-label), no LLM

Activity

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