Files
codebase-memory-mcp/tests
Martin Vogel 2a8771d3fe fix(resolver): an Elixir capture or Erlang fun among branches is USAGE
The extras path in resolve_calls called any callable a site names a CALL_REFERENCE, with no composite check. So `flag && &a/0`, `if flag, do: &a/0, else: &b/0` and `case Flag of true -> fun a/0; false -> fun b/0 end` each gave CALL_REFERENCE edges, which call_reference_language_complex_contract forbids: the value is one of several. This is the Perl bug in the other carrier.

The adapter now says so, as a carrier's may_be_call_reference does: an extra site carries `composite`, and such a site is USAGE. It holds under `&&`, `||`, `and`, `or`, `andalso`, `orelse`, and among the branches of `if`, `unless`, `case`, `cond`, `with`, `try`, `receive` and `maybe`, parentheses and blocks aside. A direct argument, a bound name, a return, a list or tuple entry, a message sent and a closure's body are one value again and stay CALL_REFERENCE, including inside a branch.

Ruby and Dart are not affected, and the contract suite now pins them. Ruby's `method(:a)` binds nothing, so it is no edge. A Dart tear-off is USAGE in every form, which also means a direct one never gets CALL_REFERENCE: a recall gap, not a false edge.

RED with the two assignments reverted, on the oracle with 2c3967d88: elixir-composite wrong=17, erlang-composite wrong=15, and both new contract rows fail on `reference=1/1`.

plug, cowboy and bloc: all 12 fingerprints identical before and after, so none of their 8, 19 and 23 CALL_REFERENCE edges was composite. No recall is traded on them.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 01:04:28 +01:00
..