You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(extractor): recognize inline-new expression as receiver type in extractReceiverName (#1415)
* fix(extractor): recognize inline-new expression as receiver type in extractReceiverName
When the object of a member call is a `new_expression` (e.g. `new Dog().bark()`)
or a parenthesized `new_expression` (e.g. `(new Dog('Rex')).bark()`),
`extractReceiverName` now returns the constructor name (e.g. `'Dog'`) directly
instead of the raw node text (e.g. `'(new Dog(\'Rex\'))')`).
This lets the resolver reach the direct qualified method lookup path
(`Dog.bark`) without relying on the text-based regex heuristic that was
handling these expressions in `call-resolver.ts`.
Closes#1396
* docs(resolver): update stale inline-new-receiver comment in call-resolver
The comment at lines 85-93 of call-resolver.ts described behaviour from
before extractReceiverName was taught to handle new_expression and
parenthesized_expression(new_expression) nodes. The comment said
extractReceiverName returned raw node text for those cases, which is no
longer true. Update the comment to reflect that the regex is now a
belt-and-suspenders fallback for unhandled AST node types, not the
primary handler for inline-new receivers.
* fix(extractor): infer C# var-declared instance types from object_creation_expression initializer
When a local variable is declared as `var service = new UserService(repo)`, the
tree-sitter C# grammar represents the type node as `implicit_type` (not `var_keyword`)
and places the `object_creation_expression` as a direct child of `variable_declarator`
(not nested in an `equals_value_clause`).
Previously `handleCSharpVarDecl` returned early on `implicit_type`, leaving the typeMap
without an entry for `service`. Calls like `service.AddUser()` therefore had no receiver
type and were not resolved.
Fix (WASM/TS): recognise both `implicit_type` and `var_keyword` as the var-inference
signal, then walk the `variable_declarator`'s children for a direct
`object_creation_expression` or an `equals_value_clause` containing one, and seed the
typeMap with the constructor type at confidence 0.9.
Fix (native/Rust): symmetric change to `match_csharp_type_map` plus new
`extract_var_init_type` helper, keeping both engines in parity.
Result: C# `receiver-typed` recall: 0/4 → 4/4 (100%); aggregate recall: 73.9% → 91.3%.
Threshold ratcheted from {precision: 0.5, recall: 0.2} to {precision: 0.9, recall: 0.9}.
Fixes#1402
* fix(extractor): use if-let-else continue in extract_var_init_type outer loop
Replace `declarator.child(i)?` with `let Some(child) = ... else { continue }`
to skip None child slots rather than returning None from the entire function.
Matches the inner loop pattern and the TypeScript mirror's optional-chaining.
* fix(test): handle ECONNRESET and other network errors in embedding regression test
The macOS CI runner intermittently fails with ECONNRESET when downloading
the HuggingFace model. Broaden the catch in the embedding regression test
to treat connection-level errors (ECONNRESET, ETIMEDOUT, ENOTFOUND,
ECONNREFUSED) and 'terminated' worker errors the same as HTTP 429 —
mark rateLimited=true and skip the dependent tests instead of failing.
* fix: document single-level paren limit and narrow network-error codes (#1415)
0 commit comments