Repository navigation
[experiment A] untyped-receiver built-in method calls (Part of #4479) - #6388
Closed
squid-protocol wants to merge 1 commit into
Closed
squid-protocol wants to merge 1 commit into
squid-protocol wants to merge 1 commit into
Conversation
) An untyped-receiver call named like a stdlib method no longer links confidently to a same-named repo method. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is one arm (A) of the paired A/B agent experiment in #4479 (protocol
docs/agents/self-scan-ab-protocol.md). Part of #4991.What
A call through an untyped, non-
thisreceiver whose method name is a language built-in (items.add(x),d.TryGetValue(k),list.each) linked confidently (file/import) to a same-named repo method. #4990 fixed this for TS/JS (and Java) with per-language_BUILTIN_INSTANCE_METHODS/_BUILTIN_NAMESPACESingitgalaxy/core/call_resolver.py; the fallback in_resolve_oneis language-generic, so it only needed lists. This adds them for Kotlin (JDK lists plus kotlin.collections/text/scope-function names), C# (BCL, LINQ) and Ruby (core Object/Enumerable/Array/Hash/String), each with global static namespaces.Class / Sibling gaps
Class: any language that reaches the untyped-receiver fallback with a stdlib method name. Done here: Kotlin, C#, Ruby (Java, TS, JS were already done). Not done, still sibling gaps: Python (needs a check of
calls_out_qualifierscoverage; pyan Level 2 flags no lib targets, so it needs another measurement), PHP (methods only; confirm whether anything reaches the fallback), Go (ownerless-method language; stdlib type methods likestrings.Builder.WriteStringunconfirmed), and other languages with the same fallback (Scala, Groovy, Swift, Dart, Rust, C++) which have no list. The lists are unmeasured: no Level 2 reference exists for C# or Ruby, and Kotlin's was not run.Tests
tests/core_engine/test_call_resolver.py: for Kotlin, C#, Ruby, a built-in name on an untyped receiver isreceiver(not confident), a repo-only name staysfile,thisstaysclass, a repo class receiver staysqualified, and a global namespace static isnone. The old "other languages keep the rule" test now pins Python/PHP. Result: 81 passed in that file.Not run (experiment cost cap)
Golden bless,
crucible_check.py, the fullpr_gates, and the Level 2 measurement were NOT run. Parsing logic is untouched but the call resolver feeds file-graph edges, so a golden diff is possible.🤖 Generated with Claude Code