Skip to content

fix: /rebuild crashed with NameError (missing merge_duplicate_notes import)#3

Merged
mishablank merged 1 commit into
mainfrom
fix/rebuild-missing-merge-import
Jun 28, 2026
Merged

fix: /rebuild crashed with NameError (missing merge_duplicate_notes import)#3
mishablank merged 1 commit into
mainfrom
fix/rebuild-missing-merge-import

Conversation

@mishablank

Copy link
Copy Markdown
Owner

on_rebuild referenced merge_duplicate_notes but bot.py never 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.py disabled the index — so it shipped broken. A live /rebuild from Telegram crashed with NameError right after the pre-rebuild git snapshot.

Fix: add from .retro import merge_duplicate_notes, plus a regression test that runs /rebuild with the index enabled (find_semantic_duplicate stubbed to no-match) so the merge import path is covered.

171 tests pass.

🤖 Generated with Claude Code

…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>
@mishablank
mishablank merged commit f12c331 into main Jun 28, 2026
3 checks passed
@mishablank
mishablank deleted the fix/rebuild-missing-merge-import branch June 28, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant