Skip to content

Commit 94882c2

Browse files
fix(k8s): address QA round 3 findings
- Check return value of cbm_pipeline_pass_k8s() in incremental path; log warning on failure (fail-open, matches full pipeline behaviour) - Add comment documenting pass ordering and the two known structural limitations: File→Resource DEFINES edges and cross-file kustomize IMPORTS edges are not emitted in incremental (gbuf only contains nodes for changed files; File nodes from pass_structure are absent) - Fix clang-format violation in incremental_kustomize_module_indexed test (single-line if condition) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a90ab5d commit 94882c2

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/pipeline/pipeline_incremental.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,16 @@ int cbm_pipeline_run_incremental(cbm_pipeline_t *p, const char *db_path, cbm_fil
265265
cbm_log_info("pass.timing", "pass", "incr_semantic", "elapsed_ms",
266266
itoa_buf((int)elapsed_ms(t)));
267267

268+
/* k8s pass runs after semantic (vs. after definitions in the full pipeline) because
269+
* incremental has no parallel extraction phase to position it alongside.
270+
* Note: File→Resource DEFINES edges and cross-file kustomize IMPORTS edges are not
271+
* emitted here — File nodes (from pass_structure) are absent in the incremental gbuf,
272+
* and gbuf_find_by_qn only resolves nodes from changed files. This is a known
273+
* structural limitation of the incremental architecture. */
268274
cbm_clock_gettime(CLOCK_MONOTONIC, &t);
269-
cbm_pipeline_pass_k8s(&ctx, changed_files, ci);
275+
if (cbm_pipeline_pass_k8s(&ctx, changed_files, ci) != 0) {
276+
cbm_log_info("incremental.warn", "msg", "k8s_pass_failed");
277+
}
270278
cbm_log_info("pass.timing", "pass", "incr_k8s", "elapsed_ms", itoa_buf((int)elapsed_ms(t)));
271279

272280
/* Merge new nodes/edges from gbuf into disk DB */

tests/test_pipeline.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,8 +5197,7 @@ TEST(incremental_kustomize_module_indexed) {
51975197
cbm_store_find_nodes_by_label(s, project, "Module", &nodes, &count);
51985198
bool found_kust = false;
51995199
for (int i = 0; i < count; i++) {
5200-
if (nodes[i].properties_json &&
5201-
strstr(nodes[i].properties_json, "kustomize")) {
5200+
if (nodes[i].properties_json && strstr(nodes[i].properties_json, "kustomize")) {
52025201
found_kust = true;
52035202
break;
52045203
}

0 commit comments

Comments
 (0)