Skip to content

Graph coverage chart: per-language import / callee-name / call-resolution accuracy with n (#3796) - #3802

Merged
squid-protocol merged 1 commit into
mainfrom
claude/optimistic-heisenberg-bta91d
Sep 26, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
claude/optimistic-heisenberg-bta91d

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

This adds the graph counterpart of tri_comparison_chart.svg: one auto-generated chart that says which languages' graphs are measured, how well, and on how much. Epic #3772, closes #3796.

graph coverage

  • tests/tools/graph_coverage_chart.py is a pure function of the committed baselines plus graph_comparison_ledger.json, so it needs no scan. Its three panels:
    • imports (import_graph_accuracy);
    • callee names (call_graph_accuracy, Level 1);
    • call resolution (call_graph_resolution, Level 2).
  • Per cell:
    • precision and recall, with n;
    • the validated numbers, via graph_ledger.validated reading the ledger's last_seen_counts. These match the baselines' fp/fn exactly for all 22 language/graph pairs today;
    • a * on the side (P or R) that still has a shape with no verdict;
    • grey bars when n < 100: Go 11 imports, Shell 28, Rust 37, Perl 49, JavaScript 63;
    • call resolution labelled "vs pyan3 2.8.1" / "vs tsc 6.0.2".
  • The denominator is the engine registry minus pure data and prose formats (csv, json, markdown, pbtxt, plaintext, xml): 59 languages. 38 are listed by name as not measured in any panel. I didn't use the tri chart's 51-language list, because it needs tree_sitter_language_pack at import time and omits languages that do have import graphs (proto, nix).
  • graph-comparison-history.yml regenerates the SVG after its ledger refresh. It appends graph_coverage_history.csv only when a number or an n moved, so a push that changes nothing still opens no bot PR. The history is seeded with today's state.
  • Docs: a "The coverage chart" section in docs/self_scan/graph_comparison_README.md, and a pointer in docs/graph_accuracy.md.

Current state: imports 20, callee names 11, call resolution 2, out of 59 languages.

Type of change

  • Tooling / docs / CI workflow. No engine change.

CI checklist

  • python tests/tools/audit_check.py: ruff, mypy, dead-key and ast-accuracy are all clear; format is clean
  • New tests tests/tools/test_graph_coverage_chart.py (6), run as plain pytest from /tmp
  • python tests/tools/graph_coverage_chart.py --check: the committed SVG is current

Differential Scan target

N/A: no parsing or engine code changed.

Verification

  • pytest tests/tools/test_graph_coverage_chart.py: 6 passed. They cover:
    • a verdict moving only its side and clearing only its *;
    • resolution cells naming their reference;
    • unmeasured languages listed and small n muted;
    • history de-duplication;
    • the registry denominator;
    • the committed data rendering.
  • Rendered in headless Chromium and checked by eye for label collisions: repo names are cut to fit their panel, with +N for more repos.
  • The workflow YAML parses. The new step runs after both ledger refreshes, and its output files are added to add-paths.

Follow-ups (sub-issues of #3772): hub agreement #3797, wider import corpus #3798, the ledger verdict backlog #3799, and the README disclosure #3800, which will embed this chart.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt


Generated by Claude Code

…tion accuracy with n (#3796)

tests/tools/graph_coverage_chart.py renders docs/self_scan/graph_coverage_chart.svg from the
committed baselines and the graph comparison ledger (no scan): one row per measured language,
precision/recall per panel with n, `*` per side while a shape has no verdict, grey below n=100,
call resolution labelled "vs <tool> <version>", and every unmeasured registry language named.
graph-comparison-history.yml regenerates it after each ledger refresh and appends
graph_coverage_history.csv only when a number or n moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
@squid-protocol squid-protocol added this to the Compiler call-graph comparison milestone Sep 26, 2026 — with Claude
@squid-protocol squid-protocol added documentation Updates to standard operating procedures, guides, or wiki enhancement New feature, sensor, or structural signature testing Unit, integration, and E2E pipeline verification labels Sep 26, 2026 — with Claude
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit a14f8bb into main Sep 26, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the claude/optimistic-heisenberg-bta91d branch September 26, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to standard operating procedures, guides, or wiki enhancement New feature, sensor, or structural signature testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graph coverage chart: per-language import / callee-name / call-resolution accuracy, with n and "not measured"

2 participants