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

Function te_open_scope

src/mcp/test_impact_engine.c:346–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344/* ── Graph scope, seeding, selection ─────────────────────────────── */
345
346static bool te_open_scope(te_ctx_t *c) {
347 if (cbm_store_read_scope_open(c->store, NULL, NULL, &c->scope) != CBM_STORE_OK) {
348 return te_fallback(c, CBM_TEST_RESULT_FALLBACK_GRAPH_UNAVAILABLE,
349 "the graph of HEAD could not be read") &&
350 false;
351 }
352 static const unsigned char project[] = "test-impact";
353 cbm_store_graph_digest_limits_t limits = {.max_rows = (uint64_t)1 << 32,
354 .max_framed_bytes = (uint64_t)1 << 40};
355 cbm_store_graph_digest_t digest;
356 if (cbm_store_graph_digest(c->scope, project, sizeof(project) - 1, &limits, &digest) !=
357 CBM_STORE_GRAPH_DIGEST_OK) {
358 return te_fallback(c, CBM_TEST_RESULT_FALLBACK_GRAPH_REJECTED,
359 "the graph of HEAD could not be digested") &&
360 false;
361 }
362 memcpy(c->graph_sha256, digest.sha256, sizeof(c->graph_sha256));
363 c->graph_digest = true;
364 return true;
365}
366
367static bool te_seed(te_ctx_t *c) {
368 cbm_ti_seed_input_t in = {.changes = c->seed_changes,

Callers 1

te_stepsFunction · 0.85

Calls 3

te_fallbackFunction · 0.85
cbm_store_graph_digestFunction · 0.85

Tested by

no test coverage detected