MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isInterfaceOwnedMethod

Method isInterfaceOwnedMethod

src/mcp/tools.ts:4708–4722  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

4706 */
4707 const interfaceMemberCache = new Map<string, boolean>();
4708 const isInterfaceOwnedMethod = (node: Node): boolean => {
4709 if (node.kind !== 'method') return false;
4710 const cached = interfaceMemberCache.get(node.id);
4711 if (cached !== undefined) return cached;
4712 let owned = false;
4713 try {
4714 owned = cg.getIncomingEdges(node.id).some(
4715 (e) => e.kind === 'contains' && cg.getNode(e.source)?.kind === 'interface',
4716 );
4717 } catch {
4718 owned = false; // a probe failure must not manufacture a penalty
4719 }
4720 interfaceMemberCache.set(node.id, owned);
4721 return owned;
4722 };
4723
4724 const namedSeedIds = new Set<string>();
4725 // The subset of named seeds that earns the named-FIRST sort tier. We still

Callers

nothing calls this directly

Calls 4

getNodeMethod · 0.80
getMethod · 0.65
getIncomingEdgesMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected