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 }}
Repository navigation
fix(ids): include content blocks in content hash #466
message_content_hash() and conversation_content_hash() in pipeline/ids.py:157-227 only hash id, role, text, and timestamp. Content blocks — tool_use, tool_result, thinking blocks with their types, tool names, tool inputs — are completely excluded.
Two conversations whose messages have identical text but different tool calls or tool inputs produce the same content hash. During re-import, the UPSERT at ingest_batch.py:175 checks WHERE content_hash != excluded.content_hash — if the hash matches, all message/attachment/block writes are skipped.
Impact: Structural changes in content blocks are silently lost during re-parsing and re-ingestion. This is a data-loss bug for any archive containing tool-use conversations (Claude Code, ChatGPT with tools).
Include content block data in the hash: for each block, hash at minimum type, tool_name (for tool_use), tool_id (for tool_result), and text. The _normalize_for_hash() helper should handle blocks the same way it handles message fields.
Activity
fix: remaining audit findings — content hash, XSS, TOCTOU, detection,…
fix: remaining audit findings — content hash, XSS, TOCTOU, detection,…
fix: remaining audit findings — content hash, XSS, TOCTOU, detection,…