diff --git a/src/pipeline/pass_parallel.c b/src/pipeline/pass_parallel.c index 619757b..261067b 100644 --- a/src/pipeline/pass_parallel.c +++ b/src/pipeline/pass_parallel.c @@ -1358,6 +1358,9 @@ static void resolve_def_decorators(resolve_ctx_t *rc, resolve_worker_state_t *ws char dp[CBM_SZ_256]; snprintf(dp, sizeof(dp), "{\"decorator\":\"%s\"}", def->decorators[dc]); cbm_gbuf_insert_edge(ws->local_edge_buf, node->id, dn->id, "DECORATES", dp); + /* Ensure a reference-style edge exists so the decorator appears in queries + * without being misclassified as a real call by downstream passes. */ + cbm_gbuf_insert_edge(ws->local_edge_buf, node->id, dn->id, "USAGE", "{}"); ws->semantic_resolved++; } } diff --git a/src/pipeline/pass_semantic.c b/src/pipeline/pass_semantic.c index ef32780..423375c 100644 --- a/src/pipeline/pass_semantic.c +++ b/src/pipeline/pass_semantic.c @@ -321,6 +321,9 @@ static void resolve_decorator(cbm_pipeline_ctx_t *ctx, const cbm_gbuf_node_t *no char props[CBM_SZ_256]; snprintf(props, sizeof(props), "{\"decorator\":\"%s\"}", decorator); cbm_gbuf_insert_edge(ctx->gbuf, node->id, dec->id, "DECORATES", props); + /* Ensure a reference edge exists so the decorator appears in usage queries + * without being misclassified as a real call by downstream passes. */ + cbm_gbuf_insert_edge(ctx->gbuf, node->id, dec->id, "USAGE", "{}"); (*count)++; } }