Skip to content

Call resolver: JVM package split over source sets is visible without an import (java recall 64.9% -> 71.5%) (Part of #3772) - #6409

Merged
squid-protocol merged 2 commits into
mainfrom
churn/3772-20261024T0731Z
Oct 24, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/3772-20261024T0731Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3772 (compiler call-graph comparison). Language picked: Java, the largest absolute gap against its reference (gson vs scip-java: 2,757 missed of 7,858 edges).

What changed

call_resolver.py: in java/kotlin/scala/groovy a package split over a module's source sets (m/src/main/java/p and m/src/test/java/p) was two directories, so new Gson() or a bare call from a test to a same-package class was ambiguous/unseen, never an edge. A new _package_dir maps both to one module-aware package key (pkg on _File/_Definition), used for the visibility checks only (_nearest_local, _visible_receiver, _other_visible_class, the unseen guard). Nearest-by-path ranking is unchanged; Go and C# keep directory = package.

Agreement before / after (java, gson vs scip-java 0.12.3)

metric before after
recall (gated) 64.9% 71.5%
resolution recall (gated) 66.5% 73.3%
confident precision (gated) 99.8% 99.8%
confident links 5,306 5,829
ambiguous/unseen 575 0
ambiguous/receiver 272 221
ambiguous/overload 1,645 1,754 (newly visible constructor overloads)
wrong 12 12
external 100 105
Ungated: ambiguous precision 24.7% -> 13.1% (the newly ambiguous overload rows), strict precision 97.8% -> 98.0%.
JavaScript gate unchanged. The TypeScript gate reads 68.8% recall / 99.5% precision against a 60.6% / 99.9% baseline on origin/main too (corpus drift, not this change): its baseline is not touched. Go and Python gates MISSING locally (no Go toolchain, no pyan3), CI covers them; this change cannot reach them (Python: not a source-root language).

Class / Sibling gaps

Class: JVM-family same-package visibility computed per directory instead of per package. Covered: java, kotlin, scala, groovy (tested for each), plus the other-module / other-package / Go guards. Sibling gaps (none needs a burned mainframe estate):

  • ambiguous/overload 1,754: same-arity overloads need argument-type discrimination (different mechanism).
  • ambiguous/receiver 221: chained receivers (getAsJsonObject().get()) need receiver typing.
  • not_extracted/same_name 119: this(...) / overloaded fromJson(...) calling a sibling overload is dropped like recursion (detector calls_out).
  • Real package declarations would replace the path heuristic (non-Maven layouts fall back to the directory).
  • network_risk_sensor same-package import edges may share the directory assumption (unchecked).
  • Kotlin/Scala/Groovy have no call-graph reference yet, so their gain is unmeasured.

Gates

Focused tests 366 passed; pr_gates --fast 7/7; --ratchets 9/9; crucible_check.py passes in both legs with no golden drift (no bless needed).

Cross-repo: none.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 24, 2026 03:34
…ible without an import (Part of #3772)

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 07:52
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@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 e40d422 into main Oct 24, 2026
91 checks passed
@squid-protocol
squid-protocol deleted the churn/3772-20261024T0731Z branch October 24, 2026 08:19
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