Files
gbrain/test
Garry TanandClaude Opus 5 921b54fc44 fix(search): implement documented relative since/until durations (#3442)
The SearchOpts contract and query --help have documented relative
durations ('7d', '2w', '1y') since v0.29.1, but the raw string flowed
straight into the engines' ::timestamptz casts. Every search arm failed
fail-open and the date filter was SILENTLY ignored — results still came
back, so the user could not tell the filter never applied.

resolveDateBoundary at the single hybridSearch seam now resolves
relative durations to concrete timestamps, lands a plain YYYY-MM-DD
'until' at end-of-day (also documented, also never implemented), and
throws loudly on unparseable input instead of degrading.

Date-filtered requests also skip the semantic query cache: since/until
are not part of knobsHash, so a filtered result set could be served to
an unfiltered lookup (and relative forms resolve to now-relative
timestamps a persisted row can't express).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 13:21:46 -07:00
..