ID collision: a node with no source_file beats a sourced node with the same id (dedup._collision_rank)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #4496 @ayushcodes10 による — マージされずにクローズ
評価
調査の方向性
衝突のランキングは graphify/dedup.py の _collision_rank にあり、deduplicate_entities がこれを呼び出します。まず issue の再現手順を、sourced と blank を使って両方の到着順で実行してください。その後、_pick_winner が実際の source_file をすでにどのように優先しているかと比較します。完了条件は、到着順のどちらでも sourced のノードが残り、同じ id を持つ sourced の2つのノードが従来どおり解決されることです。リンクされた PR #4496 はマージされずにクローズされているため、まずその議論を確認してください。
索引モデルが issue の本文から書いたものです。
説明
Version: graphifyy 0.9.91 (unchanged since at least 0.9.49)
When two nodes share an id that neither node's file encodes, so that _defines_id is False for both, _collision_rank ties them on every key but the reversed path. An empty source_file gives (), which sorts before any real path. So the source-less node always survives, and the sourced one is dropped:
from graphify.dedup import deduplicate_entities, _collision_rank
sourced = {"id": "x", "label": "X", "source_file": "a.md"}
blank = {"id": "x", "label": "X"}
print(_collision_rank(sourced)) # (True, 1, 1, 'X', ('a.md',))
print(_collision_rank(blank)) # (True, 1, 1, 'X', ())
nodes, _ = deduplicate_entities([sourced, blank], [], communities={})
print(nodes) # [{'id': 'x', 'label': 'X'}]
It is the same in either arrival order, and graphify warns "keeping 'X' from '', dropping 'X' from 'a.md'". Source-less semantic nodes reach dedup because the out-of-scope filter (#1895) returns early on an empty source_file, and since such a node is never in the per-file semantic cache, every incremental merge carries it forward.
#3775/#3786 made "a real source_file beats none" the rule in _pick_winner. The exact-ID path does not have it (its reversed-path tie-break dates from #2532's fix in 0.9.36). A key such as not node.get("source_file") right after not _defines_id(node) would match. It changes no collision between two sourced nodes.
- 主要言語
- Python
- スター
- 124k
- フォーク
- 11.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Graphify-Labs/graphify のほかの issue
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)対応中かも @Deepjyoti-Sarmah が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4563 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates対応中かも @bercedev が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Graphify-Labs/graphify#4546 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
--update runbook: graph.json backup instruction comes after the diff that needs it, so the graph diff never runs対応中かも @sunildivakar96-cpu が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Graphify-Labs/graphify#4539 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Pi skill uses unsupported general-purpose subagent instead of delegate再び着手できるかも @bercedev が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Graphify-Labs/graphify#4494 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Graphify-Labs/graphify#3763 ·
メンテナーはふだん 1 日以内に返信
Graphify-Labs/graphify の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
521xueweihan/HelloGitHub#4115 ·
-
get_lldp_neighbors_detail: query asks for 'max-address' (typo for 'mac-address'), so remote_chassis_id is always empty対応中かも @Jah-yee が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
lesson-submission pending-review
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
Ikalus1988/MisakaNet#3899 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws-samples/sample-per-model-bedrock#549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100