Skip to content

graphify-out files use absolute paths breaking portability across machines and directories #1417

Closed

Description

@shiv-source

On macOS (Darwin 25.4.0), running /graphify . generates files in graphify-out/ that contain hardcoded absolute paths, making the outputs non-portable.

Affected files

manifest.json — All file keys are absolute paths:

{
  "/Users/username/projects/my-project/backend/cmd/server/main.go": {
    "mtime": 1781639382.9082484,
    ...
  }
}

This makes graphify --update fail to match any cached files when the repo is cloned to a different directory or shared between machines.

.graphify_root — Stores the absolute scan root:

/Users/username/projects/my-project

Should store the relative path (e.g., .) and resolve against CWD at runtime.

graph.json — Some source_file values leak absolute paths (files at repo root level), while most are correctly relativized. Semantic extraction subagents receive absolute paths in FILE_LIST and write them verbatim.

Cache directory (cache/semantic/) — Likely uses absolute paths for cache keys, same as manifest.

Expected behavior

All paths in graphify-out/ outputs should be relative to the scan root, so the outputs are portable across clones, machines, and users.

Steps to reproduce

git clone https://github.com/some-project
cd some-project
graphify .
# Observe manifest.json keys, .graphify_root, and graph.json source_file values

Environment

  • OS: macOS (Darwin 25.4.0)
  • graphify: v0.8.44, installed via uv tool install graphifyy

Activity

  1. safishamsi commented on Jun 22, 2026

    @safishamsi
    Member

    Fixed on v8 (ships in the next release).

    The portability-breaking paths are now relativized:

    Two of the sub-points are intentional, not bugs:

    • .graphify_root stays absolute by design. It's read by the post-commit/post-checkout git hooks, which run from the repo root regardless of where the graph was built. If you ran /graphify from a subdirectory, a relative . would point the hook at the wrong tree; the absolute path keeps the rebuild correct. It's per-machine state and shouldn't be committed (see the .gitignore guidance discussion in Question — manifest.json absolute paths + missing graphify-out/.gitignore: intended or oversight? #722).
    • cache/ keys are SHA-256 content hashes, not paths — already portable.

    If the .graphify_root behaviour is a problem for your workflow, reopen and we can revisit (e.g. storing it relative only when the scan root equals the repo root).

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