Skip to content

Conversation

@pontemonti
Copy link
Contributor

No description provided.

Johan Broberg and others added 9 commits January 17, 2026 20:19
Convert OperationResult.success() singleton from lazy to eager initialization
at module level. Python's import lock ensures thread-safe initialization,
eliminating the race condition in the previous check-and-create pattern.

Addresses CRM-001 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add truncated error_text (max 500 chars) to the log message when HTTP
errors occur in send_chat_history. This improves debugging by showing
the actual error response from the MCP platform.

Addresses CRM-002 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move asyncio.TimeoutError handler before aiohttp.ClientError to ensure
timeouts are caught correctly. Since aiohttp.ServerTimeoutError inherits
from both exceptions, the previous order could misclassify timeouts.

Addresses CRM-003 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…story

Add Optional[str] type annotations for conversation_id, message_id, and
user_message variables to improve code clarity and IDE support.

Addresses CRM-004 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update error messages to say "cannot be empty or whitespace-only" instead
of just "cannot be empty" for clearer feedback when whitespace validation
fails.

Addresses CRM-005 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DEFAULT_REQUEST_TIMEOUT_SECONDS and HTTP_STATUS_OK module-level
constants to replace magic values. Improves maintainability and makes
configuration easier to modify.

Addresses CRM-006 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…rors

Move the defensive copy rationale into a prominent Note section in the
docstring to make it more visible to developers. This clarifies why the
property returns a copy rather than the internal list.

Addresses CRM-007 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…dation

Import TurnContext and use it as a spec for the mock fixture. This ensures
the mock matches the actual TurnContext interface, catching potential
issues if the API changes.

Addresses CRM-008 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add an Example section showing how to create ChatHistoryMessage objects
and call send_chat_history with proper error handling. This helps
developers understand the intended usage pattern.

Addresses CRM-009 from code review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pontemonti pontemonti requested a review from a team as a code owner January 18, 2026 04:26
@pontemonti pontemonti merged commit b3e88ff into copilot/implement-chat-history-api Jan 18, 2026
1 check passed
@pontemonti pontemonti deleted the code-review-fixes/pr-105-v3 branch January 18, 2026 04:28
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.

2 participants