Refine Java overload ambiguity with resolver-owned argument types - #62
Merged
Conversation
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.
Summary
Stream C is the Java consumer of C0 (#60) and C1 (#61). C0 added optional argument types to
Reference/RefKey; C1 made use of that key dimension resolver-owned and default-off. This PR populates a Java argument vector only when every argument is inside the approved file-local Stage-1 surface; unsupported or unknown shapes keepNone. It refines a key only after the authoritative legacy pass returnsAmbiguousOverload.The typed retry preserves strict, loose, then varargs phase order; exact-array fixed arity; zero-tail varargs; integer radix, suffix, and range; unary numeric promotion; canonical
java.langspellings; and the stable legacy-first candidate union. Unsupported or unknown vectors remain honestly ambiguous. Java graph revision becomes 1; every other language remains at 0.The planning card's pre-measurement
AmbiguousOverload <= 2,800estimate is superseded by the owner ruling and the measured residual boundary: 3,152 commons-lang AO occurrences have no argument vector inside Stage 1. Their calls, nulls, lambdas, member expressions, array access, and general operators remain assigned to Streams H/I rather than being guessed here.The final-heavy array regression is also repaired: declared array receivers stop at
NeedsTypeInference, while true local and parameter receivers remainLocalBinding. Commons-lang's 71 rows/75 occurrences and gson's 12 rows/12 occurrences retain their full C0 keys.This diff changes Java-track implementation, Java tests, documentation, and attributed Java baselines/pins only. It makes no core/schema/model/store/pipeline, unresolved-reason taxonomy, dependency, or network-code change.
Attributed corpus results
AmbiguousOverloadNeedsExpressionTypeNeedsTypeInferenceNoMatchingDefinitionUnindexedSupertypeOccurrence totals are conserved: commons-lang 129,043, gson 42,433, and Java probes 22. The whole-row join reports zero changed non-AO rows and zero changed non-AO occurrences.
The movement units remain separate:
DefKind::AliascensusOnly the Alias census changes; every other definition kind is unchanged. The new entries are synthetic runtime forwarding identities for callable signatures, not a new definition category. The reporting audit found no alias/node cardinality entering scan reports, JSON/MCP output, baseline counts, or rate denominators.
Rebase provenance
The writes used the release binary built from signed commit
babb1f507b2a1ad25b7318595d1d31188ffcd821, SHA-256f5c39ebbc25edcd904b3d9369270aac7835847ae6d9b81e2ab97b7adb69ae87b.The exact commands were:
The
--commitvalues above are the exact committed provenance strings; baseline and pin formats print but do not verify them.Recorded verification
cargo fmt --check: rc 0.cargo check --tests: rc 0.cargo test --test java_resolve: 47 passed.cargo test --release --test java_corpus: 6 passed.git diff --check origin/main...HEAD: rc 0.Final gate
The earlier full-suite run stopped on the subsequently withdrawn, unmeasured
AmbiguousOverload <= 2,800estimate; it is not reported as a pass. The final gate used clean commitb2d82b7f3dda817310be2344b4b4345286593f11and finishedPASS_WITH_DEFERRED_WARM_TARGET:cargo test --release --all-features: rc 0.cargo clippy --all-targets --all-features -- -D warnings: rc 0.strace -f -e trace=networkreturned rc 0 and recorded no network syscall; the changed production-file manifest contains no network-code path.Performance used
/usr/bin/time -vwithtaskset -c 0,1. The small-repository budgets are cold <=5 seconds, warm <=0.3 seconds, and RSS <=128 MiB; every Flask and Express run passed:At 5M+ lines, cold peak RSS must remain below the 524,288 kB hard ceiling; 450,000 kB is the separate program-margin target. Cold <=60 seconds/MLOC and warm no-change <=1 second are timing targets, not Stream C gates.