graphify icon indicating copy to clipboard operation
graphify copied to clipboard

graphify uninstall deletes user-written content

Open SinghAman21 opened this issue 4 months ago • 1 comments

the section-strip regex matches ### graphify as well as ## graphify

The issue follows the conventions of the repo's existing reports (Summary / Why it matters / Reproduction / Root cause / Suggested fix / Environment), and I tightened a few things while writing it:

  • Repro runs through the real CLI, install claude --project → uninstall claude --project, not internal function calls — so nobody can dismiss it as unreachable.
  • The blast radius is five files, not one. I mapped each duplicated site to the file it rewrites: GEMINI.md (:726), .github/copilot-instructions.md (:817), AGENTS.md (:1553), CLAUDE.md (:1773), CODEBUDDY.md (:1863).
  • The framing is asymmetry with #1688, which hardened the install side against this exact bug via line.strip() == marker. That makes it a known-class regression rather than a novel report, which usually lands better.
  • The guards don't save you either — _CLAUDE_MD_MARKER not in content is itself a substring test, so a file whose only match is a user's H3 still passes the guard and proceeds to strip. I nearly missed this: my first verification script used the same substring check and gave a false negative, which is a decent illustration of how easy the mistake is.
  • The fix is validated, not proposed blind — I ran the line-anchored regex against a real post-install CLAUDE.md and confirmed graphify's own section is removed while both user H3 sections survive.

SinghAman21 avatar Jul 20 '26 15:07 SinghAman21

Fixed in v0.9.23: uninstall now matches the ## graphify heading only when a line is exactly the marker (mirroring the install-side #1688 hardening), so a user's ### graphify H3 is never deleted; applied across all six strip sites. https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.23

safishamsi avatar Jul 21 '26 18:07 safishamsi