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

Function ss_seed

tests/test_store_scope.c:55–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 return cbm_store_insert_edge(s,&e)>0;
54}
55static bool ss_seed(cbm_store_t *s,ss_ids_t *id) {
56 if (!s || cbm_store_upsert_project(s,SS_PROJECT,"/scope-fixture")!=CBM_STORE_OK) return false;
57 /* Deliberately nonlexical insertion order. */
58 id->z=ss_node(s,"z",30); id->root=ss_node(s,"root",11); id->top=ss_node(s,"top",40);
59 id->a=ss_node(s,"a",20); id->tail=ss_node(s,"tail",60); id->island=ss_node(s,"island",50);
60 return id->z>0 && id->root>0 && id->top>0 && id->a>0 && id->tail>0 && id->island>0 &&
61 ss_edge(s,id->a,id->root,"CALLS") && ss_edge(s,id->z,id->root,"USAGE") &&
62 ss_edge(s,id->top,id->a,"CALLS") && ss_edge(s,id->top,id->z,"USAGE") &&
63 ss_edge(s,id->tail,id->island,"CALLS") && cbm_store_generation_advance(s)==CBM_STORE_OK &&
64 cbm_store_count_nodes(s,SS_PROJECT)==6;
65}
66static bool ss_line(cbm_store_t *s,int64_t id,int line) {
67 cbm_node_t row={0}; bool ok=cbm_store_find_node_by_id(s,id,&row)==CBM_STORE_OK && row.start_line==line;
68 cbm_node_free_fields(&row); return ok;

Callers 3

ss_file_openFunction · 0.85
test_store_scope.cFile · 0.85
ss_sweep_runFunction · 0.85

Calls 5

cbm_store_upsert_projectFunction · 0.85
ss_nodeFunction · 0.85
ss_edgeFunction · 0.85
cbm_store_count_nodesFunction · 0.85

Tested by

no test coverage detected