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 <ATHundt@gmail.com>
This commit is contained in:
Andrew Hundt
2026-07-19 19:40:56 -04:00
parent 9c9132650e
commit 5d164c7efb
+3 -1
View File
@@ -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();
}