fix: Store raw entries during local JSONL ingestion#105
Conversation
Local ingestion (ingest_logs/ingest_file) now stores raw JSONL entries in the raw_entries table, matching the behavior of upload_entries for client pushes. This ensures server-side session data can be re-parsed if the parser improves, closing the gap where only client-pushed data had raw entries preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewSummaryThis PR adds raw JSONL entry storage to the local Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - The implementation is correct and well-structured, but should include test coverage for the new Automated review by Claude Code |
- test_ingest_file: assert raw_entries_added count - test_ingest_file_stores_raw_entries: verify DB contents and valid JSON - test_ingest_file_raw_entries_dedup: verify INSERT OR IGNORE dedup - test_ingest_logs: assert raw_entries_added in return dict - test_server.test_ingest_logs: assert raw_entries_added key exists Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewSummaryThis PR adds raw JSONL entry storage to the local Issues FoundCriticalNone ImportantNone Suggestions
Previously Addressed (Filtered)
VerdictREQUEST_CHANGES - Two minor suggestions: inconsistent return dict shape for the skipped path, and a redundant inline import in tests. Automated review by Claude Code |
- Add raw_entries_added: 0 to skipped return dict for consistency - Remove redundant import json inside test function Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Feedback AddressedImplemented
Skipped
|
Code ReviewSummaryThis PR closes a gap where local JSONL ingestion ( Issues FoundCriticalNone ImportantNone SuggestionsNone Previously Addressed (Filtered)
VerdictAPPROVE - All prior feedback has been addressed. The implementation is clean, correctly mirrors the upload path, and has solid test coverage including deduplication verification. Automated review by Claude Code |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code ReviewSummaryThis PR closes a gap where local JSONL ingestion ( Issues FoundCriticalNone ImportantNone SuggestionsNone Previously Addressed (Filtered)
VerdictAPPROVE - All prior feedback has been addressed. The implementation is clean, correctly mirrors the upload path behavior, and has solid test coverage including DB content verification and deduplication testing. Automated review by Claude Code |
Summary
ingest_file) now stores raw JSONL lines inraw_entriestableupload_entries(client push path) which already preserved raw entriesINSERT OR IGNOREon(session_id, timestamp)prevents conflicts with client-pushed entriesContext
Server-side local JSONL ingestion parsed events but didn't preserve raw entries. Client pushes did. This meant server-local session data couldn't be re-parsed from the DB if the parser improved — you'd need the original JSONL files on disk.
Test plan
make check— 410 passed, 10 skippedingest_logs(force=True)) and verify raw_entries count increases for local sessions🤖 Generated with Claude Code