feat: receiver capture + local type binding for method_call resolution #29

Closed
opened 2026-07-20 22:38:33 +02:00 by buildagent · 1 comment
Member

Rank 8 of the 2026-07-20 index-data brainstorm (_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md) — the ONE new-data investment the synthesis rates worth making.

What: plugins capture the receiver text of method calls into the existing refs.qualifier column (today hard-coded None for field-expression calls), plus a resolve-time let-binding pass so let x = Foo::new(); x.method() anchors method to Foo. Proof-based — preserves the no-guessing precision policy.

Why: method_call is the single largest precision hole: 6.8% resolution (836/12,281) vs 31.7% for plain calls, and it goes dark exactly at the trait/RPC boundaries (RpcIndex vs LocalIndex) an agent most needs to trace. Sized unlock: 2,619 unresolved method_calls match exactly ONE in-repo method by name; 590 more need receiver-type disambiguation (as_str: 241 calls/3 defs, search_symbols: 73/6). Half the unique pool ≈ +1,300 resolved refs (+24% over ~5.5k). Every graph tool (impact, affected_tests, explain_dependency, cycles) improves when this lands.

Cost: medium — plugin extraction change across all six languages + resolver pass; reuses the I025 qualifier column, no schema migration for the receiver itself. Full heal migration required (extraction change → spec 04 upgrade-equivalence).

Rank 8 of the 2026-07-20 index-data brainstorm (`_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md`) — the ONE new-data investment the synthesis rates worth making. **What**: plugins capture the receiver text of method calls into the existing `refs.qualifier` column (today hard-coded `None` for field-expression calls), plus a resolve-time let-binding pass so `let x = Foo::new(); x.method()` anchors `method` to `Foo`. Proof-based — preserves the no-guessing precision policy. **Why**: method_call is the single largest precision hole: **6.8% resolution (836/12,281) vs 31.7% for plain calls**, and it goes dark exactly at the trait/RPC boundaries (RpcIndex vs LocalIndex) an agent most needs to trace. Sized unlock: 2,619 unresolved method_calls match exactly ONE in-repo method by name; 590 more need receiver-type disambiguation (`as_str`: 241 calls/3 defs, `search_symbols`: 73/6). Half the unique pool ≈ +1,300 resolved refs (+24% over ~5.5k). Every graph tool (impact, affected_tests, explain_dependency, cycles) improves when this lands. **Cost**: medium — plugin extraction change across all six languages + resolver pass; reuses the I025 qualifier column, no schema migration for the receiver itself. Full heal migration required (extraction change → spec 04 upgrade-equivalence).
Author
Member

Shipped in v0.6.0 (I030 Track A, schema v20). Receiver capture (x.m()/self/$this/this) + binding facts (annotations, typed params, constructor conventions, rebind invalidation) in all six languages; tier 1R resolves method calls through them with the precision policy intact. Two deep review rounds (20 + 23 confirmed findings, 0 refuted) drove a full redesign: same-file self rule, symbol-scoped positional bindings, name-structural origin gating (firewall-sound). Real-DB: rust method_call 6.6% → 7.4% (1,018/13,824), zero phantom classes, legit anchors 242/242, 8,411 binding facts. resolution_gaps now reports the receiver_unbound residual for the next iteration. Mission record: _prdoc/missions/I030-agent-change-safety-v1.md.

Shipped in **v0.6.0** (I030 Track A, schema v20). Receiver capture (`x.m()`/`self`/`$this`/`this`) + binding facts (annotations, typed params, constructor conventions, rebind invalidation) in all six languages; tier 1R resolves method calls through them with the precision policy intact. Two deep review rounds (20 + 23 confirmed findings, 0 refuted) drove a full redesign: same-file self rule, symbol-scoped positional bindings, name-structural origin gating (firewall-sound). Real-DB: rust method_call **6.6% → 7.4%** (1,018/13,824), zero phantom classes, legit anchors 242/242, 8,411 binding facts. `resolution_gaps` now reports the `receiver_unbound` residual for the next iteration. Mission record: `_prdoc/missions/I030-agent-change-safety-v1.md`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
h-dv/code-index#29
No description provided.