You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
index_recording / search_recording correctness: cache ignores OCR availability, same-basename recordings share one index, punctuation queries match everything #255
search_recording is how agents query long recordings without pulling frames. Stale or crossed-over indexes give agents confidently wrong answers.
Evidence
Cache ignores OCR.src/tools/indexRecording.ts:87-91 compares fingerprint, sceneThreshold and maxFrames, but not prior.ocr. After a first run without an OCR language, the note tells the user to install one. When they do and re-run, they get cached:true with no screen text unless they pass force.
Same-basename collision.indexSidecarPath strips the extension (src/utils/recordingIndex.ts:104-106), so demo.mp4 and demo.mkv both map to demo.index.json. They also share the default transcript demo.srt (indexRecording.ts:211). searchIndex never checks index.video, so searching one returns the other's hits, flagged only as "stale".
Punctuation queries.normalizeForMatch("-") returns "_" (src/utils/ocr.ts:120), which matches nearly every item (recordingIndex.ts:326-330).
Suggested approach
Invalidate the cache when !prior.ocr && ocrAvailableNow.
Key sidecars on the full file name (demo.mp4.index.json), with a read fallback for the old name, and verify index.video.
Reject queries with no letters or digits.
Move the cache decision into a pure helper so it can be tested.
Activity