Closes #538: save_manifest at end of --update merge step#545
Conversation
Closes Graphify-Labs#538. The full-pipeline path's Step 9 already calls save_manifest, so the NEXT --update can diff against the full-rebuild's baseline. But the --update flow itself does NOT save the manifest after merging the incremental result. Consequence: a file deleted between --update Graphify-Labs#1 and --update Graphify-Labs#2 keeps reappearing in Graphify-Labs#2's deleted_files list (since the manifest still records its old mtime), generating a spurious ghost-node prune attempt every run. Add save_manifest(incremental['files']) at the end of the --update merge step in both skill.md and skill-copilot.md (the only two skill files carrying the merge step verbatim). The 'incremental' dict is already in scope from the prune block above; its 'files' key is the full current file list, which is exactly what save_manifest needs. Pure prompt edit — no code changes, no test impact.
There was a problem hiding this comment.
Pull request overview
Updates the --update pipeline instructions so that, after merging incremental extraction results into the existing graph, the manifest is persisted—preventing repeated “deleted file” drift across consecutive --update runs.
Changes:
- Add
save_manifest(incremental['files'])at the end of the--updatemerge step. - Mirror the same change in the Copilot skill variant.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| graphify/skill.md | Saves the updated manifest after the incremental merge so subsequent --update runs diff against the latest filesystem baseline. |
| graphify/skill-copilot.md | Applies the same post-merge manifest save to keep Copilot skill behavior aligned with the primary skill. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from graphify.detect import save_manifest | ||
| save_manifest(incremental['files']) |
There was a problem hiding this comment.
The save_manifest import is introduced mid-script inside this python -c block, while other imports are grouped at the top. For readability/consistency, move the from graphify.detect import save_manifest line up into the main import section of this snippet and keep the call site here.
| from graphify.detect import save_manifest | ||
| save_manifest(incremental['files']) |
There was a problem hiding this comment.
This snippet groups imports at the top, but from graphify.detect import save_manifest is added later. Consider moving that import up with the other imports to keep the python -c block easier to skim and maintain.
|
Fixed in v0.6.6. Available on PyPI: |
Closes #538.
Summary
Adds
save_manifest(incremental['files'])at the end of the--updatemerge step inskill.mdandskill-copilot.md.Why
The full-pipeline path's Step 9 already calls
save_manifest, so the next--updatecan diff against the full-rebuild's baseline. But the--updateflow itself does NOT save the manifest after merging the incremental result.Consequence: a file deleted between
--update #1and--update #2keeps reappearing in#2'sdeleted_fileslist (since the manifest still records its old mtime), generating a spurious ghost-node prune attempt every run. The drift never settles until a full rebuild runs.This was originally reported as "manifest should be saved on every full rebuild," but on inspection of v0.5.0 the full-rebuild path is already correct — the actual gap is in
--update. Fixing in the right place.Files changed
graphify/skill.md(line ~933) — primary skill templategraphify/skill-copilot.md(line ~825) — Copilot variant carries the merge step verbatimThe other 9 skill-*.md files don't include the
--updatemerge step inline.Test plan
--updateafter a deletion → verify manifest is rewritten and a follow-up--updatereports nodeleted_files