fix(session-query): preflight SQLite bindings (round 6)

This commit is contained in:
Hypatia May
2026-07-17 10:29:49 +08:00
parent 220076e5e2
commit f401528941
3 changed files with 46 additions and 21 deletions

View File

@@ -445,6 +445,19 @@ describe('SQLite session search', () => {
],
})).rejects.toThrow(expectCode('SESSION_QUERY_INVALID_FILTER'))
})
it('rejects one 125,000-value filter list with a typed error', async () => {
const ctx = await liveContext()
const ids = Array.from(
{ length: 125_000 },
(_, index) => SessionId(`oversized-binding-${index}`),
)
await expect(ctx.sessionSearch.searchSessions({
query: 'needle',
sessionFilters: [{ kind: 'id', values: ids }],
})).rejects.toThrow(expectCode('SESSION_QUERY_INVALID_FILTER'))
})
})
describe('SQLite reconciliation and source lifecycle', () => {