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

Function observe_objectscript_export

tests/test_pipeline.c:1182–1217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1180} ObjectScriptExportObservation;
1181
1182static ObjectScriptExportObservation observe_objectscript_export(const char *repo_path,
1183 const char *db_name) {
1184 ObjectScriptExportObservation observation = {
1185 .run_rc = -1,
1186 .store_opened = false,
1187 .run_nodes = -1,
1188 .execute_nodes = -1,
1189 .run_execute_calls = -1,
1190 .shared_payload_nodes = -1,
1191 .run_shared_payload_usages = -1,
1192 };
1193 char db_path[512];
1194 snprintf(db_path, sizeof(db_path), "%s/%s", repo_path, db_name);
1195 cbm_pipeline_t *pipeline = cbm_pipeline_new(repo_path, db_path, CBM_MODE_FULL);
1196 if (!pipeline) {
1197 return observation;
1198 }
1199
1200 observation.run_rc = cbm_pipeline_run(pipeline);
1201 const char *project = cbm_pipeline_project_name(pipeline);
1202 cbm_store_t *store = cbm_store_open_path(db_path);
1203 observation.store_opened = store != NULL;
1204 if (store && project) {
1205 observation.run_nodes = named_node_count(store, project, "Run");
1206 observation.execute_nodes = named_node_count(store, project, "Execute");
1207 observation.run_execute_calls = named_edge_count(store, project, "CALLS", "Run", "Execute");
1208 observation.shared_payload_nodes = named_node_count(store, project, "SharedPayload");
1209 observation.run_shared_payload_usages =
1210 named_edge_count(store, project, "USAGE", "Run", "SharedPayload");
1211 }
1212 if (store) {
1213 cbm_store_close(store);
1214 }
1215 cbm_pipeline_free(pipeline);
1216 return observation;
1217}
1218
1219/* Studio Export XML is transformed into ObjectScript UDL during extraction.
1220 * The transformed definitions already survive, but the old sequential and

Callers 1

test_pipeline.cFile · 0.85

Calls 8

cbm_pipeline_newFunction · 0.85
cbm_pipeline_runFunction · 0.85
cbm_store_open_pathFunction · 0.85
named_node_countFunction · 0.85
named_edge_countFunction · 0.85
cbm_store_closeFunction · 0.85
cbm_pipeline_freeFunction · 0.85

Tested by

no test coverage detected