feat(adapters): log init for gchat + github, include registered adapters in not-found error#104
Conversation
…ers in not-found error - GoogleChatAdapter.initialize() now logs "Google Chat adapter initialized" matching the Slack/Teams pattern. - GitHubAdapter.initialize() now logs "GitHub adapter initialized" unconditionally (the existing "GitHub auth completed" was conditional on auth_token validation). - Chat.channel() / Chat.thread() not-found errors now append "(registered adapters: [...])" so operators can tell at a glance whether the lookup failed because the adapter was never constructed in this process vs. constructed but skipped. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 19 minutes and 42 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds initialization log messages to the GitHub and Google Chat adapters. Additionally, it improves error messages in chat.py when an adapter is not found for a channel or thread by listing the currently registered adapters. There are no review comments, so no feedback is provided.
Synced to upstream vercel/chat@4.27.0 (release commit f55378a). Upstream parity ports: chat.get_user across 8 adapters (#90), Slack Socket Mode (#86, closes #68), Slack dynamic bot_token resolver + webhook_verifier (#87), Teams native DM streaming (#88), Telegram MarkdownV2 (#89), Discord card text dedup (#89), Slack streaming team_id + Teams DM Graph conversation IDs (#85), Slack adapter bug-fix sweep (#89), ExternalSelect.initial_option + option_groups (#84), Slack @mention email-safe regex (#91). Python-only improvements: markdown parser completeness (#101), streaming markdown list/table chunk-boundary (#99), Slack files_upload_v2 kwarg fix (#103), dict-shaped StreamChunk support (#105), Google Chat card-text markdown rendering (#92), adapter init logs + adapter-list in not-found errors (#104). Sync-process documentation captures the review-loop discipline lessons from this wave (docs/UPSTREAM_SYNC.md + docs/SELF_REVIEW.md). Fidelity workflow stays pinned to chat@4.26.0 — upstream did not publish a chat@4.27.0 tag for the Apr 30 monorepo cut. 4036 tests pass, 3 skipped, 0 failed.
Summary
Replacement PR for #96 (could not push merge resolution to tony's fork from the automated session). Original commit
a298c2fby @tony-chinchill-ai preserved in branch history; merge commit30b055bresolves the conflict with #90 (chat.get_useradded a method right where this PR added the init log).Changes (unchanged from #96)
GoogleChatAdapter.initialize()now logsGoogle Chat adapter initializedmatching Slack/Teams.GitHubAdapter.initialize()now logsGitHub adapter initializedunconditionally — the existingGitHub auth completedlog only fires when_auth_tokenis set, so App-credential deployments had no init signal.Chat.channel()andChat.thread()not-found errors now append(registered adapters: [...])so operators can disambiguate "adapter never constructed in this process" from "constructed but lookup name wrong".Why now
Driven by a chinchill-api incident on 2026-05-19:
Adapter "github" not found ...with no other diagnostic context. With these changes, the same error becomes... (registered adapters: ['slack', 'teams']), pointing at the GitHub-adapter construction path.Conflict resolution
src/chat_sdk/adapters/github/adapter.pyonly — both this PR and #90 added content at the end ofGitHubAdapter.initialize(). Resolution:self._logger.info(...)endsinitialize(), then #90'sasync def get_user()follows as the next method.Closes #96.
Generated by Claude Code
Generated by Claude Code