Skip to content

feat(adapters): log init for gchat + github, include registered adapters in not-found error#104

Merged
patrick-chinchill merged 3 commits into
mainfrom
claude/port-adapter-init-logs-and-not-found-context
May 28, 2026
Merged

feat(adapters): log init for gchat + github, include registered adapters in not-found error#104
patrick-chinchill merged 3 commits into
mainfrom
claude/port-adapter-init-logs-and-not-found-context

Conversation

@patrick-chinchill
Copy link
Copy Markdown
Collaborator

Summary

Replacement PR for #96 (could not push merge resolution to tony's fork from the automated session). Original commit a298c2f by @tony-chinchill-ai preserved in branch history; merge commit 30b055b resolves the conflict with #90 (chat.get_user added a method right where this PR added the init log).

Changes (unchanged from #96)

  • GoogleChatAdapter.initialize() now logs Google Chat adapter initialized matching Slack/Teams.
  • GitHubAdapter.initialize() now logs GitHub adapter initialized unconditionally — the existing GitHub auth completed log only fires when _auth_token is set, so App-credential deployments had no init signal.
  • Chat.channel() and Chat.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.py only — both this PR and #90 added content at the end of GitHubAdapter.initialize(). Resolution: self._logger.info(...) ends initialize(), then #90's async def get_user() follows as the next method.

Closes #96.


Generated by Claude Code


Generated by Claude Code

tony-chinchill-ai and others added 2 commits May 19, 2026 19:54
…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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@patrick-chinchill, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 666eb5a9-cfb4-4f12-a573-2c6bef9a71b3

📥 Commits

Reviewing files that changed from the base of the PR and between 16b9e04 and fcdfbea.

📒 Files selected for processing (3)
  • src/chat_sdk/adapters/github/adapter.py
  • src/chat_sdk/adapters/google_chat/adapter.py
  • src/chat_sdk/chat.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@patrick-chinchill patrick-chinchill merged commit cf74609 into main May 28, 2026
10 checks passed
patrick-chinchill added a commit that referenced this pull request May 28, 2026
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.
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.

3 participants