Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

style: apply current C formatting

Martin Vogeld6c9d28bf5f0
diff --git a/src/cli/cli.h b/src/cli/cli.h
index d0857533f..4e1db8d3b 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -190,10 +190,8 @@ bool cbm_optional_hook_supported_for_testing(const char *agent_name, bool window
void cbm_hook_sanitize_metadata_for_testing(const char *input, char *output, size_t output_size);
int cbm_upsert_qwen_lifecycle_hooks_for_testing(const char *settings_path, const char *binary_path,
bool windows);
-int cbm_upsert_qoder_context_hooks_for_testing(const char *settings_path,
- const char *binary_path);
-int cbm_remove_qoder_context_hooks_for_testing(const char *settings_path,
- const char *binary_path);
+int cbm_upsert_qoder_context_hooks_for_testing(const char *settings_path, const char *binary_path);
+int cbm_remove_qoder_context_hooks_for_testing(const char *settings_path, const char *binary_path);
/* Explicit lifecycle adapter seam for hook protocols whose output envelope is
* not Claude/Gemini-compatible. Returns allocated JSON or NULL to fail open. */
char *cbm_hook_augment_lifecycle_json_for_dialect(const char *input, const char *forced_event,
diff --git a/src/cli/config_text_edit.c b/src/cli/config_text_edit.c
index 5aa26c56d..0f8b2d091 100644
--- a/src/cli/config_text_edit.c
+++ b/src/cli/config_text_edit.c
@@ -1138,14 +1138,13 @@ static int text_matches_candidate(const char *data, size_t data_len, const char
text_validate_bytes(candidate, candidate_len, 1) != TEXT_OK) {
return TEXT_ERROR;
}
- *matches = data_len == candidate_len &&
- (data_len == 0U || memcmp(data, candidate, data_len) == 0);
+ *matches =
+ data_len == candidate_len && (data_len == 0U || memcmp(data, candidate, data_len) == 0);
return TEXT_OK;
}
int cbm_text_migrate_owned_document(const char *file_path, const char *current_content,
- const char *const *released_contents,
- size_t released_count) {
+ const char *const *released_contents, size_t released_count) {
size_t current_len = 0U;
if (!text_valid_path(file_path) ||
text_bounded_strlen(current_content, TEXT_MAX_BYTES, &current_len) != TEXT_OK ||
diff --git a/src/cli/config_text_edit.h b/src/cli/config_text_edit.h
index fb27294ba..550a0caf7 100644
--- a/src/cli/config_text_edit.h
+++ b/src/cli/config_text_edit.h
@@ -30,15 +30,13 @@ int cbm_text_ensure_owned_document(const char *file_path, const char *owned_cont
* upgrade only an exact byte-for-byte previously released document. Returns
* 1 for user-modified/unowned content. */
int cbm_text_migrate_owned_document(const char *file_path, const char *current_content,
- const char *const *released_contents,
- size_t released_count);
+ const char *const *released_contents, size_t released_count);
/* Returns 0 when removed/missing, 1 when a regular document exists but is not
* byte-for-byte owned by the caller, and -1 for unsafe state or I/O failure. */
int cbm_text_remove_owned_document(const char *file_path, const char *expected_owned_content);
/* Remove current or any exact released document; preserve all other bytes. */
int cbm_text_remove_owned_document_any(const char *file_path, const char *current_content,
- const char *const *released_contents,
- size_t released_count);
+ const char *const *released_contents, size_t released_count);
#ifdef CBM_TEXT_EDIT_ENABLE_TEST_API
typedef void (*cbm_text_precommit_test_hook_t)(const char *file_path, void *context);
diff --git a/src/cli/hook_augment.c b/src/cli/hook_augment.c
index ad208460d..029c490e8 100644
--- a/src/cli/hook_augment.c
+++ b/src/cli/hook_augment.c
@@ -732,8 +732,7 @@ static bool ha_canonical_path(const char *input, char *output, size_t output_siz
return cbm_hook_path_is_abs(output);
}
-static bool ha_path_contains_mode(const char *root, const char *candidate,
- bool case_insensitive) {
+static bool ha_path_contains_mode(const char *root, const char *candidate, bool case_insensitive) {
if (!root || !candidate) {
return false;
}
@@ -1004,17 +1003,16 @@ static bool ha_tool_event_supported(ha_lifecycle_dialect_t dialect, const char *
}
return false;
}
- bool matches =
- (dialect == HA_DIALECT_GEMINI && strcmp(event, "AfterTool") == 0 &&
- strcmp(tool, "read_file") == 0) ||
- (dialect == HA_DIALECT_QWEN && strcmp(event, "PostToolUse") == 0 &&
- strcmp(tool, "ReadFile") == 0) ||
- (dialect == HA_DIALECT_QODER && strcmp(event, "PostToolUse") == 0 &&
- strcmp(tool, "Read") == 0) ||
- (dialect == HA_DIALECT_FACTORY && strcmp(event, "PostToolUse") == 0 &&
- strcmp(tool, "Read") == 0) ||
- (dialect == HA_DIALECT_AUGMENT && strcmp(event, "PostToolUse") == 0 &&
- strcmp(tool, "view") == 0);
+ bool matches = (dialect == HA_DIALECT_GEMINI && strcmp(event, "AfterTool") == 0 &&
+ strcmp(tool, "read_file") == 0) ||
+ (dialect == HA_DIALECT_QWEN && strcmp(event, "PostToolUse") == 0 &&
+ strcmp(tool, "ReadFile") == 0) ||
+ (dialect == HA_DIALECT_QODER && strcmp(event, "PostToolUse") == 0 &&
+ strcmp(tool, "Read") == 0) ||
+ (dialect == HA_DIALECT_FACTORY && strcmp(event, "PostToolUse") == 0 &&
+ strcmp(tool, "Read") == 0) ||
+ (dialect == HA_DIALECT_AUGMENT && strcmp(event, "PostToolUse") == 0 &&
+ strcmp(tool, "view") == 0);
if (matches && coverage) {
*coverage = true;
}
diff --git a/src/pipeline/pipeline.c b/src/pipeline/pipeline.c
index 259e156a6..d4f2ade5c 100644
--- a/src/pipeline/pipeline.c
+++ b/src/pipeline/pipeline.c
@@ -1160,8 +1160,8 @@ static int dump_and_persist_hashes(cbm_pipeline_t *p, const cbm_file_info_t *fil
struct stat fst;
if (stat(files[i].path, &fst) == 0) {
if (cbm_store_upsert_file_hash(hash_store, p->project_name, files[i].rel_path,
- "", stat_mtime_ns(&fst), fst.st_size) !=
- CBM_STORE_OK) {
+ "", stat_mtime_ns(&fst),
+ fst.st_size) != CBM_STORE_OK) {
hash_records_complete = false;
}
} else {
@@ -1225,8 +1225,7 @@ static int dump_and_persist_hashes(cbm_pipeline_t *p, const cbm_file_info_t *fil
};
if (cbm_store_coverage_replace_ex(hash_store, p->project_name, cov, cn, &coverage_meta) !=
CBM_STORE_OK) {
- cbm_log_error("pipeline.err", "phase", "persist_coverage", "project",
- p->project_name);
+ cbm_log_error("pipeline.err", "phase", "persist_coverage", "project", p->project_name);
}
free(cov);
if (have_project_info) {
diff --git a/src/pipeline/pipeline_incremental.c b/src/pipeline/pipeline_incremental.c
index beac27fbb..c84df7d73 100644
--- a/src/pipeline/pipeline_incremental.c
+++ b/src/pipeline/pipeline_incremental.c
@@ -665,8 +665,8 @@ static void dump_and_persist(cbm_gbuf_t *gbuf, const char *db_path, const char *
cbm_store_t *hash_store = cbm_store_open_path(db_path);
if (hash_store) {
- bool hash_records_complete =
- persist_hashes(hash_store, project, files, file_count, mode_skipped, mode_skipped_count);
+ bool hash_records_complete = persist_hashes(hash_store, project, files, file_count,
+ mode_skipped, mode_skipped_count);
/* Coverage rows (#963): re-write the merged set into the rebuilt DB
* (AFTER hashes, so the deleted-file prune sees the live file set). */
diff --git a/src/store/store.c b/src/store/store.c
index 9f5c79d12..112d5ea71 100644
--- a/src/store/store.c
+++ b/src/store/store.c
@@ -2327,8 +2327,7 @@ int cbm_store_coverage_replace_ex(cbm_store_t *s, const char *project,
}
} else {
sqlite3_stmt *del_meta = NULL;
- if (sqlite3_prepare_v2(s->db,
- "DELETE FROM index_coverage_meta WHERE project = ?1;",
+ if (sqlite3_prepare_v2(s->db, "DELETE FROM index_coverage_meta WHERE project = ?1;",
CBM_NOT_FOUND, &del_meta, NULL) != SQLITE_OK) {
store_set_error_sqlite(s, "coverage meta delete prepare");
(void)exec_sql(s, "ROLLBACK;");
@@ -2414,28 +2413,26 @@ static int coverage_query_rows(cbm_store_t *s, const char *project, const char *
int cbm_store_coverage_get_path(cbm_store_t *s, const char *project, const char *rel_path,
cbm_coverage_row_t **out, int *count) {
- static const char sql[] =
- "SELECT rel_path, kind, detail FROM index_coverage "
- "WHERE project = ?1 AND (rel_path = ?2 OR "
- " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) "
- " AND substr(?2, 1, length(rel_path)) = rel_path "
- " AND substr(?2, length(rel_path) + 1, 1) = '/')) "
- "ORDER BY length(rel_path) DESC, rel_path, kind;";
+ static const char sql[] = "SELECT rel_path, kind, detail FROM index_coverage "
+ "WHERE project = ?1 AND (rel_path = ?2 OR "
+ " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) "
+ " AND substr(?2, 1, length(rel_path)) = rel_path "
+ " AND substr(?2, length(rel_path) + 1, 1) = '/')) "
+ "ORDER BY length(rel_path) DESC, rel_path, kind;";
return coverage_query_rows(s, project, rel_path, sql, out, count);
}
int cbm_store_coverage_get_scope(cbm_store_t *s, const char *project, const char *scope,
cbm_coverage_row_t **out, int *count) {
- static const char sql[] =
- "SELECT rel_path, kind, detail FROM index_coverage "
- "WHERE project = ?1 AND (length(?2) = 0 OR rel_path = ?2 OR "
- " (length(rel_path) > length(?2) "
- " AND substr(rel_path, 1, length(?2)) = ?2 "
- " AND substr(rel_path, length(?2) + 1, 1) = '/') OR "
- " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) "
- " AND substr(?2, 1, length(rel_path)) = rel_path "
- " AND substr(?2, length(rel_path) + 1, 1) = '/')) "
- "ORDER BY rel_path, kind;";
+ static const char sql[] = "SELECT rel_path, kind, detail FROM index_coverage "
+ "WHERE project = ?1 AND (length(?2) = 0 OR rel_path = ?2 OR "
+ " (length(rel_path) > length(?2) "
+ " AND substr(rel_path, 1, length(?2)) = ?2 "
+ " AND substr(rel_path, length(?2) + 1, 1) = '/') OR "
+ " (kind = 'not_indexed_dir' AND length(rel_path) < length(?2) "
+ " AND substr(?2, 1, length(rel_path)) = rel_path "
+ " AND substr(?2, length(rel_path) + 1, 1) = '/')) "
+ "ORDER BY rel_path, kind;";
return coverage_query_rows(s, project, scope, sql, out, count);
}
@@ -2460,12 +2457,11 @@ int cbm_store_coverage_meta_get(cbm_store_t *s, const char *project, cbm_coverag
return CBM_STORE_ERR;
}
sqlite3_stmt *stmt = NULL;
- if (sqlite3_prepare_v2(
- s->db,
- "SELECT project, generation, index_mode, recorded_at, recording_status, "
- "ignored_files_stored, ignored_files_total, coverage_version, "
- "hash_records_complete FROM index_coverage_meta WHERE project = ?1;",
- CBM_NOT_FOUND, &stmt, NULL) != SQLITE_OK) {
+ if (sqlite3_prepare_v2(s->db,
+ "SELECT project, generation, index_mode, recorded_at, recording_status, "
+ "ignored_files_stored, ignored_files_total, coverage_version, "
+ "hash_records_complete FROM index_coverage_meta WHERE project = ?1;",
+ CBM_NOT_FOUND, &stmt, NULL) != SQLITE_OK) {
store_set_error_sqlite(s, "coverage meta get prepare");
return CBM_STORE_ERR;
}
diff --git a/tests/test_config_toml_edit.c b/tests/test_config_toml_edit.c
index 2a29b9ecc..90fa504ef 100644
--- a/tests/test_config_toml_edit.c
+++ b/tests/test_config_toml_edit.c
@@ -804,21 +804,21 @@ TEST(config_toml_vibe_owned_table_installs_idempotently_and_removes_exact_state)
"args = []\n";
ASSERT_EQ(cte_fixture(dir, sizeof(dir), path, sizeof(path)), 0);
- ASSERT_EQ(cbm_toml_upsert_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY,
- canonical),
- 0);
+ ASSERT_EQ(
+ cbm_toml_upsert_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY, canonical),
+ 0);
ASSERT_EQ(cte_read(path, actual, sizeof(actual)), 0);
ASSERT_STR_EQ(actual, installed);
- ASSERT_EQ(cbm_toml_upsert_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY,
- canonical),
- 0);
+ ASSERT_EQ(
+ cbm_toml_upsert_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY, canonical),
+ 0);
ASSERT_EQ(cte_read(path, actual, sizeof(actual)), 0);
ASSERT_STR_EQ(actual, installed);
- ASSERT_EQ(cbm_toml_remove_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY,
- canonical),
- 0);
+ ASSERT_EQ(
+ cbm_toml_remove_owned_named_array_table(path, CTE_TABLE, CTE_KEY, CTE_IDENTITY, canonical),
+ 0);
ASSERT_EQ(cte_read(path, actual, sizeof(actual)), 0);
ASSERT_STR_EQ(actual, "");
th_cleanup(dir);
diff --git a/tests/test_mcp.c b/tests/test_mcp.c
index fb968b827..90183796e 100644
--- a/tests/test_mcp.c
+++ b/tests/test_mcp.c
@@ -2226,8 +2226,8 @@ TEST(tool_project_arg_resolves_unique_tail_issue1025) {
ASSERT_NOT_NULL(srv);
char args[CBM_SZ_1K];
- snprintf(args, sizeof(args),
- "{\"repo_path\":\"%s\",\"name\":\"E-project-graph-suffix1025\"}", repo_a);
+ snprintf(args, sizeof(args), "{\"repo_path\":\"%s\",\"name\":\"E-project-graph-suffix1025\"}",
+ repo_a);
char *r = cbm_mcp_handle_tool(srv, "index_repository", args);
ASSERT_NOT_NULL(r);
free(r);
diff --git a/tests/test_pipeline.c b/tests/test_pipeline.c
index 47706388e..4f095f385 100644
--- a/tests/test_pipeline.c
+++ b/tests/test_pipeline.c
@@ -5704,8 +5704,9 @@ TEST(incremental_aborts_when_previous_coverage_is_unreadable) {
ASSERT_GT(nodes_before, 0);
/* Simulate an unreadable prior coverage generation while leaving the
* graph and file hashes healthy enough to otherwise run incrementally. */
- ASSERT_EQ(cbm_store_exec(s, "ALTER TABLE index_coverage RENAME COLUMN detail TO broken_detail;"),
- CBM_STORE_OK);
+ ASSERT_EQ(
+ cbm_store_exec(s, "ALTER TABLE index_coverage RENAME COLUMN detail TO broken_detail;"),
+ CBM_STORE_OK);
cbm_store_close(s);
char path[512];
diff --git a/tests/test_security.c b/tests/test_security.c
index 093223cf6..e8aa1dc27 100644
--- a/tests/test_security.c
+++ b/tests/test_security.c
@@ -69,10 +69,10 @@ TEST(vendored_integrity_manifest_is_relocatable_and_fail_closed) {
char *script = security_read_file("scripts/security-vendored.sh");
ASSERT_NOT_NULL(script);
ASSERT_NOT_NULL(strstr(script, "MISSING=$((MISSING + 1))\n CONTENT_DRIFT=1"));
- ASSERT_NOT_NULL(strstr(
- script,
- "if [[ $CHECKED -eq 0 ]]; then\n echo \"BLOCKED: checksum manifest verified zero "
- "files\"\n STRUCTURAL_FAIL=1"));
+ ASSERT_NOT_NULL(
+ strstr(script,
+ "if [[ $CHECKED -eq 0 ]]; then\n echo \"BLOCKED: checksum manifest verified zero "
+ "files\"\n STRUCTURAL_FAIL=1"));
free(script);
PASS();
}
@@ -120,8 +120,7 @@ static int security_make_vendored_fixture(char *root, size_t root_size,
TEST(vendored_integrity_rejects_unmanifested_source) {
char root[1024];
- ASSERT_EQ(security_make_vendored_fixture(root, sizeof(root),
- "vendored/yyjson/unmanifested.h",
+ ASSERT_EQ(security_make_vendored_fixture(root, sizeof(root), "vendored/yyjson/unmanifested.h",
"#define CBM_SAFE_EXTRA 1\n"),
0);
@@ -137,9 +136,8 @@ TEST(vendored_integrity_rejects_unmanifested_source) {
TEST(vendored_integrity_update_refuses_dangerous_source_without_manifest_mutation) {
char root[1024];
- ASSERT_EQ(security_make_vendored_fixture(
- root, sizeof(root), "vendored/yyjson/danger.c",
- "int danger(void) { return system(\"true\"); }\n"),
+ ASSERT_EQ(security_make_vendored_fixture(root, sizeof(root), "vendored/yyjson/danger.c",
+ "int danger(void) { return system(\"true\"); }\n"),
0);
char script_path[1200];
diff --git a/tests/test_store_nodes.c b/tests/test_store_nodes.c
index b9e3d4993..250e94de1 100644
--- a/tests/test_store_nodes.c
+++ b/tests/test_store_nodes.c
@@ -1705,8 +1705,8 @@ TEST(store_coverage_targeted_path_and_scope_lookup) {
/* A file below an excluded directory inherits that directory row. */
got = NULL;
count = 0;
- ASSERT_EQ(cbm_store_coverage_get_path(s, "coverage-targeted", "generated/nested/file.c",
- &got, &count),
+ ASSERT_EQ(cbm_store_coverage_get_path(s, "coverage-targeted", "generated/nested/file.c", &got,
+ &count),
CBM_STORE_OK);
ASSERT_EQ(count, 1);
ASSERT_STR_EQ(got[0].rel_path, "generated");
@@ -1716,9 +1716,9 @@ TEST(store_coverage_targeted_path_and_scope_lookup) {
/* Prefixes must stop at path-segment boundaries. */
got = NULL;
count = 0;
- ASSERT_EQ(cbm_store_coverage_get_path(s, "coverage-targeted", "generated2/file.c", &got,
- &count),
- CBM_STORE_OK);
+ ASSERT_EQ(
+ cbm_store_coverage_get_path(s, "coverage-targeted", "generated2/file.c", &got, &count),
+ CBM_STORE_OK);
ASSERT_EQ(count, 0);
cbm_store_free_coverage(got, count);
@@ -1734,9 +1734,9 @@ TEST(store_coverage_targeted_path_and_scope_lookup) {
/* A scope nested below an excluded directory still reports its ancestor. */
got = NULL;
count = 0;
- ASSERT_EQ(cbm_store_coverage_get_scope(s, "coverage-targeted", "generated/nested", &got,
- &count),
- CBM_STORE_OK);
+ ASSERT_EQ(
+ cbm_store_coverage_get_scope(s, "coverage-targeted", "generated/nested", &got, &count),
+ CBM_STORE_OK);
ASSERT_EQ(count, 1);
ASSERT_STR_EQ(got[0].rel_path, "generated");
cbm_store_free_coverage(got, count);
@@ -1811,8 +1811,7 @@ TEST(store_coverage_meta_zero_row_truncation_and_delete) {
/* Recreate metadata and a missed-graph node, then project deletion must
* remove the table rows, metadata, and the derived ::missed project. */
ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-meta", "bad.c", "", 1, 1), CBM_STORE_OK);
- cbm_coverage_row_t failure = {
- .rel_path = "bad.c", .kind = "parse_partial", .detail = "1-2"};
+ cbm_coverage_row_t failure = {.rel_path = "bad.c", .kind = "parse_partial", .detail = "1-2"};
ASSERT_EQ(cbm_store_coverage_replace_ex(s, "coverage-meta", &failure, 1, &write_meta),
CBM_STORE_OK);
ASSERT_EQ(cbm_store_delete_project(s, "coverage-meta"), CBM_STORE_OK);
@@ -1837,10 +1836,8 @@ TEST(store_coverage_replace_rejects_invalid_row_arguments) {
ASSERT_NOT_NULL(s);
ASSERT_EQ(cbm_store_upsert_project(s, "coverage-invalid", "/tmp/coverage-invalid"),
CBM_STORE_OK);
- ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-invalid", "kept.c", "", 1, 1),
- CBM_STORE_OK);
- cbm_coverage_row_t kept = {
- .rel_path = "kept.c", .kind = "parse_partial", .detail = "3-4"};
+ ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-invalid", "kept.c", "", 1, 1), CBM_STORE_OK);
+ cbm_coverage_row_t kept = {.rel_path = "kept.c", .kind = "parse_partial", .detail = "3-4"};
cbm_coverage_meta_t original_meta = {
.generation = "before-invalid-call",
.index_mode = "full",
@@ -1853,11 +1850,9 @@ TEST(store_coverage_replace_rejects_invalid_row_arguments) {
cbm_coverage_meta_t replacement_meta = original_meta;
replacement_meta.generation = "must-not-commit";
- ASSERT_EQ(cbm_store_coverage_replace_ex(s, "coverage-invalid", &kept, -1,
- &replacement_meta),
+ ASSERT_EQ(cbm_store_coverage_replace_ex(s, "coverage-invalid", &kept, -1, &replacement_meta),
CBM_STORE_ERR);
- ASSERT_EQ(cbm_store_coverage_replace_ex(s, "coverage-invalid", NULL, 1,
- &replacement_meta),
+ ASSERT_EQ(cbm_store_coverage_replace_ex(s, "coverage-invalid", NULL, 1, &replacement_meta),
CBM_STORE_ERR);
cbm_coverage_row_t *rows = NULL;
@@ -1879,12 +1874,9 @@ TEST(store_coverage_replace_rejects_invalid_row_arguments) {
TEST(store_coverage_replace_rolls_back_when_shadow_rebuild_fails) {
cbm_store_t *s = cbm_store_open_memory();
ASSERT_NOT_NULL(s);
- ASSERT_EQ(cbm_store_upsert_project(s, "coverage-shadow", "/tmp/coverage-shadow"),
- CBM_STORE_OK);
- ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-shadow", "old.c", "", 1, 1),
- CBM_STORE_OK);
- ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-shadow", "new.c", "", 2, 2),
- CBM_STORE_OK);
+ ASSERT_EQ(cbm_store_upsert_project(s, "coverage-shadow", "/tmp/coverage-shadow"), CBM_STORE_OK);
+ ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-shadow", "old.c", "", 1, 1), CBM_STORE_OK);
+ ASSERT_EQ(cbm_store_upsert_file_hash(s, "coverage-shadow", "new.c", "", 2, 2), CBM_STORE_OK);
cbm_coverage_row_t old_row = {
.rel_path = "old.c", .kind = "parse_partial", .detail = "old-detail"};
@@ -1902,11 +1894,9 @@ TEST(store_coverage_replace_rolls_back_when_shadow_rebuild_fails) {
/* Force only the derived-view rebuild to fail. The authoritative rows,
* metadata, and prior shadow graph must remain one atomic generation. */
- ASSERT_EQ(cbm_store_exec(
- s,
- "CREATE TRIGGER fail_missed_insert BEFORE INSERT ON nodes "
- "WHEN NEW.project = 'coverage-shadow::missed' "
- "BEGIN SELECT RAISE(ABORT, 'forced missed shadow failure'); END;"),
+ ASSERT_EQ(cbm_store_exec(s, "CREATE TRIGGER fail_missed_insert BEFORE INSERT ON nodes "
+ "WHEN NEW.project = 'coverage-shadow::missed' "
+ "BEGIN SELECT RAISE(ABORT, 'forced missed shadow failure'); END;"),
CBM_STORE_OK);
cbm_coverage_row_t new_row = {