Skip to content

Manifest should be saved on every full rebuild, not only on --update #538

@saxster

Description

@saxster

Labels: bug, hook, drift

Body:

Problem

Running /graphify . (full rebuild) regenerates graph.json but leaves manifest.json untouched. The next /graphify --update then compares a stale manifest (from the prior save) against the current filesystem and reports ghosts / new files that are already reflected in the graph.

Reproducer:

  1. Run /graphify . — produces graph.json with 5,812 nodes.
  2. 4 days later, with several deletes + new files in between, run /graphify --update.
  3. Observe: Pruned 0 ghost nodes from 13 deleted file(s) — the deleted files were already absent from graph.json because step 1's rebuild excluded them. The manifest just hadn't caught up.

Expected

detect() save its output as manifest.json at the end of every successful full rebuild (Step 9 of the skill's pipeline). Currently only detect_incremental()save_manifest() persists; the full-rebuild path never calls save_manifest().

Suggested fix

In the skill's Step 9 for the /graphify <path> (non-incremental) path, add:

from graphify.detect import detect, save_manifest
full = detect(Path(input_path))
save_manifest(full['files'])

Or, move save_manifest() into the pipeline wrapper so both paths invoke it.

Workaround

Manually save the manifest at end of run:

from graphify.detect import detect, save_manifest
save_manifest(detect(Path('.'))['files'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions