@@ -5800,8 +5800,14 @@ TEST(tool_check_index_coverage_freshness_uses_indexer_mtime_source_issue1714) {
58005800 info.size),
58015801 CBM_STORE_OK);
58025802
5803- char *response = cbm_mcp_handle_tool(
5804- srv, "check_index_coverage", "{\"project\":\"test-project\",\"paths\":[\"main.go\"]}");
5803+ /* format=json, like every other coverage test here: the DEFAULT response is
5804+ * the compact table, in which a field name never appears. Keeping the
5805+ * assertion on the JSON field is what makes it exact — a bare strstr for
5806+ * "metadata_match" would also be satisfied by a neighbouring column or by
5807+ * another path's row. */
5808+ char *response = cbm_mcp_handle_tool(srv, "check_index_coverage",
5809+ "{\"project\":\"test-project\",\"paths\":[\"main.go\"],"
5810+ "\"format\":\"json\"}");
58055811 ASSERT_NOT_NULL(response);
58065812 ASSERT_NOT_NULL(strstr(response, "\"freshness\":\"metadata_match\""));
58075813 free(response);
@@ -5815,8 +5821,9 @@ TEST(tool_check_index_coverage_freshness_uses_indexer_mtime_source_issue1714) {
58155821 ASSERT_EQ(cbm_store_upsert_file_hash(store, "test-project", "main.go", "",
58165822 seconds_mtime_ns, info.size),
58175823 CBM_STORE_OK);
5818- response = cbm_mcp_handle_tool(
5819- srv, "check_index_coverage", "{\"project\":\"test-project\",\"paths\":[\"main.go\"]}");
5824+ response = cbm_mcp_handle_tool(srv, "check_index_coverage",
5825+ "{\"project\":\"test-project\",\"paths\":[\"main.go\"],"
5826+ "\"format\":\"json\"}");
58205827 ASSERT_NOT_NULL(response);
58215828 ASSERT_NOT_NULL(strstr(response, "\"freshness\":\"metadata_changed\""));
58225829 free(response);
0 commit comments