Skip to content

import_graph_accuracy: hub-agreement metric, overlap@10 + Spearman (Part of #3797) - #6458

Merged
squid-protocol merged 1 commit into
mainfrom
churn/3797-20261024T0718Z
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/3797-20261024T0718Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3797 (slice 1: hub-agreement metric).

tests/tools/import_graph_accuracy.py now asks whether the engine's top-10 PageRank files match the top-10 on the parser-truth import graph. Both graphs use the same file set, weight 1.0, and the engine's own graph_engine.pagerank. A statement naming several files adds an edge to each. Reported per repo (hubs), then averaged per language as hub_overlap_at_10 and hub_spearman (over the union of both top-10s, average ranks for ties). Groups under 10 files or with no truth edge give no value. The numbers are written to the baseline, but regressions() does not gate them yet.

Baseline regenerated against the pinned corpus: purely additive (hub_* keys); precision and recall unchanged. Weakest: csharp 0.50 (its edge precision is 9.5%), cpp/php/rust 0.90.

Class / Sibling gaps

Class: rank-quality (hub agreement) metric of an engine graph vs a reference graph. Handled here: the import graph only. Gaps: the graph_coverage_chart.py column (asked for by the issue, separate slice); a hub gate in regressions() and the workflow; the same metric in call_graph_accuracy.py and call_graph_resolution.py. None is needed by a burned estate.

Gates

Plain pytest from /tmp on test_import_graph_accuracy.py: 22 passed. audit_check.py: all clear. Tree-wide guards (source_reads, generated_branch, sweep_plan): 127 passed. No engine change, so no golden bless.

Cross-repo: none.

🤖 Generated with Claude Code

…art of #3797)

Compares the top-10 PageRank files (engine's graph_engine.pagerank) on the
engine import graph vs the parser-truth graph, per repo, averaged per language.
Baselined, not gated.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 13:00
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant