Skip to content

resolver: Java built-ins on the untyped-receiver fallback + TS module-property receiver (Part of #4991) - #5030

Merged
squid-protocol merged 2 commits into
mainfrom
churn/4991-20261013T1326Z
Oct 13, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/4991-20261013T1326Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4991.

What

The untyped-receiver fallback in _resolve_one (gitgalaxy/core/call_resolver.py) had built-in method lists only for TS/JS (#4990). This PR:

  • Java: adds _BUILTIN_INSTANCE_METHODS["java"] (Object/String/StringBuilder/Collection/List/Set/Map/Queue/Deque/Iterator/Optional/Stream/boxed numbers) and _BUILTIN_NAMESPACES["java"] (Arrays, Collections, Objects, Math, String, boxed types, System, List/Set/Map, ...).
  • TS leftover handleMapResult -> util.ts has@696 (zod@2bf7b0630d53): diagnosed with explain_call.py as the import-stem step, not the fallback: util.propertyKeyTypes.has(k) has head util (an imported module) and the step treated the receiver as the module itself. A dotted receiver whose leaf is not a module/dir, calling a built-in name, now falls through to the fallback (util.has(x) on the module itself still links).

Measured (Level 2, call_graph_resolution.py)

before after
java (scip-java) confident_external 380 100
java strict precision 92.8% 97.8%
java precision / recall 99.7% / 64.9% 99.8% / 64.9% (resolution recall 66.6 -> 66.5)
typescript (tsc) confident_external 1 0 (recall 60.7 -> 60.6: 4 links moved to ambiguous)

Baselines regenerated. The remaining 100 Java externals are reflection/annotation/Writer names (getAnnotation, getType, write, getActualTypeArguments), deliberately not listed: getType/write are common repo names.

Class table

member status
TS/JS untyped receiver done (#4990) + module-property step (this PR)
Java done here
Python NOT covered: d.get() still links file (test pins it); pyan cannot flag external, no reference -> left open
Kotlin, C#, Ruby, PHP, Go unmeasured, left open

Golden

Both fixtures re-blessed via crucible_check.py --update --yes (13 files each: gpu_json, graph_sqlite, llm_brief, network_macro, fan_in/fan_out/import_edges/pagerank, blast radius, fingerprint/popularity/centroid/z-score). Attribution: import-edge/fan changes only in java (+ groovy fan); other languages move only through PageRank/coordinate ripple. (scope_check --expect java also lists unrelated shadow-logic counts that are not in the committed diff.) Overlaps with golden-moving #5027/#5029: take main and re-bless.

Gates

pr_gates --fast 5/5, --ratchets 7/7, test_call_resolver.py + gate tests pass, call_graph_resolution java|typescript --ci OK.
Test change: the #3837 entrySet fixtures were renamed visitMembers (entrySet is now a Map built-in).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 13, 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 13, 2026 13:45
@squid-protocol
squid-protocol enabled auto-merge (squash) October 13, 2026 13:45
@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 541c5a9 into main Oct 13, 2026
42 checks passed
@squid-protocol
squid-protocol deleted the churn/4991-20261013T1326Z branch October 13, 2026 14:02
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