fix(java): externalize implicit java.lang bases onto ExternalModule nodes#666
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for implicitly imported java.lang types in Java class ingestion. It defines a set of java.lang class names and updates the deferred parent resolver to externalize these classes (such as Exception or Runnable) to java.lang instead of treating them as unresolvable guesses. New tests are added to verify this behavior. Feedback suggests adding Object to the list of java.lang class names to handle explicit inheritance from Object correctly.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|



Summary
Follow-up to #665. Java implicitly imports
java.lang, so a bareextends Exceptionorimplements Runnablenames a positively external base with no import statement to map it. The deferred-inherits resolver treated these as unresolvable module-anchored guesses and emitted nothing, losing real inheritance knowledge (class X extends Exceptionis one of the most common shapes in Java code).A new
JAVA_LANG_CLASS_NAMEStable (a superset of the existingJAVA_WRAPPER_TYPES, so wrapper types stay single-sourced) is consulted by_resolve_deferred_parent_qnexactly likeJS_GLOBAL_CLASS_NAMESis for JS globals: a bare base in the table resolves tojava.lang.<Name>and emits onto an ExternalModule node, the same node an explicit import of it would mint. A bare base NOT in the table still emits nothing; knowledge and guesses are not the same.Verification
test_java_lang_base_externalization.py(exception base, interface bases, and the unknown-base negative)uv run pytest codebase_rag/tests -n auto: 4640 passed, 0 failed, with the fix(audit): enforce zero dangling relationships across all language fixtures #665 dangling gate verifying every new edge endpoint existsuv run ty check: at the 352-diagnostic baseline