mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-09 09:11:00 +08:00
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:
+3
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user