[Bug]: graph_diff reports "no changes" when a call is reversed (skill --update summary)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #4170 @Mpasha17 による — マージされずにクローズ
評価
調査の方向性
Start at analyze.graph_diff and run the two-file reproduction from the issue, then inspect tools/skillgen/fragments/references/shared/update.md and the aider and devin core fragments. Check how the skill loads G_old, including paths.load_node_link_graph, and use the mentioned regression test as the guide. Done means a reversed call reports one new and one removed edge with correct source and target while no-edit and line-shift cases remain unchanged.
索引モデルが issue の本文から書いたものです。
説明
Pre-flight checks
- I have checked the Troubleshooting section in the README
What happened?
analyze.graph_diff reports no changes when a call reverses (a calls b becomes b calls a). The skill's --update flow uses it for the "what changed" summary (tools/skillgen/fragments/references/shared/update.md, plus the aider and devin core fragments). A reversed call is therefore invisible to the user.
There are two causes:
graph_diffkeys undirected edges by sorted endpoint pair, soa→bandb→aproduce the same key.- The skill loads
G_oldwith a plainjson_graph.node_link_graph()call, which loses the arc-order direction (see #4066). So even a direction-aware diff would have nothing to compare.
Expected: a reversed call shows as one removed and one new edge, with the correct source/target.
Measured through the skill's own code on a two-file project:
| Edit | Shown on 0.9.75 | Expected |
|---|---|---|
| no edit | no changes | no changes |
| call reversed | no changes | 1 new, 1 removed edge |
| lines inserted above functions | no changes | no changes |
| new call added | 1 new edge | 1 new edge |
Low severity: it only affects the update summary, not the graph.
Steps to reproduce
python - <<'EOF'
import networkx as nx
from graphify.analyze import graph_diff
def g(src, tgt):
G = nx.Graph()
G.add_node("normalize", label="normalize()")
G.add_node("tokenize", label="tokenize()")
G.add_edge(src, tgt, relation="calls", _src=src, _tgt=tgt)
return G
print(graph_diff(g("tokenize", "normalize"), g("normalize", "tokenize")))
EOF
Error output or graph output
{'new_nodes': [], 'removed_nodes': [], 'new_edges': [], 'removed_edges': [], 'summary': 'no changes'}
Graphify version
0.9.75 (v8 @ 48d7c0e)
Operating System
Linux
Python Version
3.12
Installation Method
built from source (git clone)
Additional Environment Details
No provider environment variables set. Reproduced on a clean checkout.
Additional context
Proposed fix (I'm happy to send a PR after #4066):
- Count an edge as reversed only when both graphs carry
_src/_tgtand the markers differ. In that case it appears in bothnew_edgesandremoved_edges. - Report
source/targetfrom the markers. - Have the skill fragments load
G_oldthroughpaths.load_node_link_graphand regenerate them with skillgen.
Gating on markers keeps today's output for callers that don't stamp them, which matters for the proposed public graph_diff in #164. The naive fix (key every edge by _src/_tgt) gives false positives today, because G_old comes back without markers.
Prototyped with a regression test that fails on v8 and passes with the fix. The no-edit and line-shift cases above still report no changes.
AI disclosure: I investigated this and wrote the reproduction and prototype with Claude Code (Claude Opus 5.5), and verified them myself.
- 主要言語
- 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 が 6 日前に担当しました。 オープン
難易度 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 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Graphify-Labs/graphify#4539 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Pi skill uses unsupported general-purpose subagent instead of delegate再び着手できるかも @bercedev が 9 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 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
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog check対応中かも @ocelotl が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
open-telemetry/opentelemetry-python#5825 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cuga-project/cuga-agent#1020 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
microsoft/playwright#43640 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
stac-utils/stac-fastapi-elasticsearch-opensearch#965 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信