perf: Skip session stats update during batch upload#97
Conversation
- Add update_stats param to upload_entries (default: False) - Add finalize_sync tool to update stats once at end - Add progress logging with time estimates to push command - Increase HTTP timeout to 120s - Fix timezone comparison in incremental sync The heavy update_session_stats query was running after every batch, causing timeouts. Now it only runs once at the end. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryThis PR adds a performance optimization for the Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - Missing test and documentation for the new Automated review by Claude Code |
Without this, local MCP calls fail with "Tailscale identity required". Matches the pattern used in agent-event-bus. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryThis PR optimizes the Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - The new Automated review by Claude Code |
- Update rejection test to use non-localhost IP (192.168.1.100) - Add tests for localhost bypass (127.0.0.1 and ::1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewSummaryThis PR optimizes the Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - The new Automated review by Claude Code |
Code ReviewSummaryThis PR optimizes the Issues FoundCriticalNone Important
Suggestions
VerdictREQUEST_CHANGES - The new Automated review by Claude Code |
Address reviewer feedback: - Add test for finalize_sync MCP tool - Document finalize_sync in guide.md Remote Sync table - Update benchmark skip comment to include finalize_sync Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Feedback AddressedImplemented
Skipped
|
Code ReviewSummaryThis PR optimizes the Issues FoundCriticalNone ImportantNone SuggestionsNone Previously Addressed (Filtered)
VerdictAPPROVE - All previously raised issues have been addressed. The performance optimization is well-implemented with proper test coverage and documentation. Automated review by Claude Code |
Summary
update_statsparam toupload_entries(default:False)finalize_synctool to update stats once at endpushcommandProblem
The heavy
update_session_statsquery was running after every batch, causing timeouts. A single batch of 50 entries was taking 2+ minutes because the stats query scans all events.Solution
Skip stats update during batch uploads, call
finalize_synconce at the end.Test plan
--days 1completes without timeout🤖 Generated with Claude Code