Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(search): full-gate follow-ups for R0 and F2

garrytanfa71cfb8966d
diff --git a/scripts/e2e-backend-matrix.txt b/scripts/e2e-backend-matrix.txt
index 515f295a91..66539c4872 100644
--- a/scripts/e2e-backend-matrix.txt
+++ b/scripts/e2e-backend-matrix.txt
@@ -55,3 +55,4 @@ test/e2e/mentions-parity.test.ts
test/e2e/persistence-publish-lock-order-postgres.test.ts
test/e2e/p8-memory-writes-postgres.test.ts
test/e2e/delta-cursor-integrity-postgres.test.ts
+test/e2e/search-keyword-paging-parity.test.ts
diff --git a/test/rerank-degraded-notice.serial.test.ts b/test/rerank-degraded-notice.serial.test.ts
index adc8f2ffeb..cfd1a5e37d 100644
--- a/test/rerank-degraded-notice.serial.test.ts
+++ b/test/rerank-degraded-notice.serial.test.ts
@@ -37,6 +37,7 @@ const { dispatchToolCall } = await import('../src/mcp/dispatch.ts');
const engineStub = {
getConfig: async () => null,
executeRaw: async (sql: string) => sql.includes('AS pending') ? [{ pending: false }] : [],
+ countKeywordPages: async () => 0,
} as unknown as BrainEngine;
const REASONS: RerankFailedReason[] = ['timeout', 'budget', 'rate_limited', 'unreachable', 'auth', 'provider_error'];
diff --git a/test/search/rerank.test.ts b/test/search/rerank.test.ts
index 0810e25947..5756d83456 100644
--- a/test/search/rerank.test.ts
+++ b/test/search/rerank.test.ts
@@ -286,9 +286,9 @@ describe('applyReranker — a hard failure reports onFailure (read-path audit #5
return seen;
};
- test('HTTP / network / unknown errors report provider_error', async () => {
+ test('HTTP / network / unknown errors report provider_error; auth keeps its own reason', async () => {
expect(await failWith(new RerankError('HTTP 503 upstream', 'network', 503))).toEqual(['provider_error']);
- expect(await failWith(new RerankError('forced', 'auth', 401))).toEqual(['provider_error']);
+ expect(await failWith(new RerankError('forced', 'auth', 401))).toEqual(['auth']);
expect(await failWith(new Error('arbitrary'))).toEqual(['provider_error']);
});