Skip to content

graphify-out/ written to corpus/CWD despite --out / --graph pointing elsewhere #1747

Closed

Description

@bbqboogiedwonsen

Summary

Output artifacts land in the corpus root / CWD even when --out <dir> (or --graph <path>) points elsewhere. Two distinct cases observed on 0.9.7:

Case 1 — extract --out still creates graphify-out/ inside the corpus

cd <repoA>
graphify extract . --out /tmp/scratch/tenant --no-cluster

The requested output is written to /tmp/scratch/tenant/graphify-out/ ✔ — but a stray graphify-out/ also appears in the corpus root (observed containing cache/ and partial content; also reproduced on a run that aborted at the no-LLM-key gate, which left <corpus>/graphify-out/ behind despite --out pointing elsewhere).

Case 2 — cluster-only --graph <elsewhere> writes results to CWD instead

cd <repoA>
graphify cluster-only . --no-label --graph /tmp/scratch/opexone/graphify-out/graph.json

GRAPH_REPORT.md, .graphify_analysis.json, .graphify_labels.json and the clustered graph.json were all written to ./graphify-out/ (CWD); the --graph target file remained un-clustered (community count 0). I.e. the flag selects the input, but outputs ignore its location.

Environment

  • graphifyy 0.9.7 (pipx), Python 3.14.5, macOS (arm64)

Expected

All outputs follow --out / live next to --graph. Impact: repo pollution and accidental commits — we had to gitignore graphify-out/ in every corpus repo as a workaround.

Activity

  1. safishamsi commented on Jul 10, 2026

    @safishamsi
    Member

    Fixed on v8 in c5db9ff (0.9.12). Both cases, verified with regression tests:

    Case 1 (extract --out leaving a stray graphify-out/ in the corpus): the graph itself already went to --out, but detect()'s word-count/stat-index cache used the scan root. It now honors --out via a threaded cache_root, so the corpus is left untouched. Confirmed: extract <corpus> --out <dir> --code-only writes graph and cache under <dir>/graphify-out/, with no graphify-out/ created in the corpus.

    Case 2 (cluster-only --graph <elsewhere>/graph.json writing to CWD): outputs now write beside --graph when that graph lives in a graphify-out/ dir — GRAPH_REPORT.md, the re-clustered graph.json, labels, analysis and html all land there, and nothing is created in the CWD. To avoid regressing the archived-backup restore workflow (#934, where --graph backup/graph.json intentionally restores into the CWD's graphify-out/), the beside---graph behavior is gated to graphs that sit in a graphify-out/ dir; an arbitrary path still restores into the CWD.

    Thanks @bbqboogiedwonsen for the clear two-case breakdown — that made both the repro and the #934 reconciliation straightforward.

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