searchWorker.ts's BM25 inverted-index implementation is well-built, but it indexes content produced by lib/crypto/messageCrypto.ts's decryptMessageText(), an explicit stub that returns its ciphertext argument verbatim, commented as a development placeholder. Once inbound decryption is real, this stub needs to call the real decryption path — otherwise the index either indexes literal ciphertext or risks becoming a second place plaintext leaks through unencrypted.
Acceptance criteria:
decryptMessageText() calls the real decryption pipeline instead of returning its input unchanged
- Messages the search indexer can't decrypt are excluded from the index rather than indexed as raw ciphertext noise
- The search index is stored via the now-encrypted local cache, not as a second unencrypted copy
- A test confirms searching for a term in a message's real plaintext returns that message, and the raw IndexedDB search store never contains literal ciphertext or plaintext outside the encrypted-at-rest format
searchWorker.ts's BM25 inverted-index implementation is well-built, but it indexes content produced bylib/crypto/messageCrypto.ts'sdecryptMessageText(), an explicit stub that returns its ciphertext argument verbatim, commented as a development placeholder. Once inbound decryption is real, this stub needs to call the real decryption path — otherwise the index either indexes literal ciphertext or risks becoming a second place plaintext leaks through unencrypted.Acceptance criteria:
decryptMessageText()calls the real decryption pipeline instead of returning its input unchanged