Skip to content

fix(dedup): preserve same-source node attributes#2102

Closed
Synvoya wants to merge 1 commit into
Graphify-Labs:v8from
Synvoya:agent/dedup-preserve-attributes
Closed

fix(dedup): preserve same-source node attributes#2102
Synvoya wants to merge 1 commit into
Graphify-Labs:v8from
Synvoya:agent/dedup-preserve-attributes

Conversation

@Synvoya

@Synvoya Synvoya commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retain non-conflicting attributes when exact-ID nodes from the same source file collapse
  • preserve the deterministic collision survivor for conflicting values
  • keep cross-file references and genuine slugged-path ID collisions isolated
  • document the dedup-enabled build contract

Fixes #2091.

Root cause

The exact-ID pre-dedup pass selected one complete node dictionary and discarded the other. That made deterministic collision ranking work, but it also removed complementary AST/semantic data such as summary and confidence_score before NetworkX could merge attributes.

The fix gap-fills only missing keys from same-source duplicates. It does not import attributes from another source file, so the existing #1504 collision boundary remains intact.

Impact

Default dedup=True builds now retain AST precision (source_location, _origin) and semantic enrichment (summary, confidence_score) on the surviving node. Existing survivor values still win genuine conflicts.

Validation

safishamsi added a commit that referenced this pull request Jul 22, 2026
@safishamsi

Copy link
Copy Markdown
Collaborator

Thanks @Synvoya. This shipped in v0.9.24. Your commit was cherry-picked onto v8 (5a4b207) to preserve your authorship, with a follow-up making the gap-fill order-independent and gating it on source_file. Closed-unmerged here, but it is in the release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.24

@safishamsi safishamsi closed this Jul 22, 2026
wojiucece added a commit to wojiucece/graphify that referenced this pull request Jul 23, 2026
上游 0.9.25 主要变更:
- relicense MIT -> Apache-2.0(保留 LICENSE-MIT 双 license 兼容)
- Graphify-Labs#2112 删 .graphifyinclude 死代码 (detect)
- Graphify-Labs#2106 敏感文件过滤误删 topic 文档修复 (detect)
- Graphify-Labs#2102 dedup 顺序无关 gap-fill + same-source 属性保留
- Graphify-Labs#2095 claude-cli 结构化输出解析 (llm)
- Graphify-Labs#2082 别名 import 解析 calls 边 (extract)
- Graphify-Labs#2094 explain 高度节点分组断连 + 确定性 tie-break (cli)
- XAML .cs 扫描 hang 修复 (extract)

冲突解决(仅 pyproject.toml 1 处):
- version: 0.9.24+fork.1 -> 0.9.25+fork.1(保留 fork 标识)
- license: 跟随上游 Apache-2.0(license-files=LICENSE/LICENSE-MIT/NOTICE)
- requires: setuptools>=68 -> >=77(取上游)

Auto-merging 验证(0.9.24 经验:自动合并不等于语义正确):
- cli.py 自动合并通过,explain 实测正常(248 connections),UserPromptSubmit 端点完整
- 8 核心文件 py_compile 全通过
- grep 确认 24 处 fork 定制标记完整(PreToolUse禁用/UserPromptSubmit启用/
  OpenCode before+after+run+failopen/hub floor:30/codegraph防抖降级重试)
- check-custom.sh EXIT 0
- serve.py import OK(hub 改动后可加载)

注:本次上游未触及 serve.py/install.py/watch.py(fork 三大定制文件安全),
仅 cli.py 一处 Auto-merging 需语义验证。
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.

Default dedup=True discards a same-ID node's attributes instead of merging them — LLM semantic summaries are silently lost

2 participants