GitNexus/eval/tests
Abhinav Pandey bb484c9de2
fix(java): preserve receiver and generated dependency ownership (#3955)
* fix(java): preserve receiver and generated dependency ownership

Implement the coupled Java-local P1-P4 capture and resolution changes with exact-target, shadowing, array, resource, lambda and Lombok controls. Keep shared ingestion contracts and dependency versions unchanged.

Add a deterministic Java ingestion benchmark, before/after evaluation, measured baseline and receiver-delta accounting. Build, source/test typechecks and Java benchmark gates pass. The full 1,638-file run reports 34,713 passed, 78 failed and 95 skipped; remaining failures were diagnosed as environment or existing baseline families. The packed-runtime timeout passes in isolation.

* fix(java): resolve nested qualified types and judge each reference

- Register top-level and member types under their full names, so
  `models.Outer.Inner` and same-file `Uniq.Solo` receivers resolve.
- Decide each qualified reference at its own use site instead of
  refusing a spelling for the whole file. A member type bound at file
  level no longer shadows the package reading outside its declaring
  type; a root the use site may inherit, or a root type from another
  file, still refuses.
- Pin the exact expected set in the root-shadow test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): scope switch-group locals, compact-constructor receivers and commented array types

- Give each switch block its own lexical block scope, so a local declared
  in an old-style switch group ends with the switch instead of leaking to
  the rest of the method.
- Keep a scope's existing name claims unchanged when they cannot be
  parsed, instead of replacing them with only the new local claims.
- Treat a record's compact constructor as an instance context: it now
  binds `this` and collects implicit array receiver chains.
- Remove `//` and block comments structurally from written Java type
  spellings, so `User // note` + `[]` reads as `User[]`.
- Pin exact call targets in the annotated-lambda and array-alias
  adversarial tests so they fail when the edge is lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): keep a factory alias copied in a nested block

An alias of a call-result `var` copied inside a nested block
(`var u = make(); if (c) { var w = u; w.save(); }`) lost its producer,
so `w.save()` had no edge where BASE resolved it.

- Java: a copy in a nested block now keeps the outer producer when the
  source is never written in its own block. Any write to the source
  (before the copy, or later in a loop) refuses the copy. A copy never
  reads a source across a local or anonymous class body, where a field of
  the same name could shadow it.
- Shared scope extractor (no language named): a call-result assignment
  may carry an optional `@call-result-assignment.scope` anchor. The
  binding then lands in the scope that declares the copy, not in the
  outer call's scope. Every other provider leaves it unset, so its
  behaviour is unchanged.
- The unit test that pinned "no capture for a nested-block copy" now
  expects that copy to keep the outer producer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): tighten Lombok annotation identity and generated constructors

- Accept lombok.* beside an unrelated wildcard import; refuse only a second
  wildcard package known to declare the same simple name.
- Treat a base type outside the workspace as adding no member type names;
  an undecidable inherited scope now suppresses the field instead of
  letting a class-level default fall through.
- Do not inherit private member types, nor package-private ones across
  packages.
- Record single-static-imports as shadows of type-import-on-demand.
- Model FieldDefaults(makeFinal = true) like Value's implicit final for
  setters and generated constructors; unreadable options stay incomplete.
- Find member annotation types declared after enum constants.
- Model class-level Builder's all-args constructor only when no constructor
  is written and no XArgsConstructor is present.
- Tolerate comments between @ and the annotation name in the workspace
  pre-filter.
- Keep the original file when workspace re-extraction fails instead of
  throwing.
- Index package types by simple name once per reconcile.
- Fold the duplicated package-shadow review test into the lifecycle test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): resolve this/super array producers and harden the ingestion bench

- Resolve `this` and `super` producer receivers of indexed calls
  (`super.items()[0].save()`) through the lexically enclosing class and its
  direct superclass, and bind the member only when the selected producer's
  declared return type, indexed once per index step, names the folded owner.
- Pin the overloaded intermediate producer as unresolved, with the reason.
- java-ingestion --record: write an exclusively created temporary file and
  rename it over the baseline; refuse a symlinked baseline via lstat only.
- Persist only portable runtime provenance in the baseline and drop the
  machine-specific paths from the committed baseline.json.
- Document the receiver-resolution baseline move, list the Lombok worker
  tests in the cross-platform subset, and run java-ingestion --check in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): scope declared-type lookups and prove JDK containers at resolution

- Record components are owned by the record body; switch-group locals by
  their switch block; compact constructors are lexical owners.
- The declared-type lookup stops at a class, interface or enum body that can
  inherit members (extends/implements, anonymous or enum-constant body).
- Type parameters are scoped to the declaration that introduces them.
- More java.util / java.util.concurrent collections and the Map family are
  proven containers; java.util.* (and implicit java.lang.*) names are accepted
  when the file declares no such type.
- Each inferred element records the name that proved its container (raw
  java root, single import, on-demand import) and the scope where the
  container was written, carried in the Java capture side channel. Resolution
  refutes a proof when an enclosing class inherits a member type of that
  name, or (root/on-demand) when any type of that name is visible there.
- The element keeps its own lookup anchor, so a raw java.util.List over a
  local class resolves to that local class again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type var loops over a selected method's container result

- `var xs = producer(); for (var x : xs)` (and `for (var v : m.values())` /
  `m.keySet()` over a Map local) records the producer call with an element
  route, anchored at the loop body. A copied local and the existing write
  guards apply as for factory aliases.
- Each method's declared JDK container return type records, in its own file,
  what its element is per route and the proof that names the container
  (single import, on-demand import, raw java.*). Resolution checks that proof
  where the return type was written, with the same inherited-member and
  visible-type checks as other inferred elements, and registers the element's
  qualified spelling there.
- The loop variable is typed only from the exactly selected producer's
  confirmed element; overloads that cannot be selected, type-variable
  elements and a refuted container leave it unbound.
- Shared, additive: `CallResultAssignmentSite.element` (optional route) and
  `ScopeResolver.callResultElementType` (optional hook), consulted only for
  sites that carry a route; element sites are skipped when no exact callee
  selection exists. Existing call-result sites are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-baseline Java scope-capture and ingestion benchmarks

- bench/scope-capture: record the Java capture-logic change from this PR and
  its review follow-ups (java, java-local-types, java-deep-chain) with a
  _rebaselined_3955 note; fixture corpus unchanged, scaling within budget.
- bench/java-ingestion: the two local-element cases now expect the
  block-local class instead of an empty set; baseline re-recorded with
  --full --record and passing --check; README/RESULTS note the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): keep switch-group and constructor aliases, scope initializer receivers

- An alias copied in an unbraced `case 1:` group or a constructor body
  keeps its producer again: a switch block is one lexical block for all
  its statement groups, and a constructor body is a block. A write to the
  source inside the switch still refuses the copy.
- A bare-name assignment inside a local or anonymous class body, or to a
  lambda parameter, is no longer counted as a write to an outer local of
  the same name. The type-body check is now a depth comparison instead of
  a parent walk per copy.
- A local type declared between a producer and its copy no longer drops
  the copy: the copy is anchored at its own name and the producer is
  typed at its own call, so a local type named like the result type
  cannot capture it. The unit test that pinned the old drop now expects
  the copy.
- Instance field initializers and instance initializer blocks get the
  implicit-this array receiver like methods do. Where such a chain is
  attached, the context gets a `this` binding (a field initializer gets
  its own block scope over the value). Static fields, static initializers
  and interface constants still refuse.
- Annotated instanceof pattern types (`o instanceof @Ann User u`,
  `p.@Ann User`) bind the type without the annotation.
- receiver-binding docs mention compact constructors and initializers.
- The Java ingestion bench sorts fingerprint inputs by code unit, not by
  the runtime locale.
- The Lombok cache lifecycle test keeps its repository and cache under one
  temporary parent so a setup failure cannot leak a directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type array-element receivers and read visible qualifier roots as types

- Type an array access as its operand's component type, one dimension per
  index, so producers on array elements (`services[0].getUsers()[0].save()`,
  `values[0].clone().save()`) are selected on their real owner.
- Read the root of a dotted type spelling as a type when a same-package type,
  a single-type import or an on-demand import of a workspace package names it
  (JLS 6.5.4.1), in both the qualified-type key and overload type parsing;
  refuse when the root is ambiguous, statically imported or an inherited
  member type.
- Check private member types per use site: they are accessible only inside
  their own top-level class (JLS 6.6.1), not from another top-level class in
  the same file.
- Index type facts by start position in collectNamedTypes instead of a scan
  per class scope.
- Answer same-package type names for JDK container proofs from an uncapped
  per-package name index, so on-demand and raw `java.util.List` element
  inference survives packages over the 200-sibling injection cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-record the Java ingestion baseline after round-two fixes

The fingerprint sorts now use code-unit order, and a same-package class
named `java` now shadows the `java` package in the shadow probe (one new,
correct edge per shape). Semantic fingerprint and case counts are unchanged;
--check passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): refuse inherited member-type roots and type indexed overloaded producers

- A qualified type spelling whose root name lookup leaves unclaimed is no
  longer read as a package when an enclosing class inherits a workspace
  member type of that name (JLS 6.4.1); it refuses instead.
- A call result indexed by trailing subscripts (super.over()[0].save(),
  getUsers()[0].save()) is typed from the overload selected at that call,
  one element per index step. The shared selected-call path peels each
  trailing index step through the provider's existing elementTypeOf hook;
  it is inert for providers that return no producer for such chains.
  Ambiguous or unknown-argument selections stay unresolved.
- The try-with-resources self-read test pins its exact target set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): resolve inherited fields and static-imported Lombok bases

- Lombok workspace proof: a superclass named through a single-static-import
  now resolves to the workspace member type it imports (declared or
  inherited by the owner), so its member annotation types veto Lombok.
  An owner outside the workspace that may hide a workspace candidate, or
  an ambiguous import, makes the base uncertain instead of external.
- Declared element types: a lookup that walks out of a class body with
  supertypes keeps the outer candidate (or none) and records a proof that
  no workspace supertype declares a field of that name. Resolution checks
  it against the MRO and each supertype's own fields (captured per type,
  with access and proven container elements). Exactly one inherited
  field replaces the binding with that field's element; a private or
  other-package field does not shadow; an outside supertype, a field with
  an unprovable element, or several declarations leave it unresolved.
- Interface and enum constants are now bindings of their own type body,
  so they hide an enclosing field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-ingest-scaling): index same-named callable defs by position

boundCallableStartPosition scanned every same-label, same-name definition
for each callable and read native node positions per candidate, which is
quadratic for a file with many same-named methods. Each name bucket now
parses and sorts its positions once (lazily) and binary-searches the
callable's range; distance and tie rules are unchanged.

S2 (one file, N same-named methods): per-doubling growth 2.894 -> 2.208,
N=2000 pipeline 17.7 s -> 10.0 s; graph fingerprints identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-ingest-scaling): rank package siblings once per directory

populateNamespaceSiblings filtered and sorted every sibling class for
every file of a package (O(P^2 log P)). Proximity depends only on the
file's directory, so the nearest-first order is now built once per
distinct directory and each file walks it while skipping its own entries;
a file whose own name continues another sibling's path falls back to the
old per-file sort. Injection, truncation and merge semantics are unchanged.

S4 (one package, P files): scope-resolution per-doubling growth
3.98 -> 3.41, N=2000 scope resolution ~3.9 s -> ~2.8 s; graph
fingerprints identical across all languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-ingest-scaling): merge sibling type bindings through a per-package index

For an untruncated file, populateNamespaceSiblings re-walked every
sibling's module and class type bindings. Module maps grow as earlier
files merge, so the walk was close to cubic in package size. A per-bucket
index now keeps, per name, the first holder (module pass, updated as maps
grow) and the first two holders (class pass), so each file walks the
package's distinct names once, with identical refs and insertion order.
Truncated files keep the bounded merge and register what they append.

S4: scope-resolution per-doubling growth 3.41 -> 2.78, end-to-end 2.0
(linear); N=2000 scope resolution ~2.8 s -> ~1.8 s. A 20k-case
randomized comparison against the old merge found no difference; graph
fingerprints identical across all languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-ingest-scaling): cache file-scope segments once per parse tree

buildQualifiedName climbed to the root and re-read every top-level child
for each class, which is quadratic for a file with many top-level classes.
The file-scope segments now come from a per-extractor WeakMap keyed by the
parse Tree, computed once per tree with the same logic; the ancestor-scope
walk is unchanged.

S2: per-doubling growth 2.06 -> 1.90 (sublinear), N=2000 pipeline
8.7 s -> 7.2 s; graph fingerprints identical across all languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): keep import-typed container elements in packages past the sibling caps

A loop or lambda element typed through a single-type import is bound by its
qualified name (`models.User`). The qualified lookup refused every dotted
spelling in a file whose same-package visibility was incomplete, so a package
past the 200-sibling injection cap or the 500-file skip lost every such
element (and every written `models.User` declaration).

- qualifiedTypeKey: when visibility is incomplete, refuse only a root that the
  uncapped same-package type index holds (or when package facts are unknown).
  Sibling injection binds nothing else, so the lookup is exact for any other
  root.
- Add java-review-followups-large-package.test.ts: 205 and 505 members, on-demand
  and `java.util.List` spellings, with and without a same-package base, exact
  `User.save` pins with `Other.save` as a decoy, a same-package `List` negative,
  and a same-package `models` root negative at both sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): read an import-typed element by the import's canonical name

An element written as a simple name that `import models.User` brings in is
bound by the import's canonical name, `models.User`. Qualified lookup then
re-resolved that spelling at the use site, so a same-package class `models`
captured it and the element was typed as `app.models.User`. An import names a
canonical name, and a same-package type is not in scope in an import
(JLS 7.5.1, 6.3).

- Capture records, per binding anchor, which dotted element spellings are a
  single-type import's canonical name (loop and lambda elements, and declared
  JDK container return elements), carried on the Java capture side channel.
- Qualified lookup takes such a spelling as the imported type's name, without
  reading its root at the use site. It refuses when an enclosing class
  inherits a member type of the simple name, which shadows the import
  (JLS 6.4.1), and when one return type reads the same spelling both written
  and imported at one anchor.
- Tests: the import-root-shadow shape (exact models/User.save for lambda,
  loop and call-result elements), the written `models.User` control (member
  of the same-package class models, JLS 6.5.4.1), the ambiguous Map return,
  the inherited member type, and the import-root-shadow shape at 205 and 505
  members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): read inherited member-type roots as member paths; refuse unknown static on-demand owners

- A qualifier root that an enclosing class inherits as a member type now
  names that member type (`models.User` in a subclass of `Base` is
  `Base.models.User`, JLS 6.4.1 / 8.5) in both the receiver-typing key and
  overload argument typing, through one shared reading. It still refuses
  when two declarations are inherited, the member type is private or not
  accessible from the use site's package, the declaring supertype is not
  reached through the supertypes actually written (an external
  `extends lib.Base` is not the workspace `app.Base`), or a nearer class
  may inherit an unseen type of that name.
- A static on-demand import (`import static lib.Outer.*;`) now refuses the
  package reading of a qualifier root unless its owner is a single
  workspace type that names no supertype and declares no member type of
  that name, in both readings.
- Round-2/3 tests that pinned refusal for the inherited shape now pin the
  exact member-type target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): let a static-imported field leave a Lombok annotation proven

A single-static-import may name a static member type, which shadows
lombok.*, or only a static field or method, which does not (JLS 6.4.1,
7.5.3). The file-local proof cannot tell them apart, so it now leaves
such a name uncertain instead of refusing it. The workspace proof decides
it when the imported owner is a workspace type: an accessible static
member type, declared or inherited, refuses; an owner whose whole
hierarchy is in the workspace without one proves the annotation as if
the static import were absent; an external or ambiguous owner stays
uncertain. The reconcile now runs for a file whose single-static-import
shares a used Lombok annotation name when the owner gives a definite
answer, and a static import no longer hides a same-package sibling.

- PRRT_kwDOPXS5wc64Bfrc (lombok-synthesizer.ts:275)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type implicitly typed lambda parameters from a workspace functional interface

- An implicitly typed lambda passed as a method argument takes its parameter
  types from the single abstract method of the workspace interface that the
  exactly selected method declares for that argument (JLS 15.27.3, 9.9). The
  parameter type is read where the interface was written. Inherited abstract
  methods from workspace superinterfaces count; default, static, private and
  Object methods do not. A generic interface is substituted only by a plain
  class type argument. External, raw, wildcard, non-functional, ambiguous and
  arity-mismatched targets leave the parameter unbound, so it still never
  borrows an outer name.
- A call whose every argument is an implicitly typed lambda is decided by
  potential applicability (JLS 15.12.2.1-2) when the general selector has no
  evidence: the one complete-set candidate whose functional interfaces match
  the lambda arities is selected.
- The JDK container callback route is unchanged.
- Bench: `unknownLambda` now expects Item.audit ("P4 workspace SAM lambda");
  `nestedLambda` also expects Item.audit; a new `externalLambda` case keeps
  the shadow barrier measured for a lambda passed to an absent external type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): re-record the java-ingestion baseline for workspace SAM lambda cases

The corpus now expects Item.audit for a lambda passed to a workspace
functional interface and adds an external-callback case that keeps the
shadow barrier measured, so the workload, capture and target
fingerprints moved. All 413 cases per shape pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): find SAM lambda targets through on-demand imports and qualified types

- A functional interface that reaches the selected method only through a
  type-import-on-demand (`import cb.*;`) was refused: Java on-demand imports
  bind no names, so the scope-chain claim for it is absent. The lookup now
  takes the file's on-demand imports (JLS 6.4.1, 7.5.2) when nothing else
  claims the name: one workspace top-level type of an imported package, with
  ambiguity, static imports, java.lang names, packages without workspace
  files and inherited member types refused.
- A qualified parameter type (`cb.UserCb`, `models.User`) is read through the
  method parameter's own declared type and the provider's qualified lookup.
  A lambda parameter now takes the abstract method's own declared parameter
  binding, read where it was written.
- The capture synthesizer moves to sam-lambda-captures.ts so the resolution
  module can use the qualified-type helpers without an import cycle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): let no variable obscure the qualifier root of a type spelling

In a type, the qualifier of `Q.Id` is a PackageOrTypeName (JLS 6.5.4.1,
6.5.5.2): only types and packages compete for `Q`, and obscuring (JLS
6.4.2) applies to expression names only. The root lookup for a qualified
declared type stopped at the first scope that owned the name, so a
parameter, field, local, lambda parameter or method named like the root
(`void accept(cb.UserCb cb)`, `void run(models.User models, ...)`) made
the spelling refuse; a field next to a member type of that name gave two
owners and refused too. The lookup now passes over scopes that own the
name only as a value and keeps only type bindings where both meet. Type
claims, imports, local classes and type parameters answer as before, and
receiver expressions keep their variable-first lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): let no variable refute a JDK container element proof

A `var` element taken from a JDK container keeps its binding only if the
container's name means the JDK type where it was written. That check
looked the proof name (`java` of `java.util.List`, or an on-demand
`List`) up with a plain type-purpose claim lookup, so a field, parameter
or local named `java` or `List` refuted the proof and dropped the
binding. The name is always written in a type, where only types compete
(JLS 6.5.4.1, 6.5.5, 6.4.2), so the check now shares the type-name lookup
the qualified type bindings use: scopes that own the name only as a value
are passed over, and a type of that name still refutes the proof.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(java): index overload-resolution source definitions per name, file and qualified name

Enclosing-class, inherited member-type and qualified-root lookups called
sourceDefinitions(simpleName) on every type lookup and then filtered the
whole result by file or qualified name. When many files each declare a
nested type with the same simple name (an inner In, Builder or Holder),
every lookup rescanned all of them, so scope resolution grew
quadratically: x2.96 then x4.35 per doubling on 500-2000 subclasses that
read an inherited member-type root.

Definitions are now collected once per name per resolution state and
bucketed by file and by source-qualified name. The same shape now grows
x1.58 then x1.83 per doubling with identical CALLS output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): keep an explicitly injected constructor beside a clashing Lombok one

When a Lombok-generated constructor has the same signature as a written
one, every written constructor was dropped from Spring DI, including one
marked @Autowired or @Inject. Lombok still generates the clashing
constructor (a compile error) and never removes the written one, so the
written, explicitly marked constructor is still an injection site. Only
the generated constructor facts and the sole-constructor deduction stay
refused.

- spring-di: drop the per-constructor skip on a signature clash; the
  implicit and generated paths are already gated by soleConstructor.
- Unit tests now check clash detection through hasSignatureConflict
  instead of through an empty site list.
- New integration test java-review-followups-r5-spring pins the INJECTS
  edges for @Autowired / @Inject under a clash, no edge from the
  generated signature, no implicit edge for an unannotated clashing
  constructor, and unchanged no-clash cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type this and enclosing-local copies inside anonymous classes

- `this` in a method of an anonymous class body (or a bodied enum
  constant) is bound to the synthesized anonymous class, so `this.own()`
  selects the anonymous class's own or inherited member instead of the
  enclosing type's same-named method; such bodies get no `super` binding
  borrowed from the enclosing class.
- `var copy = value` inside a local or anonymous class method now keeps
  the producer of an effectively final enclosing local. The copy is
  refused when the source is written anywhere, when the class body
  declares a variable of that name, when the body is an interface, enum,
  record or static class, or when resolution cannot show that no
  supertype of the class declares a field of that name (a supertype
  outside the workspace may).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): pin UTF-16 type spelling offsets and split JDK element routes

- Type spelling: node indices from the Node tree-sitter binding are UTF-16
  string offsets on both the direct and the chunked parse path, so
  javaTypeText slices node.text in the same unit. Pin exact spellings for
  non-ASCII (two- and four-byte UTF-8) names before annotations and
  comments, and add an end-to-end case where such spellings resolve calls
  to the qualified member type and not to a same-package decoy.
- JDK element routes past the sibling cap: Java keeps one CALLS edge per
  caller and target, so give the forEach lambda and the enhanced-for loop
  their own methods; each must resolve to User.save on its own, and both
  must stay unresolved when List is shadowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): accept every JLS Java identifier in written type spellings

Java letters include all Unicode letters, letter numbers, currency symbols
and connectors; identifier parts add digits, combining marks and format
characters (JLS 3.8). Several Java-provider patterns used ASCII `\w`, or
`\p{L}\p{N}`, so a non-ASCII name was refused or cut at its first
non-ASCII character:

- declared-type-captures: imports, written element types and their tokens
  (for-each and forEach over List<Äußer.Ünïcödé> stayed unresolved).
- overload-resolution: the type-use annotation strip removed only the ASCII
  prefix of `@Nötig`, so `Äußer.@Nötig Ünïcödé` read as
  `Äußer.ötigÜnïcödé` and could select the wrong overload; names with a
  combining mark made the whole overload set undecidable.
- sam-lambda-types: functional interfaces and type arguments with a
  combining mark left the lambda parameter untyped.
- lombok-workspace-proof: a base class with a non-ASCII name was
  unresolvable, so a field-level @Getter was refused; the annotation scan
  read a truncated name.
- lombok-constructors: the imported head of a constructor signature was the
  ASCII prefix (`Straße` expanded through `import q.Stra;`).

All of them now use one definition in type-spelling.ts (start
[\p{L}\p{Nl}\p{Sc}\p{Pc}], part adds \p{Nd}\p{Mn}\p{Mc}\p{Cf}), built into
anchored, linear patterns. ASCII behaviour is unchanged.

Also correct the preprocessSource comment: with this binding's string
input, startIndex/endIndex and columns are UTF-16 code units, not UTF-8
byte offsets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scope-resolution): type a dotted array element through the qualified lookup

An index step peels a container's declared spelling to its element and
looked the element up by plain class binding. A qualified element
(`Outer.Inner[]` -> `Outer.Inner`) is a type written where the container was
declared, so it now goes through the provider's qualifiedTypeLookupSpelling
exactly as a declared type of that spelling does: from the declaration's
scope and lookup position, with the hook's refusal final and no simple-name
retry. Undotted elements, providers without the hook, and hooks that supply
no qualified spelling keep the unchanged plain lookup (Go, Kotlin and C++
hooks return no spelling for a dotted element, so only Java changes).

Java `values[0].save()` over `Outer.Inner[]` parameters, locals, fields and
`this.field` now resolve to the nested type rather than nothing, imported and
fully qualified roots resolve to their package, an inherited member type
shadows a same-package top-level one, and an ambiguous inherited root stays
unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(java): read no extra parents for anonymous-class this and enclosing-local copies

The anonymous-body check in the receiver binding read the class body's
parent twice per method, and each anonymous-class method walked its own
type identity. The walk now recognizes the anonymous host from the node
it came from, and each host's identity is computed once per file and
shared with its declaration. The enclosing-local alias records each type
body's owner on the way down instead of reading it back.

The Java member-read cost test is back to 40 reads; a new case pins a
fixed number of reads per anonymous class at two file sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-baseline Java scope-capture for anonymous-class this bindings

Methods in an anonymous class or enum-constant body now bind `this` to
that body's JLS binary class (Outer$1, M3$1, N$1$1) instead of the
enclosing class. Diffing f3852a2e2 against the candidate over the same
corpus gives 27 changed capture lines, all such bindings in
java-local-class-naming; capture group counts and scaling ratios are
unchanged. All 17 languages pass --check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): accept identifier-ignorable controls and keep the spelling corpus apart on APFS

Character.isJavaIdentifierPart also accepts the identifier-ignorable ISO
control characters (U+0000-U+0008, U+000E-U+001B, U+007F-U+009F), so the
written-type spelling patterns accept them too; whitespace controls stay
separators. The non-ASCII spelling corpus no longer pairs `straße` with
`strasse`, which a case-insensitive APFS volume folds to one directory, and
the corpus now runs on the macOS and Windows file-system matrix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): spell a declared return type without annotations or comments

The selected-return index read a method's @declaration.return-type as raw
source text, so `User @Mark [] users()` gave `User@Mark` after the index peel
in `users()[0].save()` and the call lost its edge; a comment inside the type
(`User /* c */ []`) and annotated trailing dimensions (`User users() @Mark []`)
failed the same way. The capture is now spelled as @type-binding.return
already spells it: javaTypeText of the type plus the bracket count of the
method's own dimensions. A record accessor's synthesized return type takes the
same spelling (`record Rec(User @Mark [] users)`).

javaTypeText also drops whitespace, so `Map<String, User>` is now
`Map<String,User>`. The proven JDK-container return facts that a `var` loop
over a selected result reads are matched against that string, so they record
the same spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(scope-resolution): type a producer's peeled qualified element through the qualified lookup

`make()[0].save()` over `Outer.Inner[] make()` peeled the return type to
`Outer.Inner` and looked it up by plain class binding, which binds nothing for
a member-type path, and a selected producer turns the structural fold off, so
the call stayed unresolved. A peeled element that is still dotted is now
looked up through the provider's qualifiedTypeLookupSpelling from the scope
where the return type was declared, exactly as an indexed parameter, local or
field of that spelling is (07a0890b5); the hook's refusal is final, with no
simple-name retry. Unpeeled and undotted spellings, and providers whose hook
gives no spelling for a dotted rawName (Go, Kotlin, C++), keep the old path.

Java prepares its qualified keys per file from bindings it will be asked
about. A method's array return type is now one of them, read at the method's
own scope (as the workspace index records it), because that reading can name
an inherited member type that the hoisted module-level return binding does
not.

Same-package, imported and fully qualified `Outer.Inner[]` producers, a nested
`grid()[0][0]` over `Outer.Inner[][]`, an inherited producer called from
another package, and an inherited member-type root now resolve to the nested
type; a top-level `Inner` decoy is never the target, and a root inherited from
both a superclass and an interface stays unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-baseline Java scope-capture for normalized return-type spelling

A method's @declaration.return-type is now spelled with javaTypeText. Diffing
f0364a94c against the candidate over the same corpus gives 3 changed capture
lines, all in java-overload-types, each a `Map<Long, Perm>` return now spelled
`Map<Long,Perm>`; the corpus has no annotated or commented return type.
Capture group counts (4288) and the synthetic DAO are unchanged, measured Java
scaling is 0.993 < 1.5, and java-local-types and java-deep-chain keep their
fingerprints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): pin SAM lambda type arguments to the callee declaration scope

javaSamLambdaParameterType reads a functional-interface type argument
(`Item` in `run(Generic<Item> g)`) in `returned.declaredAtScope`, where
`returned` is the exactly selected callee's own declared return type, so
the name is read where the callee's parameter type was written. Rename
the local `callScope` to `calleeScope` so it no longer reads as the
call's scope, and pin the reading with a caller-side same-package `Item`
and a caller-side single-type import of another `Item`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type a lambda by the selected workspace SAM when its JDK container reading is refuted

`values.forEach(value -> value.save())` with `values` written as a JDK
container (`java.util.List<T>`, or `List<T>` under `import java.util.*`)
took capture's JDK forEach element route, behind a container-identity
proof. Where a workspace type gives that spelling another meaning (a
same-package class `java` obscuring the package root, a same-package
`List` over an on-demand import, or an enclosing local read through an
anonymous class body), resolution refutes the proof and removes the
binding, but capture never emitted the workspace functional-interface
route for that lambda, so the parameter stayed untyped even though
`forEach` itself was selected.

Capture now also emits the SAM call-result sites for such a lambda,
marked as a fallback. A new language-neutral
`ScopeResolver.callResultAssignmentApplies` hook, decided once before any
call-result binding is cleared or applied, lets Java keep a fallback site
only where validation removed the JDK binding, so a proven JDK container
keeps its element type and its receiver reads are not held back.

The java-ingestion corpus's shadowed-root case asserted no edge for a
valid call. Its `forEach` took `java.util.function.Consumer`, which the
provider does not model as a functional interface for a workspace
callee, so the fixture now uses a workspace `ShadowCallback<T>` and
expects `ShadowOther.save`, still forbidding `ShadowItem.save`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-record the Java ingestion baseline for the shadowed-root forEach case

The shared `shared/java-root-shadow` case now expects
`ShadowProbe.raw -> ShadowOther.save` through a workspace
`ShadowCallback<T>`: one negative case becomes positive per shape
(small 272/141 -> 273/140, large 1064/549 -> 1065/548, dense
1512/549 -> 1513/548), with one more file and 46 more source bytes.

With the candidate analyzer the previous corpus reproduces the previous
graph and semantic fingerprints exactly; only the capture count moves
(+36 small, +132 large/dense), all from the fallback lambda sites. Under
the same analyzer the new corpus adds three ShadowCallback nodes, their
three structural edges and the one CALLS edge, and removes nothing.
All 413/1613/2061 cases pass; --record and --check pass with every
ratio under 2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type implicit lambdas through a workspace callee's JDK functional interface parameter

A lambda passed to a selected workspace method whose parameter is a
`java.util.function` interface (`Consumer<User>`, `BiConsumer<A,B>`,
`Function<User,String>`, ...) stayed untyped: only workspace functional
interfaces were modelled. A small canonical-name table in
sam-lambda-types.ts now gives each interface's abstract-method parameters
in terms of its type arguments (a primitive parameter of ObjIntConsumer
and friends stays untyped; Supplier, Runnable and Callable take none).

The written name must first be proven to denote the JDK type in the
callee's method scope, through the JDK container proofs the PR already
checks: a canonical `java.util.function.X` whose `java` root no type
obscures, a single-type import of it, or a `java.util.function.*` import
with no visible workspace type, single or static import, type parameter
or inherited member type of that name. The proof check moves out of
validateJavaQualifiedContextualBindings as javaContainerProofHolds so
both use it. A type argument substitutes only as a plain class name read
in the callee's scope; wildcard, raw, qualified and nested forms answer
nothing, and per-file import and type-name indexes keep each lambda site
constant cost.

A single-type import also shadows a top-level type of another file
(JLS 6.4.1). The workspace SAM lookup returned a same-package interface
even where the file single-imported another one, typing the lambda by the
wrong interface; it now refuses that type.

The java-ingestion corpus's shadowed-root case is the reviewer's original
`forEach(Consumer<ShadowOther>)` again, expecting ShadowOther.save, with
the workspace ShadowCallback variant kept as a second case through
`java.util.Set`. The Lombok cache fixture's implicit `Consumer<CacheOther>`
lambda now resolves `x.audit()` to CacheOther.audit; the field `x`
(CacheItem) is still never borrowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(bench): re-record the Java ingestion baseline for the JDK Consumer shadowed-root case

`shared/java-root-shadow` is the reviewer's original
`forEach(Consumer<ShadowOther>)` again and now resolves to
ShadowOther.save through the JDK Consumer; the workspace ShadowCallback
variant is kept as `shared/java-root-shadow-callback` through
`java.util.Set`. One expectation is added per shape: small 273/140 ->
274/140, large 1065/548 -> 1066/548, dense 1513/548 -> 1514/548.

With the candidate analyzer the previous corpus reproduces the previous
graph, semantic, capture and workload contracts exactly. The new corpus
adds the Set member type, its forEach, ShadowProbe.callback, their three
structural edges and callback's two CALLS edges, and removes nothing.
All 414/1614/2062 cases pass; --record and --check pass with every ratio
under 2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): read inherited protected and simple-name member types and single static imports in type spellings

A protected member type is inherited by a subclass in another package
(JLS 6.6.2, 8.5): `Box.Item` in `class Child2 extends a.Base2` now names
`a.Base2.Box.Item` when `Box` is protected. NamedType records package
access and the enclosing type of each protected type on the path; a use
outside a subclass body of that type is refused per use site.

A simple type name that an enclosing class inherits as a member type now
names that member type, which shadows a same-package, same-file or
single-type-imported type of that name (JLS 6.4.1). `Nested` in
`class Child extends g.Base` beside `h/Nested.java` bound h.Nested before;
it now binds g.Base.Nested, in receiver typing (the
qualifiedTypeLookupSpelling hook) and in overload parameter typing. A
nearer declaration (a member of a class on the way, a local class) still
wins; an ambiguous or inaccessible inherited reading refuses.

A single static import `import static p.Outer.Inner;` now makes
`Inner.Nested` the member path `p.Outer.Inner.Nested` (JLS 7.5.3) in
qualifiedTypeKey and qualifierRoot alike. An import that provably brings
in no type (a static field or method) is passed over; an owner outside
the workspace, an owner with supertypes, an inaccessible member type or
two single imports of the name refuse. This also stops `Inner.Nested`
binding a same-package `Inner` when the import's owner is unknown.

The overload path finds the classes enclosing a position through a
per-file nesting index (binary search and a walk outward) instead of a
scan of every type in the file, and the simple-name check reads only the
scopes out to the inheriting class, never the file-level bindings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(java): index overload type facts by name

typeFact scanned every type fact in the definition's file on its first
call for each definition, so finding the classes enclosing a use site in
a file with many nested classes grew with the square of the file. Look
the candidates up by name instead: the facts whose name ends the node id
after a `:` or equals the qualified name, in file order, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): read inherited member types per direct supertype, dropping ones not inherited

A class inherits only the non-private member types accessible to code in
it, and a member type a class declares hides every inherited one of that
name (JLS 8.2, 8.5). What a class inherits is now read per direct
supertype, memoized per class and name: the supertype's own declaration
of the name, or else what it inherits in turn, less the types that do not
pass into the class. A private member type, or a package-access one of
another package, drops out instead of refusing, so the name reads as it
would without it: `Nested` in `pq.PkgChild extends pp.PkgBase` (with a
package-private `PkgBase.Nested`) is `pq.Nested` again, as on the base,
and `Box.Item` there is the same-package `pq.Box.Item`. `Builder` in
`C extends B` is `B.Builder` when `B.Builder` hides `A.Builder`, and in
`D extends A` it is `A.Builder`; two distinct declarations from different
direct supertypes stay ambiguous, and one declaration reached through two
interfaces is not.

`inheritsJavaMemberTypeNamed` reads the same per-supertype inheritance,
and the overload path no longer refuses a simple name on its own scan of
nested types (`inheritsMemberTypeNamed`), which counted types nested
anywhere in an ancestor, private and inaccessible ones included; the
inherited reading there is `inheritedSimpleType`. NamedType records each
type's own access, the `public` the type facts already add to an
interface or annotation member included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(java): index the overload type-name lookups by name and nesting

resolveTypeName scanned every type in the file for a simple name visible
at the use, every import for static and single-type imports, and every
same-named definition for the one a type fact names, on each call. A file
with many nested classes, or many member types of one name (a Builder per
message), made that grow with the square of the file: 8 / 26 / 253 ms at
250 / 500 / 1000 nested subclasses.

- The nearest visible type of a name comes from the file's types of that
  simple name nested by visible range: one binary search and a walk out.
  Visible ranges nest, and equal ones nest in file order, so the
  innermost, last-in-file choice is unchanged.
- Static and single-type imports come from the per-file import index,
  with a flag for a static on-demand import.
- A type fact's definitions come from the same-named definitions keyed by
  node-id suffix and qualified name, which is how a type fact names them.
- The enclosing-class nesting shares a generic range nesting.

resolveTypeName now totals 6.5 / 6.0 / 19.2 / 40.4 ms over 1250 / 2500 /
5000 / 10000 calls at 250 / 500 / 1000 / 2000 nested subclasses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style(test): format the renamed ASCII twin expectation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-nested-member-type-scaling): merge Java bindings once per scope and name

Java's mergeBindings hook keeps the best tier and dedupes by definition, which
is associative, so finalize can batch each (scope, name) list and merge it once
at freeze instead of re-merging the growing list on every append. One file with
N same-named member types no longer pays N^2 tierOf calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-nested-member-type-scaling): stop copying a frozen same-name binding list per lookup

A lookup that reaches a module scope with N same-named bindings copied that
list three times per call (the bindingsAt spread, the position filter and the
purpose filter) even when nothing was removed, and followChainPostFinalize then
called producerTypeRef on every element. The finalized bucket is frozen, so it
is now returned by reference when it is the only channel, both filters return
the original frozen array when they would keep every element (per-array facts
cached in a WeakMap), and the producer scan visits only bindings that own a type
fact, cached per (indexes, frozen array). Results are unchanged; only frozen
arrays are aliased.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-nested-member-type-scaling): find a type or method fact by position in logarithmic time

typeFact and methodFact chose the first file-ordered fact whose range contains
the definition by building, sorting and scanning every same-named candidate on
each call, so N same-named member types cost O(N^2). Each candidate list now
gets a cached first-containing index (sorted starts plus a running maximum end)
that answers the same first-in-order containing fact with two binary searches;
a list whose starts are not sorted keeps the linear scan. methodFact builds its
exact-signature fallback only when no fact contains the definition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): pin the Java merge opt-in and the positional fact search

Java joins the crowded-class finalize test, which fails if the resolver
stops declaring its merge associative. A seeded comparison checks the
binary first-containing search against a plain scan, for start-sorted
lists (binary path) and unsorted ones (scan fallback).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-scaling-all-shapes): follow a shared return fact once per pass until a write

The JVM package-sibling merge copies each sibling module's type bindings
(Java hoists method return types to module scope) into every module, so a
package of K files with N methods holds K x N entries sharing the same
TypeRef objects, and two passes followed each copy again: 2KN follows of
~180 blocks each (shape S4: N=2000 155M blocks, 1.72 growth per doubling).

createChainFollower wraps followChainPostFinalize for one pass and
remembers, per TypeRef object and first-step lookup scope, heads whose
first step stopped. That step reads only the head, that scope, the pass
hooks and the indexes; a non-awaited head returned unchanged can only
have stopped there, since later steps build new objects. Each pass clears
the memo after every type-binding write. propagateImportedReturnTypes and
Java's populateJavaCrossFileReturnTypes use it; the Java qualified
type-binding pass keys each shared TypeRef's simple spelling once.

S4 at N=2000: 155.1M -> 40.1M blocks (1.72 -> 1.22); graphs identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-scaling-all-shapes): look up a SAM method fact among same-named methods only

methodFact filtered every method fact of the file per definition, so N
lambda takers in one file cost N^2 (shape S6: 1.33 -> 1.00 growth per
doubling). Group each file's method facts by name once per facts array;
the innermost same-named fact is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-scaling-all-shapes): mirror each imported family's return types once per importer

populateJavaCrossFileReturnTypes re-mirrored the same source family and
class scopes for every import of one file, and kept one family copy per
import (shape S10, N static-imported member types: 1.23 -> 1.00). A
second mirror is a no-op: a name is only set when absent and ambiguity is
permanent. Families are deduplicated keeping each one's last copy, so the
end-popping walk visits them in the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-scaling-all-shapes): find an exported node's definition by id in constant time

accumulateExportedTypesFromParsedNode scanned the file's same-name
definition list for each exported node, N^2 for N same-named members in
one file (S2/S9/S11). Index each append-only list by first node id,
extended as it grows; first-match and defs[0] fallback unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-package-sibling-linear): type inherited fields through the superclass chain, not a package copy

The JVM package-sibling merge copied every sibling's module and class type
bindings into each file's module scope. Java hoists method return types to
module scope, so a package of K files with M methods each held K x K x M
entries that every later pass iterated (shape S4: 1.19 growth per
doubling). The copy stood in for one thing Java needs: the types of fields
a class inherits from a base in another file of its package. It also hid a
gap: packages past the 500-file skip got no copy, so a bare inherited
field read (`inner.save()`) lost its call there.

Java now turns the merge off through a new JvmPackageSiblingOptions flag
(Kotlin keeps the default; its top-level declarations are package-visible),
and populateJavaInheritedFieldTypes binds, in each class scope, the
TypeRefs of fields inherited from same-package bases in other files: MRO
nearest first, own fields hide inherited ones, private fields are never
inherited, package access only along a same-package chain (JLS 8.2, 8.3).

S4 at N=2000: 38.1M -> 27.1M blocks, 1.19 -> 1.02. All 822 lang-resolution
fingerprints unchanged; shape S3 now keeps its inherited-field calls at
every package size (6000 at N=2000, was 2000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* optimize(java-scaling-all-shapes): dedupe property-name candidates with a set

buildPropertyNameIndex rescanned the name's candidate list per Property
node (S3/S8: N(N-1)/2). A node id fixes its name, so one id set gives the
same index in one pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): pin inherited field types in large packages and the exported-def index

A bare field inherited from a same-package base in another file keeps its
call whether the package holds 3 files or 504 (past the sibling skip,
where head lost it), and a field the class declares hides the inherited
one. The exported-type accumulator finds a definition by id after its
same-name list grows, keeps the first definition of a repeated id, and
falls back to the list's first entry for an unknown id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): consolidate the PR's integration tests into ten topic files

Merge the 39 Java integration test files added by this PR, many named
after review rounds, into ten files by topic: arrays, lexical scopes,
qualified types, member types, container elements, declared types,
Lombok annotations, Lombok worker/cache, SAM lambdas and non-ASCII names.

Fixtures, assertions and one pipeline run per describe are unchanged.
All 176 test definitions (509 cases) keep their titles, apart from
dropped review-round markers. Duplicated helpers are defined once per
file, and the cross-platform worker and filesystem lists point at the
new files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(java): share range helpers and simplify the return-type mirror loop

- javaRangeContains is built from exported startsAtOrBefore/endsAtOrAfter,
  which the first-containing search and the type-parameter lookup now
  reuse instead of keeping their own copies.
- The cross-file return-type mirror checks "already mirrored" with plain
  if blocks and computes each family key once.
- The JVM sibling opt-out sits above the merge comment it skips.
- buildPropertyNameIndex skips a repeated id before building a candidate.

No behaviour change: graph fingerprints identical over all 870 fixtures,
worst-shape block growth 1.023.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(java): type lambdas from qualified JDK functional type arguments and implicit array receivers in anonymous classes

Address the round-7 review on #3955:

- A JDK functional parameter written with a qualified type argument
  (`java.util.function.Consumer<app.Other>`) now types its implicitly
  typed lambda parameter: the argument's module key is registered where
  it was written, and the lambda parameter takes the qualified reference.
  The inherited `List.forEach(Consumer<app.Other>)` case therefore
  resolves to `Other.save`, and its test expectation says so.
- Methods of an anonymous class take implicit array receivers
  (`items()[0].save()`), reading the anonymous class's own members; its
  initializers still refuse, since no `this` binding names the anonymous
  class there.
- An empty type-field inventory is kept in the capture side channel, as
  its comment says.

Graph fingerprints are unchanged across all 870 fixtures, and the worst
shape's block growth stays at 1.023.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(java): expect the implicit array chain in anonymous methods

* fix(java): resolve qualified types and inherited field aliases (#3955)

Check written supertypes before binding a qualified name, and use the
complete package inventory when sibling injection is capped. Preserve
qualified types alongside the static wildcard import from java.lang.Math.

Resolve copies of inherited fields in the field's declaration scope.
Exercise adjacent local declarations, instance factories in static
initializers, and the exact targets of shadowed receiver calls.

* fix(ci): restore Linux hook cleanup and containment coverage

* perf(scope-resolution): memoize stopped types on cross-scope reads

* fix(eval): supervise MCP servers directly on native Linux runners

* fix(ci): recognize the hosted Ubuntu 26.04 runner in actionlint

* ci(eval): load Noble's packaged Bubblewrap profile on its runner

* test(hooks): recognize Ubuntu's GNU timeout executable

* fix(eval): measure paired patch proposals on stock Ubuntu

Run the model CLI on the host with structured tools in isolated workers. Prepare the pinned graph and grade patches offline, bind real usage to the measured toolset, and require native execution on each Linux runner.

Preserve the legacy nested-shell compatibility run and record its capabilities before opening a model session.

* fix(eval): make proposal and cleanup outcomes explicit

* fix: preserve evaluator receipts and resolve Lombok builder defaults

* fix(java): preserve inherited field and accessor ownership

* Fix Java field and functional-interface resolution (#3955)

Resolve inherited fields along their direct superclass and interface paths. Keep interface constants typed at their declaration and require proof that an equals parameter denotes java.lang.Object before omitting it from a functional interface.

Cover ambiguous fields, array depth, and the independent Lombok getter. Give the evaluator parser a bounded two-minute progress window during offline graph preparation.

* fix(java): preserve local scope and anonymous class ownership

* fix(java): resolve parenthesized lambda arguments

* fix(java): refuse ambiguous callback wildcard imports

* perf(java): compile Spring queries on first use

Loading the provider registry compiled two native Java queries for every language. Cache each query when its extractor first needs it so TypeScript-only incremental analysis skips that startup work.

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
2026-11-18 19:48:30 +00:00
..
fixtures test(eval): run the benchmark offline against a scripted provider (#3235) 2026-09-09 12:34:00 +01:00
__init__.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
bench_fixtures.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
conftest.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
test_baseline_guidance.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_ce_plugin_runtime.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_check_test_execution.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_cli_shim.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_comparator_reuse.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
test_cost_diagnostics.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_diagnostic_trial.py fix(eval): validate trial setup and report missing measurements (#3779) 2026-10-31 04:40:37 +00:00
test_ec2_workflows.py feat(eval): add capped two-cell trial (#3778) 2026-10-30 15:19:51 +00:00
test_errors.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
test_evolution_runner.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_evolution_runner_ready.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_evolve.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_mcp_bridge.py feat(eval): evolve review skills against historical PRs 2026-09-04 05:32:31 +00:00
test_mcp_loading_report.py feat(eval): benchmark deferred MCP tool loading (#3765) 2026-10-29 16:23:21 +00:00
test_mcp_tool_loading.py feat(eval): benchmark deferred MCP tool loading (#3765) 2026-10-29 16:23:21 +00:00
test_measure_evolution_cost.py feat(eval): Add bounded packed-scheduler primitives and offline replay benchmarks (#3206) 2026-09-08 08:22:12 +01:00
test_mock_provider.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_model_gateway.py test(resolution): pin field-receiver dispatch targets and counts outside Go (#3867) 2026-11-15 06:35:39 +00:00
test_offline_session_integration.py test(eval): run the benchmark offline against a scripted provider (#3235) 2026-09-09 12:34:00 +01:00
test_offline_sweep_integration.py fix(release): gate publication on accuracy and paired evaluation (#3503) 2026-10-10 08:26:08 +01:00
test_oracle_assets.py fix(eval): grade repository filters through MCP (#3844) 2026-11-09 05:09:11 +00:00
test_parse_run_id.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
test_pr_evaluation.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_process_control.py feat(mcp): reduce response size and query overhead (#3621) 2026-10-18 17:32:09 +01:00
test_promotion_apply.py fix(eval): make evolution evidence valid and bounded 2026-09-05 10:08:35 +00:00
test_property_based.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
test_proposal_evaluation.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_proposer_sandbox.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_provider_usage.py feat(eval): record provider-native usage at the gateway instead of inferring it after translation (#3220) 2026-09-08 18:22:04 +01:00
test_provider_usage_capture.py test(eval): run the benchmark offline against a scripted provider (#3235) 2026-09-09 12:34:00 +01:00
test_release_build.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_release_controls.py fix(eval): validate trial setup and report missing measurements (#3779) 2026-10-31 04:40:37 +00:00
test_release_evaluation_smoke.py fix(eval): materialize release graphs before paid sessions (#3556) 2026-10-10 15:24:09 +00:00
test_release_evidence.py fix(eval): keep candidate code out of agent comparisons (#3715) 2026-10-25 05:01:08 +00:00
test_release_gate.py fix(eval): keep candidate code out of agent comparisons (#3715) 2026-10-25 05:01:08 +00:00
test_release_preflight.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_release_report.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_retrieval_diagnostics.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_reuse_round_trip.py fix(eval): validate trial setup and report missing measurements (#3779) 2026-10-31 04:40:37 +00:00
test_review_corpus.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
test_review_scoring.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
test_runner_hardening.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_sanitized_graph.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_session_diagnostics.py feat(eval): measure cost drivers in evaluation summaries (#3773) 2026-10-30 12:58:34 +00:00
test_session_progress.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
test_sweep_finalization.py fix(eval): sweep evidence handling and measurement health, with guarded comparator reuse (#3207) 2026-09-08 09:25:45 +00:00
test_task_assets.py fix(eval): materialize release graphs before paid sessions (#3556) 2026-10-10 15:24:09 +00:00
test_tool_scripts.py docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
test_trial_dependency_binding.py fix(eval): validate trial setup and report missing measurements (#3779) 2026-10-31 04:40:37 +00:00
test_trial_measurement_fixes.py fix(eval): validate trial setup and report missing measurements (#3779) 2026-10-31 04:40:37 +00:00
test_workflow_bench.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00
test_workflow_bench_evolution.py fix(eval): make evolution evidence valid and bounded 2026-09-05 10:08:35 +00:00
test_workflow_bench_sessions.py fix(java): preserve receiver and generated dependency ownership (#3955) 2026-11-18 19:48:30 +00:00