fix: /rebuild crashed with NameError (missing merge_duplicate_notes import)#3
Merged
Merged
Conversation
…meError) on_rebuild referenced merge_duplicate_notes without importing it; the merge branch only runs when the semantic index is enabled, which no test exercised. Add the import and a regression test that runs /rebuild with the index enabled. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
on_rebuildreferencedmerge_duplicate_notesbutbot.pynever imported it. The merge branch only runs when the semantic index is enabled (OpenAI key present), and no test exercised that path —test_bot_rebuild.pydisabled the index — so it shipped broken. A live/rebuildfrom Telegram crashed withNameErrorright after the pre-rebuild git snapshot.Fix: add
from .retro import merge_duplicate_notes, plus a regression test that runs/rebuildwith the index enabled (find_semantic_duplicate stubbed to no-match) so the merge import path is covered.171 tests pass.
🤖 Generated with Claude Code