Repository navigation
feat(memory): wire semantic topic recall deps - #623
Conversation
📝 WalkthroughWalkthroughAdds ChangesSemantic topic injection into SemanticMemoryPlugin and pipeline API
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
coding-agent/src/coding_agent/core/app.py (1)
138-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffValidation logic is duplicated with the plugin's helpers.
_validate_semantic_topic_dependenciesre-implements the sameload_topicasync-contract andTopicRangeIndexchecks already present insemantic_memory.py's_validate_topic_store/_validate_topic_index. Since the app-level check exists to fail fast when the plugin isn't constructed (semantic/read disabled), the two paths must stay in lockstep; today they can silently drift (e.g. divergent error messages or contract rules). Consider extracting a single shared validator and reusing it in both places.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/src/coding_agent/core/app.py` around lines 138 - 153, The semantic topic dependency validation is duplicated between _validate_semantic_topic_dependencies in app.py and the plugin helpers in semantic_memory.py, so the contract can drift over time. Extract the async load_topic and TopicRangeIndex checks into a shared validator and have both _validate_semantic_topic_dependencies and the plugin’s _validate_topic_store/_validate_topic_index call it, keeping the error messages and rules aligned in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@coding-agent/src/coding_agent/core/app.py`:
- Around line 138-153: The semantic topic dependency validation is duplicated
between _validate_semantic_topic_dependencies in app.py and the plugin helpers
in semantic_memory.py, so the contract can drift over time. Extract the async
load_topic and TopicRangeIndex checks into a shared validator and have both
_validate_semantic_topic_dependencies and the plugin’s
_validate_topic_store/_validate_topic_index call it, keeping the error messages
and rules aligned in one place.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3b468cc4-eda8-438f-b986-47e988c75141
📒 Files selected for processing (4)
coding-agent/src/coding_agent/core/app.pycoding-agent/src/coding_agent/plugins/semantic_memory.pycoding-agent/tests/coding_agent/plugins/test_semantic_memory.pycoding-agent/tests/coding_agent/test_memory_switch.py
Summary
TopicRangeIndexdependencies intoSemanticMemoryPluginTests
UV_PYTHON=3.12 uv run pytest tests/coding_agent/plugins/test_semantic_memory.py tests/coding_agent/test_semantic_recall.py tests/coding_agent/test_memory_switch.py tests/coding_agent/test_bootstrap.py -qUV_PYTHON=3.12 uv run ruff check src/coding_agent/plugins/semantic_memory.py src/coding_agent/core/app.py tests/coding_agent/plugins/test_semantic_memory.py tests/coding_agent/test_memory_switch.pygit diff --checkReview
code-review-expertreview found two P2 issues; both fixed and re-reviewed asAPPROVE_NO_P1_P2.Non-goals
Summary by CodeRabbit
New Features
Bug Fixes
Tests