feat(search): expose timeout warnings on FT.SEARCH family#3338
Open
nkaradzhov wants to merge 2 commits into
Open
feat(search): expose timeout warnings on FT.SEARCH family#3338nkaradzhov wants to merge 2 commits into
nkaradzhov wants to merge 2 commits into
Conversation
…HYBRID Surface the server `warning` field returned alongside partial results when a query hits its timeout under a `return`/`return-strict` on-timeout policy. - Add shared `parseWarnings` helper in reply-transformers that extracts the `warning` field from a RESP3 map reply and normalizes it to `string[]`. - Add `warnings: Array<string>` to SearchReply, SearchNoContentReply, and AggregateReply; FT.HYBRID already exposed warnings and now reuses the helper. FT.SEARCH and FT.AGGREGATE only carry warnings on RESP3 (empty array on RESP2); FT.HYBRID reports on both protocols. The new field is additive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nkaradzhov
force-pushed
the
timeout-guardrails
branch
from
July 21, 2026 18:52
75bd8ec to
6faf640
Compare
FT.CURSOR READ reuses AGGREGATE_WITHCURSOR's transformReply, which now includes the additive warnings field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surface the server
warningfield returned alongside partial results when a query hits its timeout under areturn/return-stricton-timeout policy.parseWarningshelper in reply-transformers that extracts thewarningfield from a RESP3 map reply and normalizes it tostring[].warnings: Array<string>to SearchReply, SearchNoContentReply, and AggregateReply; FT.HYBRID already exposed warnings and now reuses the helper.FT.SEARCH and FT.AGGREGATE only carry warnings on RESP3 (empty array on RESP2); FT.HYBRID reports on both protocols. The new field is additive.
Description
Checklist
npm testpass with this change (including linting)?Note
Low Risk
Additive reply parsing and TypeScript fields only; no command or auth changes. Consumers may need to account for the new
warningsproperty in strict typing or destructuring.Overview
Adds
warnings: string[]to transformed replies for FT.SEARCH, FT.SEARCH NOCONTENT, FT.AGGREGATE, and related cursor flows so callers can see server messages (e.g. timeout underreturn/return-strict) when partial results are returned.A shared
parseWarningshelper inreply-transformersreads the RESP3 map fieldwarning/warningsand normalizes entries to strings. RESP3 transformers for search and aggregate use it; RESP2 always setswarnings: []because those commands do not carry warnings on RESP2. FT.HYBRID already exposed warnings and now uses the same helper instead of duplicate parsing.Integration expectations and unit tests for RESP2/RESP3 warning behavior were updated accordingly. The change is additive on reply shapes (existing fields unchanged).
Reviewed by Cursor Bugbot for commit 3c23353. Bugbot is set up for automated code reviews on this repo. Configure here.