MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resolve_same_module

Function resolve_same_module

src/pipeline/registry.c:721–737  ·  view source on GitHub ↗

Strategy 2: Same-module match */

Source from the content-addressed store, hash-verified

719
720/* Strategy 2: Same-module match */
721static cbm_resolution_t resolve_same_module(const cbm_registry_t *r, const char *callee_name,
722 const char *suffix, const char *module_qn) {
723 char candidate[CBM_SZ_512];
724 snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, callee_name);
725 const char *stored_key = cbm_ht_get_key(r->exact, candidate);
726 if (stored_key) {
727 return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED};
728 }
729 if (suffix && suffix[0]) {
730 snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, suffix);
731 stored_key = cbm_ht_get_key(r->exact, candidate);
732 if (stored_key) {
733 return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED};
734 }
735 }
736 return empty_result();
737}
738
739/* Strategy 4: multiple candidates with import filtering. */
740static cbm_resolution_t resolve_multi_with_imports(const qn_array_t *arr, const char *module_qn,

Callers 1

cbm_registry_resolveFunction · 0.85

Calls 2

cbm_ht_get_keyFunction · 0.85
empty_resultFunction · 0.85

Tested by

no test coverage detected