Archive sources instead of deleting ingested history#231
Conversation
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.
user1303836
left a comment
There was a problem hiding this comment.
Review
Overall
Small, focused, well-tested. The concept is sound -- preserving content on remove is safer than permanent deletion.
Issues
-
Inconsistent error message. The
SourceNotFoundErrorhandler still says"Source **{name}** was already removed."(line ~480 on main). This should be updated to match the new "archive" language (e.g., "was already archived" or "no longer exists"). -
delete_sourceis now dead code. This was the only caller ofrepository.delete_source(). After this PR, nothing calls it. Worth noting -- should it be kept for future use or removed? -
No path to actual deletion. If a user adds a source by mistake, they can only pause it now. The embed says "This source can be resumed later with /source toggle" but there's no way to truly delete a source and its content. Is this intentional?
-
ConfirmSourceRemoveViewnaming mismatch. The view class name still says "Remove" but the operation is now "archive/pause." Not blocking, but a naming inconsistency that could confuse future readers.
CI
Lint failure is pre-existing (7 unrelated files on main). Tests and type checks pass.
Verdict
Near-ready. Fix the stale error message wording, then good to merge.
Summary
/source removeto stop monitoring a source instead of deleting itTesting
PYTHONPATH=/Users/user1303836/Development/intelstream-codex-source-archive/src /Users/user1303836/Development/intelstream/.venv/bin/pytest tests/test_discord/test_source_management.py -q/Users/user1303836/Development/intelstream/.venv/bin/ruff check src/intelstream/discord/cogs/source_management.py tests/test_discord/test_source_management.py/Users/user1303836/Development/intelstream/.venv/bin/ruff format --check src/intelstream/discord/cogs/source_management.py tests/test_discord/test_source_management.pyCloses #226