Skip to content

fix: persist manifest after _rebuild_code (fixes #538) - #621

Closed
HughScott2002 wants to merge 1 commit into
Graphify-Labs:v5from
HughScott2002:fix/issue-538-manifest-on-rebuild
Closed

fix: persist manifest after _rebuild_code (fixes #538)#621
HughScott2002 wants to merge 1 commit into
Graphify-Labs:v5from
HughScott2002:fix/issue-538-manifest-on-rebuild

Conversation

@HughScott2002

Copy link
Copy Markdown

Summary

  • graphify update, graphify watch, and the installed .git/hooks/post-checkout all call _rebuild_code() but never call save_manifest().
  • Without a fresh manifest, detect_incremental() reads a stale baseline on the next call, so every file looks new and the rebuild re-fires every time.
  • One-line fix: persist the manifest at the end of _rebuild_code using the detected dict already built at the top of the function. Gated by try/except so a manifest write failure cannot fail the rebuild.

Closes #538.

Single edit covers three call sites: the CLI update command, the watch loop, and the post-checkout hook. The skill markdown pipeline mentioned in the issue's suggested fix is a separate surface and may still need its own Step 9 patch.

Test plan

  • Reproduce on v5: rm graphify-out/manifest.json && graphify update . → no manifest written, next detect_incremental reports every file as new.
  • Apply patch, repeat: rm graphify-out/manifest.json && graphify update .manifest.json written (~35KB, 360 entries on a real repo).
  • Re-run detect_incremental immediately after rebuild → returns new_total: 0, deleted: 0.
  • Manifest write failure path: confirm the warning prints and the rebuild still returns True.

graphify update, graphify watch, and the installed post-checkout hook
all call _rebuild_code() but never call save_manifest(). On the next
detect_incremental call the manifest read returns a stale baseline, so
every file looks "new" and the rebuild re-fires every time.

Add save_manifest(detected['files']) at the end of _rebuild_code,
gated by try/except so a manifest write failure does not fail the
rebuild. detected was already built at the top of the function, so
this is a one-line write at no extra cost.

Single edit covers three call sites: graphify update (CLI), the watch
loop, and .git/hooks/post-checkout. Does not touch the skill markdown
pipeline mentioned in the issue's suggested fix; that path may still
need its own Step 9 patch.
safishamsi added a commit that referenced this pull request May 1, 2026
…ne comments, query boost, cache race, markdownify, content hash

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@safishamsi

Copy link
Copy Markdown
Collaborator

The requested changes have been implemented in 3fdae8f. _rebuild_code now calls save_manifest(detected['files']) after a successful graph write, gated in try/except so a manifest write failure cannot abort the rebuild. Shipped in v0.6.2.

@safishamsi safishamsi closed this May 1, 2026
matzls pushed a commit to matzls/graphify that referenced this pull request May 10, 2026
…bs#638 Graphify-Labs#589 Graphify-Labs#586 Graphify-Labs#593: kimi thinking, manifest, inline comments, query boost, cache race, markdownify, content hash

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants