Repository navigation
Conversation
|
Thanks for the pull request, @Max17190. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
No issues reported · High impact
The remapping function now counts shared nodes by previous community using Counter, rather than comparing every old and new community pair.
Code graph · 846 functions depend on this change
- 23 of 607 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 713a856 · 3 earlier findings not re-checked · Full report in the Graphify check
Community remapping keeps saved labels aligned after rebuilds. Count intersections only for pairs that share a node, and pin the existing tie-break and duplicate-member behavior in separate tests. Refs Graphify-Labs#2298 Co-Authored-By: OpenAI Codex <[email protected]>
8bd6e9e to
713a856
Compare
…batch Fold the C (#5410) and C# (#5043) AST-output changes into one combined _AST_CACHE_SCHEMA bump 52 -> 53 (52 is held by the unreleased 0.9.116 ObjC train), so cached C and C# extractions re-run. The go, cluster and extract fixes change no cached AST output. 0.9.118 changelog and version bump. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Landed in v0.9.118 via an authorship-preserving cherry-pick, so your commit keeps its credit. The overlap count is now O(total members) from shared nodes instead of O(communities²) pairwise intersections, with byte-identical results. Thanks @Max17190! |
Why
graphify updateandcluster-onlycarry community IDs forward by member overlap so saved labels follow their communities. The remapper currently intersects every old community with every new one, even when the two share no members.Summary
Related to #2298, which documents how saved labels depend on matching communities across builds.
Starting from the same cached 27k-node Graphify graph, five interleaved
cluster-onlyruns per variant on arm64 macOS and Python 3.13 gave these medians and ranges.In a separate paired one-file update on Guava's 84k-node graph, the remap stage took 698 ms before and 12 ms after.
Type of change
Verification & Invariants
For the same pair of partitions, the revised remapper returns the same community IDs and ordered member lists as the original. Equal overlap counts resolve in the same order. This keeps saved labels attached to the same communities. The remapper counts each distinct member once, including when an input member list contains duplicates.
Test Plan
python -m pytest -q tests/test_cluster.py tests/test_watch.pypassed 244 tests with one skip after the test cases were clarified.python -m graphify update .rebuilt the graph.python -P -m pytest -q testsyielded 11,734 passes, 135 skips, and 1 expected failure. Eight DNS and Unix-socket failures reproduced on upstream and passed when re-run outside the sandbox. Six Terraform worker cases passed on the isolated rerun oftests/test_terraform_modules.py.ruff check .andpython -P -m tools.skillgen --checkgraphify update .andgraphify cluster-only .against upstream on Graphify and Guava. The graph, HTML, report, and emitted community sidecars matched byte for byte.Graphify-specific checklist