fix: BrainBar write retry cap + search filter params (C1/H3)#91
Conversation
…iew mining
C1: Reduce EAGAIN retry cap 50→10 (10ms max serial queue block). Extracted
maxWriteRetries constant. Root cause of BrainBar socket death.
H3: brain_search filter params (project, tag, importance_min) were advertised
in tool schema but never applied. BrainDatabase.search() now builds
dynamic WHERE clause. MCPRouter extracts and passes all 3 filters.
Also: 9 new tests (5 DB filter, 2 E2E router, stalled client, overlong path).
37 Swift + 921 Python = 958 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
|
@codex review |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
✅ Actions performedReview triggered.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces search filtering capabilities and improves write retry handling. Changes include adding a configurable write retry limit constant, extending database chunk storage with tags support, implementing search filters for project/tag/importance parameters, updating the routing layer to support filtered searches, and adding comprehensive unit and integration tests for new functionality. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
sendResponseEAGAIN retry cap from 50→10 (10ms max serial queue block). ExtractedmaxWriteRetriesconstant. This was the probable root cause of BrainBar socket death — one stalled socat client blocked ALL connections.brain_searchfilter params (project,tag,importance_min) were advertised in the MCP tool schema but completely ignored byhandleBrainSearch()andBrainDatabase.search(). Nowsearch()builds a dynamic WHERE clause and MCPRouter extracts + passes all 3 filters.Test plan
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Summary by CodeRabbit
New Features
Improvements