Skip to content

graphify uninstall deletes user-written content #2062

Closed

Description

@SinghAman21

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 install --project / claude install deletes CLAUDE.md content between a stray ## graphify match and the next heading (data loss) #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.

Activity

  1. safishamsi commented on Jul 21, 2026

    @safishamsi
    Member

    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

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