Fixed
- Startup Audit Bug: Fixed a critical issue where the startup audit could incorrectly delete valid historical Discord messages from Qdrant when they fell outside the fetched audit window
- Now limits reconciliation to the message range actually covered by the audit window
- Skips Qdrant records outside the audited message-id bounds
- Preserves offline delete detection for messages inside the audited window
- Replaced repeated linear lookup with a message lookup map during reconciliation for better performance
Added
- Ruff linting: Integrated Ruff for fast Python linting in CI/CD pipeline to ensure consistent code quality across the project
Tests Added
- Unit tests for preserving older messages outside the audit window
- Unit tests for correctly deleting missing messages inside the audit window
What Changed
Previously, the startup audit would fetch only a bounded set of Discord messages before the cursor, but compared that partial snapshot against all Qdrant points in the channel. This could cause older valid records to be incorrectly treated as missing and deleted. This is now fixed. Additionally, we've added automated code linting with Ruff to maintain code quality standards.