Skip to content

fix(watch): preserve qualified file labels in no-cluster updates - #3363

Closed
VasuBansal7576 wants to merge 1 commit into
Graphify-Labs:v8from
VasuBansal7576:fix/watch-qualified-file-labels
Closed

fix(watch): preserve qualified file labels in no-cluster updates#3363
VasuBansal7576 wants to merge 1 commit into
Graphify-Labs:v8from
VasuBansal7576:fix/watch-qualified-file-labels

Conversation

@VasuBansal7576

Copy link
Copy Markdown
Contributor

graphify update --no-cluster writes same-basename files with ambiguous labels because the raw rebuild skips the file-label disambiguation used by fresh extraction. For example, pkg_a/errors.ts and pkg_b/errors.ts both become errors.ts after rebuilding.

Reuse disambiguate_file_labels_in_nodes after deduplicating nodes in the raw watch rebuild. Node IDs and edges remain unchanged. The regression checks both an initial rebuild and an incremental update after editing an importer.

Validation on current v8 at 937e59a:

  • The new regression fails on the unchanged release with {'errors.ts'} instead of the two qualified names.
  • All 149 watch tests pass on this branch.
  • Ruff and git diff --check pass.
  • AST-only graphify update . --no-cluster completes. Optional SQL, DM, Common Lisp and Robot Framework parsers are absent, and the existing Luau fixture reports a syntax warning.

The earlier CLI reproduction used a 15-file OpenWiki corpus after a rename, deletion and import rewire. Before and after graphs had identical node IDs and edge lists, with 197 nodes and 575 edges; only the two colliding file labels changed. These captures show that earlier comparison at 33362d9 / ddab7f0, not the rebased revisions above.

Before After
Before: both files labeled errors.ts After: directory-qualified labels

Checked existing open and closed work for overlap. #2218 handles community-label membership and visualization retention; #3342 handles external dependency retention. This change concerns file-node display labels in the no-cluster rebuild.

Apply the existing file-label disambiguation pass to the raw incremental rebuild path.

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. No changes could be formally verified in this run.


Graphify review — findings

Applies directory-qualified file labels on the --no-cluster update path by running disambiguate_file_labels_in_nodes over the deduped nodes, so file nodes sharing a basename keep the same display labels as a fresh extract instead of colliding after an incremental rebuild.

No blocking issues surfaced.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 573 functions depend on the 397 functions this change touches.

Health — this change adds coupling hotspots:

  • new: _rebuild_code() — 114 callers, 51 callees
  • new: dispatch_command() — 2 callers, 124 callees
  • new: watch() — 5 callers, 7 callees
  • new: _reconcile_graph_html() — 6 callers, 5 callees
  • new: _reconcile_existing_graph() — 1 callers, 8 callees
  • new: _reconcile_markdown_links() — 1 callers, 6 callees
  • new: test_poisoned_manifest_is_healed() — 0 callers, 6 callees

Verification — 573 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 409 function(s) in the blast radius were not formally verified this run

Formal verification

Could not verify: Could not verify \_rebuild\_code.

The verifier did not have enough to check \_rebuild\_code, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: parameter `watch_path` is annotated `Path` — outside the synthesizable primitive/collection set

· 7 more finding(s) on lines outside this diff (see the check run).

@safishamsi

Copy link
Copy Markdown
Collaborator

Shipped in v0.9.55 — landed on v8 via cherry-pick with your authorship preserved. Thanks @VasuBansal7576 — no-cluster watch/update now disambiguates same-basename file labels. Release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.55

@safishamsi safishamsi closed this Sep 5, 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.

2 participants