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

Function mkc_edge

tests/test_matrix_known_classes.c:158–175  ·  view source on GitHub ↗

Index files, assert edge_type appears >= floor times. * is_green=1: this is a green guard (regression if it fails). * is_green=0: this is a red reproduction (correct outcome asserted; fails until fixed). */

Source from the content-addressed store, hash-verified

156 * is_green=1: this is a green guard (regression if it fails).
157 * is_green=0: this is a red reproduction (correct outcome asserted; fails until fixed). */
158static int mkc_edge(const MKC_File *files, int nfiles, const char *edge_type, int floor,
159 const char *label, int is_green) {
160 MKC_Proj lp;
161 cbm_store_t *store = mkc_index(&lp, files, nfiles);
162 int got = store ? cbm_store_count_edges_by_type(store, lp.project, edge_type) : -1;
163 if (got < floor) {
164 fprintf(stderr, " [MKC] %s FAIL %s=%d expected>=%d %s\n", label, edge_type, got, floor,
165 is_green ? "(GREEN regression)" : "(RED reproduction — bug)");
166 mkc_diag(store, lp.project, label);
167 } else if (!is_green) {
168 fprintf(stderr,
169 " [MKC] %s UNEXPECTED PASS %s=%d "
170 "(bug may be fixed — promote to GREEN)\n",
171 label, edge_type, got);
172 }
173 mkc_cleanup(&lp, store);
174 return got >= floor;
175}
176
177/* ══════════════════════════════════════════════════════════════════════════
178 * ═══ CLASS C1: CONSTRUCTOR / INSTANTIATION ═══════════════════════════════

Callers 1

Calls 4

mkc_indexFunction · 0.85
mkc_diagFunction · 0.85
mkc_cleanupFunction · 0.85

Tested by

no test coverage detected