fix(daemon): deduplicate durable watcher facts - #469
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughSummaryThis PR makes durable watcher fact writes idempotent. SQLite IDs now derive from the session, key, and content. Duplicate inserts become no-ops. It adds regression coverage for repeated ETL runs. Focused tests and the SQLite daemon suite pass. Must FixNone identified. Should FixRun the repository-required locked checks when possible:
The PR notes pre-existing formatting and Clippy issues. Track or resolve them before claiming full workspace validation. ConsiderThe session documents explain the design and testing scope. Approve / Request ChangesApprove with the workspace-check limitation noted above. WalkthroughThe change gives SQLite memory facts deterministic IDs based on session, key, and content. Duplicate IDs are ignored. A SQLite-gated ETL test verifies repeated processing returns three facts, with supporting session documentation. ChangesWatcher Fact Idempotency
Estimated code review effort: 3 (Moderate) | ~20 minutes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
| } | ||
| } | ||
|
|
||
| fn fact_id(session_id: &str, key: &str, content: &str) -> String { |
There was a problem hiding this comment.
WARNING: Deterministic IDs change recall pagination semantics
fact_id generates SHA-256 hex IDs. The recall function's ORDER BY id ASC previously preserved insertion order because IDs were monotonically increasing. With hash-based IDs, ordering is now effectively random, which changes top_k pagination behavior for consumers expecting chronological results.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Reviewed by step-3.7-flash · Input: 63.1K · Output: 20.5K · Cached: 349.3K |
Summary
Verification
Known repository gates