From 5d164c7efb248485ef687fd02fe13b4763010576 Mon Sep 17 00:00:00 2001 From: Andrew Hundt Date: Sun, 19 Jul 2026 19:40:56 -0400 Subject: [PATCH] test(cli): assert exact query row-cap contract tests/test_cli.c:6554 still required the word 'upstream' after commit aefbec05 changed query_max_rows from an unsafe scan prefix to an exact post-selection result ceiling. That stale wording failed the CLI sanitizer suite even though the registry described the corrected behavior. Assert the public invariants instead: query_max_rows is a result-row cap, lowering it does not change which rows match, and Cypher LIMIT cannot bypass it. The focused contract passes 1/1 and the complete CLI plus agent-client ASan/UBSan gate passes 232/232; scripts/check-source-safety.sh and git diff --check also pass. Signed-off-by: Andrew Hundt --- tests/test_cli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.c b/tests/test_cli.c index 1de8c2a8c..2c83ce763 100644 --- a/tests/test_cli.c +++ b/tests/test_cli.c @@ -6550,8 +6550,10 @@ TEST(cli_config_registry_includes_query_max_rows) { ASSERT_NOT_NULL(found); ASSERT_STR_EQ(found->default_val, CBM_DEFAULT_QUERY_MAX_ROWS_STR); ASSERT_STR_EQ(found->range, "0-1000000"); + ASSERT_NOT_NULL(strstr(found->description, "result-row cap")); ASSERT_NOT_NULL(strstr(found->description, "query_graph")); - ASSERT_NOT_NULL(strstr(found->guidance, "upstream")); + ASSERT_NOT_NULL(strstr(found->guidance, "without changing which rows match")); + ASSERT_NOT_NULL(strstr(found->guidance, "may lower but not bypass this cap")); PASS(); }