Skip to content

graphify update silently skips .md files classified as paper (no option to disable) #4750

Closed

Description

@yeochul-jeon

Summary

A Markdown file whose first 3,000 characters match 3 of the 13 _PAPER_SIGNALS (e.g. an arXiv ID, the word "arxiv" and an "Abstract" heading) is classified as paper. graphify update (AST-only rebuild) re-extracts only the code bucket and AST-extractable document files, so such a .md gets zero nodes — while a similar .md without those signals gets its headings extracted. Nothing warns about it, and there is no setting or env var to opt out of paper classification for .md.

In our knowledge-base repo this silently dropped 6 Markdown notes (summaries/full texts of arXiv papers) from the graph, so graphify query could not reach them.

Reproduce (0.9.95, also 0.9.68)

mkdir repro && cd repro
printf '# Notes on a paper\n\narXiv 2501.00001\n\n## Abstract\n\nWe study X.\n' > paper_notes.md
printf '# Plain notes\n\n## Section\n\nSome text.\n' > plain_notes.md
PYTHONHASHSEED=0 python -m graphify update .

Result (graph.json nodes by source_file): plain_notes.md 3, paper_notes.md 0. Exit code 0; the only hint is the generic "For doc/paper/image changes run /graphify --update in your AI assistant."

Where (0.9.95)

  • detect.py:260-275 _PAPER_SIGNALS / _PAPER_SIGNAL_THRESHOLD = 3, :324 _looks_like_paper, :565 the .md → PAPER branch in classify_file
  • watch.py:1796 (code) and :1830 (document) — the only buckets _rebuild_code reads

Expected

Any of these would fix it for us (in order of preference):

  1. Keep the AST quick-scan for .md/.txt files even when they are classified as paper (the Markdown extractor works fine on them).
  2. A config/env option to disable paper classification for text documents.
  3. At minimum, a warning listing files skipped by the AST-only update because they were classified as paper.

Workaround we use

A launcher that replaces graphify.detect._looks_like_paper with a function returning False for .md, then calls graphify.__main__.main() (requires PYTHONHASHSEED to be set, otherwise _pin_hash_seed_if_needed re-execs and the patch is lost). It works on 0.9.68 and 0.9.95 but depends on private names.

Activity

  1. github-actions commented on Oct 25, 2026

    @github-actions

    Thanks for opening this issue, @yeochul-jeon. 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 Oct 25, 2026
  3. safishamsi commented on Oct 26, 2026

    @safishamsi
    Member

    Fixed in v0.9.96 via #4751, now on PyPI (pip install graphifyy==0.9.96). Markdown that detect() classifies as a paper is quick-scanned on update. Thanks for the report, @yeochul-jeon.

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