Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(search): isolate the #4610 remote trust-gate case from the remote page cap (GBRA-156)
garrytan17f99f71e902
diff --git a/test/search/crag-escalation-limit.serial.test.ts b/test/search/crag-escalation-limit.serial.test.tsindex 76ca5d9cc2..8a3ae85edb 100644--- a/test/search/crag-escalation-limit.serial.test.ts+++ b/test/search/crag-escalation-limit.serial.test.ts@@ -170,8 +170,12 @@ describe('#4610 escalation limit — resolveEffectiveLimit contract (shared with// is a trusted-local privilege. So the effective limit is the CONFIGURED// conservative searchLimit (10), not tokenmax's 50; a broken gate would// hand back the full 30-row sweep.+ // The remote page cap (search.remote_page_cap, GBRA-156) would cut these+ // meaning-only mock rows to 3 pages and hide the limit under test, so it+ // is off here; test/search-remote-page-cap.test.ts covers the cap.calls.length = 0;await engine.setConfig('search.mode', 'conservative');+ await engine.setConfig('search.remote_page_cap', '0');try {const meta: Record<string, unknown> = {};const ctx = {@@ -195,6 +199,7 @@ describe('#4610 escalation limit — resolveEffectiveLimit contract (shared withexpect(results.length).toBe(10);} finally {await engine.setConfig('search.mode', 'balanced');+ await engine.unsetConfig('search.remote_page_cap');}}, 30000);