Repository navigation
feat(memory): add semantic backend contract - #618
Conversation
Add Coding Agent semantic backend schema/scope contracts, a fake backend for contract testing, and disabled-by-default [memory.semantic] config wiring. Verification: - UV_PYTHON=3.12 uv run pytest tests/coding_agent/test_memory_index_backend_contract.py tests/coding_agent/test_memory_switch.py tests/coding_agent/test_semantic_tape_index.py -q - UV_PYTHON=3.12 uv run ruff check src/coding_agent/core/app.py src/coding_agent/topics/semantic_backends tests/coding_agent/test_memory_index_backend_contract.py tests/coding_agent/test_memory_switch.py - git diff --check Review: local code-review-expert APPROVE_NO_P1_P2
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughA new ChangesSemantic Memory Backend Subsystem
Sequence Diagram(s)sequenceDiagram
participant AgentConfig as agent.toml / caller
participant AppParser as _parse_semantic_memory_config
participant SemanticMemoryConfig
participant Pipeline as create_child_pipeline
participant FakeSemanticMemoryBackend
participant SafeSemanticMemoryIndex
AgentConfig->>AppParser: [memory.semantic] table
AppParser->>SemanticMemoryConfig: construct(enabled, backend)
SemanticMemoryConfig-->>Pipeline: memory_cfg.semantic
alt memory_cfg.semantic.enabled == True
Pipeline->>FakeSemanticMemoryBackend: __init__(schema)
Pipeline->>SafeSemanticMemoryIndex: __init__(backend)
SafeSemanticMemoryIndex-->>Pipeline: index
Pipeline-->>AgentConfig: ctx_config["semantic_memory_backend"] + ctx_config["semantic_memory_index"]
else memory_cfg.semantic.enabled == False
Pipeline-->>AgentConfig: semantic keys omitted from ctx_config
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 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 |
Summary
[memory.semantic]config without retrieval integrationScope
Verification
UV_PYTHON=3.12 uv run pytest tests/coding_agent/test_memory_index_backend_contract.py tests/coding_agent/test_memory_switch.py tests/coding_agent/test_semantic_tape_index.py -qUV_PYTHON=3.12 uv run ruff check src/coding_agent/core/app.py src/coding_agent/topics/semantic_backends tests/coding_agent/test_memory_index_backend_contract.py tests/coding_agent/test_memory_switch.pygit diff --checkAPPROVE_NO_P1_P2Summary by CodeRabbit
New Features
Bug Fixes
Tests