Skip to content

Commit e927bac

Browse files
committed
fix(search): align mixed-query acceptance limits
1 parent 66e665a commit e927bac

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎apps/sim/scripts/test-search-discussions-live.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import type { NativeClient, NativePage } from '@/lib/sim-search/live/types'
3232
* fixtures must have fewer than 100 records; a full oracle page is rejected as incomplete.
3333
* Oracle queries describe equivalent logical branches. Explicit updated: qualifiers take
3434
* precedence over filters; otherwise both paths use inclusive GitHub candidate bounds.
35+
* Untyped oracle searches use separate ten-item issue and pull-request pages.
3536
* The application search layer applies the exclusive end-date filter and is not exercised here.
3637
* Keep real identities and source content in the external case file. Timings include gh process
3738
* and network costs, not model selection or the authorized application/UI boundary.
@@ -242,7 +243,13 @@ async function runQuery(test: QueryCase) {
242243
? new Date(test.filters.startDate).toISOString()
243244
: undefined
244245
const end = test.filters?.endDate ? new Date(test.filters.endDate).toISOString() : undefined
245-
for (const query of test.oracleQueries) {
246+
const oracleQueries = test.oracleQueries.flatMap((query) => {
247+
const typed = (query.match(/"[^"]*"|\S+/g) ?? []).some((token) =>
248+
/^(?:is|type):(?:issue|pr|pull-request)$/i.test(token)
249+
)
250+
return typed ? [query] : [`${query} is:issue`, `${query} is:pr`]
251+
})
252+
for (const query of oracleQueries) {
246253
const nativeDateRange = (query.match(/"[^"]*"|\S+/g) ?? []).some((token) =>
247254
/^updated:/i.test(token)
248255
)

0 commit comments

Comments
 (0)