Skip to content

feat(graph): rank impact radius by weighted paths#646

Merged
tirth8205 merged 1 commit into
mainfrom
codex/port-weighted-impact
Jul 17, 2026
Merged

feat(graph): rank impact radius by weighted paths#646
tirth8205 merged 1 commit into
mainfrom
codex/port-weighted-impact

Conversation

@tirth8205

Copy link
Copy Markdown
Owner

Summary\n\nThis is the safe replacement for #606 and retains Stefan Hudici as co-author.\n\n- rank impacted nodes by their strongest weighted path;\n- expose impact_score on public impacted-node results;\n- keep SQLite and NetworkX ordering/scores aligned, including parallel edge kinds;\n- retain unresolved endpoints as traversal bridges without letting them consume result slots;\n- make truncation exact with a one-row sentinel and an exact total count;\n- validate decay/floor environment values as finite values inside the supported range;\n- replace recursive path enumeration with bounded best-score relaxation, one row per endpoint, so dense cyclic graphs cannot explode exponentially.\n\n## Verification\n\n- 12 focused SQL/NetworkX/public-tool tests passed;\n- 1,540 non-daemon tests passed locally, with 2 existing xpasses;\n- Ruff and git diff checks passed;\n- dedicated regressions cover best-path ranking, deep-strong versus shallow-weak paths, score-floor termination, unknown edge weights, parallel edges, ghost bridges, exact boundary truncation, invalid environment values, and a dense 12-node cycle at depth 25.\n\nThe macOS daemon test file is left to required CI because the third-party FSEvents thread segfaults in the local macOS runner; the GitHub Windows and Linux jobs remain the merge gates.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

code-review-graph review

Overall risk: 0.55 (MEDIUM) — 23 changed function(s)/class(es), 0 affected flow(s), 13 test gap(s)

Risk-scored changes

Risk Level Symbol Location Tested
0.55 medium code_review_graph/graph.py::GraphStore.get_impact_radius_sql code_review_graph/graph.py:652 no
0.55 medium code_review_graph/tools/query.py::get_impact_radius code_review_graph/tools/query.py:35 no
0.40 medium code_review_graph/constants.py::_bounded_float_env code_review_graph/constants.py:9 no
0.40 medium code_review_graph/graph.py::GraphStore code_review_graph/graph.py:151 no
0.40 medium tests/test_graph.py::TestWeightedImpactScoring._add_func tests/test_graph.py:499 no
0.40 medium tests/test_graph.py::TestWeightedImpactScoring._add_edge tests/test_graph.py:506 no
0.40 medium tests/test_graph.py::TestWeightedImpactScoring._ordered_qns tests/test_graph.py:515 no
0.35 low code_review_graph/graph.py::GraphStore._get_impact_radius_networkx code_review_graph/graph.py:850 no
0.35 low code_review_graph/graph.py::GraphStore._build_networkx_graph code_review_graph/graph.py:1400 no
0.30 low code_review_graph/graph.py::GraphStore.get_impact_radius code_review_graph/graph.py:623 no

Test gaps

  • code_review_graph/constants.py::_bounded_float_env (code_review_graph/constants.py:9)
  • code_review_graph/graph.py::GraphStore (code_review_graph/graph.py:151)
  • code_review_graph/graph.py::GraphStore.get_impact_radius (code_review_graph/graph.py:623)
  • code_review_graph/graph.py::GraphStore.get_impact_radius_sql (code_review_graph/graph.py:652)
  • code_review_graph/graph.py::GraphStore._get_impact_radius_networkx (code_review_graph/graph.py:850)
  • ...and 8 more without direct tests

Token savings: this graph-backed report used ~44,017 fewer tokens (~91%) than reading every changed file in full (estimated, chars/4 approximation).


Powered by code-review-graph — local-first analysis; no code leaves the CI runner.

@tirth8205
tirth8205 force-pushed the codex/port-weighted-impact branch 3 times, most recently from a33f62d to 1cd76a6 Compare July 17, 2026 16:55
Co-authored-by: Stefan Hudici <shudici@gmail.com>
@tirth8205
tirth8205 force-pushed the codex/port-weighted-impact branch from 1cd76a6 to 4284f05 Compare July 17, 2026 16:59
@tirth8205
tirth8205 merged commit 31feb78 into main Jul 17, 2026
11 checks passed
@tirth8205
tirth8205 deleted the codex/port-weighted-impact branch July 17, 2026 17:03
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.

1 participant