fix(recall): rebuild summary on current main (undo stale-base clobber)#41
Merged
Conversation
…se regression PR #37 was built from a 15-commit-behind stale local checkout and did a wholesale file copy, clobbering symbols that main had added in those 15 commits: - schemas/conversation.py: ChatRequest, ChatMessage, ConversationSummary, AppSettings fields - ollama_client.py: chat() method - crud/conversation.py: list_conversations, get_conversation - api/routes/conversations.py: list endpoint, _format_result, compare endpoints - config.py: CHAT_MODEL/TEMPERATURE/MAX_TOKENS/SYSTEM_PROMPT + EMBEDDING_MODEL defaults This PR restores BASE_GOOD (1092017 = main just before #37 merged) as foundation for all 7 affected files, then re-applies only the summary-related additions: - config.py: SUMMARY_MODEL with safe default (no silent fallback) - models/conversation.py: summary = Column(Text) (already correct in HEAD, no change) - schemas/conversation.py: summary: Optional[str] = None on ConversationResponse - ollama_client.py: generate_summary(text, model) method - services/deriver.py: _generate_summary() with try/except, passed to crud - crud/conversation.py: upsert via pg_insert ON CONFLICT (source, source_conversation_id) - api/routes/conversations.py: _format_result prefers summary over messages[0] - crud/__init__.py: re-export list_conversations and get_conversation Verified: 25 passed, 0 failed; black --check green.
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.
Summary
PR #37 was built from a 15-commit-behind stale local checkout, clobbering symbols that main had added in those 15 commits. This PR restores BASE_GOOD (1092017 = main just before #37 merged) as foundation and re-applies the summary feature only.
Clobbered symbols restored:
schemas/conversation.py:ChatRequest,ChatMessage,ConversationSummary,AppSettingsembedding/chat fieldsollama_client.py:chat()streaming methodcrud/conversation.py:list_conversations,get_conversationapi/routes/conversations.py: list endpoint,_format_result, compare endpointsconfig.py:CHAT_MODEL/CHAT_TEMPERATURE/CHAT_MAX_TOKENS/CHAT_SYSTEM_PROMPT+EMBEDDING_MODELdefaultsSummary additions re-applied cleanly on top:
config.py:SUMMARY_MODEL: str = "qwen3:14b"with safe defaultschemas/conversation.py:summary: Optional[str] = NoneonConversationResponseollama_client.py:generate_summary(text, model)via/api/generateservices/deriver.py:_generate_summary()with try/except (failure → NULL, never blocks store)crud/conversation.py: upsert viapg_insert ON CONFLICT (source, source_conversation_id)api/routes/conversations.py:_format_resultprefers summary over messages[0] fallbackcrud/__init__.py: re-exportlist_conversationsandget_conversationTest plan
ImportError: cannot import name 'ChatRequest'resolvedpytest tests/→ 25 passed, 0 failedblack --check→ exit 0