diff --git a/graphify/extract.py b/graphify/extract.py index c00f06fe7..f98cf010c 100644 --- a/graphify/extract.py +++ b/graphify/extract.py @@ -6897,7 +6897,7 @@ def _resolve_csharp_extension_calls( third-party type) cannot have its instance members enumerated, so the instance-wins rule is replaced by two conservative proofs: the member name is not one a BCL type owns (``ToString``, ``GetValue``, …), and no regular - method anywhere in the corpus has that name. Such an edge is INFERRED 0.70, + method anywhere in the corpus has that name. Such an edge is INFERRED 0.75, one tier below a receiver whose declaration table typed it. A chained receiver (``v.ToString().Mask()``) has no type at all: typing it @@ -7141,10 +7141,10 @@ def _resolve_csharp_extension_calls( "context": "call", "confidence": "INFERRED", # 0.85 when the extractor's declaration table typed the receiver; - # 0.70 when the receiver's type is out of corpus and the binding - # rests on the BCL/regular-name guards (the discrete rubric has - # no 0.75, see references/extraction-spec.md). - "confidence_score": 0.70 if roc else 0.85, + # 0.75 when the receiver's type is out of corpus (or absent) and + # the binding rests on the BCL/regular-name guards — the discrete + # INFERRED rubric in references/extraction-spec.md. + "confidence_score": 0.75 if roc else 0.85, "source_file": src_file, "source_location": rc.get("source_location"), "weight": 1.0, diff --git a/tests/csharp_extension_harness.py b/tests/csharp_extension_harness.py index cf7d0fd92..628f9b3a2 100644 --- a/tests/csharp_extension_harness.py +++ b/tests/csharp_extension_harness.py @@ -855,7 +855,7 @@ def apply_strategy( if (caller, cand.method_id) in existing: continue existing.add((caller, cand.method_id)) - score = 0.85 if not (roc or recv_type is None) else 0.70 + score = 0.85 if not (roc or recv_type is None) else 0.75 added.append(_edge(caller, cand, rc, score)) return added diff --git a/tests/test_csharp_extension_resolution.py b/tests/test_csharp_extension_resolution.py index 2af791aa2..7436955a9 100644 --- a/tests/test_csharp_extension_resolution.py +++ b/tests/test_csharp_extension_resolution.py @@ -124,8 +124,8 @@ def test_out_of_corpus_extension_edge_is_scored_lower(): if e.get("relation") == "calls" and by_id.get(e["target"], {}).get("metadata", {}).get("extension") } - assert scores[".Mask()"] == 0.70 - assert scores[".Twice()"] == 0.70 + assert scores[".Mask()"] == 0.75 + assert scores[".Twice()"] == 0.75 def test_bcl_member_name_on_an_undeclared_type_is_not_bound():