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

Method isInterfaceOwnedMethod

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

Source from the content-addressed store, hash-verified

4762 */
4763 const interfaceMemberCache = new Map<string, boolean>();
4764 const isInterfaceOwnedMethod = (node: Node): boolean => {
4765 if (node.kind !== 'method') return false;
4766 const cached = interfaceMemberCache.get(node.id);
4767 if (cached !== undefined) return cached;
4768 let owned = false;
4769 try {
4770 owned = cg.getIncomingEdges(node.id).some(
4771 (e) => e.kind === 'contains' && cg.getNode(e.source)?.kind === 'interface',
4772 );
4773 } catch {
4774 owned = false; // a probe failure must not manufacture a penalty
4775 }
4776 interfaceMemberCache.set(node.id, owned);
4777 return owned;
4778 };
4779
4780 const namedSeedIds = new Set<string>();
4781 // 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