Skip to content

fix(update): preserve surviving hyperedges#1763

Closed
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/update-preserve-hyperedges
Closed

fix(update): preserve surviving hyperedges#1763
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/update-preserve-hyperedges

Conversation

@oleksii-tumanov

Copy link
Copy Markdown
Contributor

Summary

  • preserve existing hyperedges during watcher/AST-only graphify update reconciliation when their source file is re-extracted but their member nodes still survive
  • keep deletion and dangling-member pruning behavior unchanged
  • cover full update and incremental doc update paths

Fixes #1755

Result

Regression fixture keeps the doc-sourced semantic hyperedge after a no-op update:

Before: graphify update removed doc_flow_group
After:  graphify update keeps doc_flow_group -> [doc, doc_design]

Testing

  • uv run --frozen pytest tests/test_watch.py -q -k hyperedges (2 passed, 56 deselected)
  • uv run --frozen pytest tests/ -q --tb=short (3137 passed, 3 skipped)
  • uv run --frozen ruff check graphify/watch.py tests/test_watch.py (passed)
  • uv run --frozen python -m tools.skillgen --check (134 artifacts matched)
  • uv run --frozen graphify update . (rebuilt graph.json and GRAPH_REPORT.md; no tracked changes)

@safishamsi

Copy link
Copy Markdown
Collaborator

Merged on v8, authored to you. Verified: reproduced the loss (doc-sourced hyperedge dropped on update after a full build), confirmed your fix scopes eviction to deleted/symlink-outside sources so an AST-only rebuild preserves hyperedges whose members survive, and that a real code change which rewrites the graph keeps the hyperedge. Replacement-by-id and dangling-member cleanup stay intact. Full watch suite (58) green incl. your parametrized full/incremental test. Thanks — clean root-cause and minimal fix.

@safishamsi safishamsi closed this Jul 10, 2026
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.

graphify update deletes every hyperedge whose source_file is in the corpus, even on a no-op run

2 participants