Skip to content

docs: document durable + refreshable ChannelDirectory (fixes #817)#818

Merged
MervinPraison merged 1 commit into
mainfrom
claude/issue-817-20260623-1144
Jun 23, 2026
Merged

docs: document durable + refreshable ChannelDirectory (fixes #817)#818
MervinPraison merged 1 commit into
mainfrom
claude/issue-817-20260623-1144

Conversation

@MervinPraison

Copy link
Copy Markdown
Owner

Summary

Documents the new persistence and refresh features added to ChannelDirectory and DeliveryRouter in PraisonAI PR #2186.

  • docs/features/proactive-delivery.mdx: Added three new sections — Persistence, Pre-Naming Channels (Alias Overlay), and Refreshing from Live Adapters — plus a lifecycle Mermaid diagram, an observed-channel row in the How It Works table, and two new Best Practices accordions
  • docs/features/platform-aware-agents.mdx: Updated ReachableTarget.kind to include "observed"; updated describe_targets() step to mention observed channels from live traffic and adapter refresh
  • docs/features/channels-gateway.mdx: Added observed-channel row to the Reachable Targets table; added refresh_directory() background-loop code snippet

No new pages created; docs.json unchanged.

Fixes #817

Generated with Claude Code

- proactive-delivery.mdx: add Persistence, Alias Overlay, and
  Refreshing from Live Adapters sections; update How It Works table
  to include kind:"observed"; add lifecycle Mermaid diagram; add
  background refresh pattern and two new Best Practices accordions
- platform-aware-agents.mdx: update ReachableTarget.kind to include
  "observed"; update describe_targets() step description
- channels-gateway.mdx: add observed-channel row to Reachable Targets
  table; add refresh_directory() background-loop code snippet

Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

More reviews will be available in 9 minutes and 30 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e901fd9-82de-4681-ba09-81f298b98b9c

📥 Commits

Reviewing files that changed from the base of the PR and between e201d44 and 15022a5.

📒 Files selected for processing (3)
  • docs/features/channels-gateway.mdx
  • docs/features/platform-aware-agents.mdx
  • docs/features/proactive-delivery.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-817-20260623-1144

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.

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

Copy link
Copy Markdown

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 updates the documentation across several files to describe new features such as observed channels, background directory refreshing, channel persistence, and alias overlays. However, the review feedback highlights critical discrepancies where the documented APIs (such as refresh_directory(), refresh_from_adapters(), and the persistence configuration arguments in ChannelDirectory) are not actually implemented in the underlying codebase, which would lead to runtime errors and missing functionality.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


async def background_refresh(interval=300):
while True:
botos.delivery_router.refresh_directory()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The refresh_directory() method is not implemented on the DeliveryRouter class in praisonai/bots/delivery.py. Running this code will result in an AttributeError at runtime.

|------|-------------|
| **Origin detection** | `detect_chat_type(platform, chat_id)` classifies the chat as `"group"`, `"direct"`, `"channel"`, or `"unknown"` |
| **Target listing** | `ChannelDirectory.describe_targets()` lists home channels and named aliases |
| **Target listing** | `ChannelDirectory.describe_targets()` lists home channels, named aliases, and reachable-but-unnamed channels from live traffic or `refresh_from_adapters()` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The documentation mentions refresh_from_adapters(), but this method is not implemented on the ChannelDirectory class in praisonai/bots/delivery.py.

| `platform` | `str` | — | Target platform |
| `channel_id` | `str` | — | Platform channel id |
| `kind` | `str` | `"alias"` | `"home"` or `"alias"` |
| `kind` | `str` | `"alias"` | `"home"`, `"alias"`, or `"observed"` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The kind field is documented to support "observed". However, in ChannelDirectory.describe_targets() (defined in praisonai/bots/delivery.py), only "home" and "alias" targets are added to the returned list; observed channels are currently omitted.

Comment on lines +192 to +195
directory = ChannelDirectory(
persist_path=Path("/var/lib/myapp/dir.json"),
aliases_path=Path("/var/lib/myapp/aliases.json"),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ChannelDirectory constructor is documented to accept persist_path and aliases_path arguments. However, the implementation of ChannelDirectory.__init__ in praisonai/bots/delivery.py takes no arguments. Additionally, there is no persistence or loading/saving logic implemented in ChannelDirectory to support channel_directory.json or channel_aliases.json. This will cause a TypeError at runtime.

@mintlify

mintlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
praisonai 🟢 Ready View Preview Jun 23, 2026, 12:01 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@MervinPraison MervinPraison merged commit 2c2cc7e into main Jun 23, 2026
24 checks passed
@MervinPraison MervinPraison deleted the claude/issue-817-20260623-1144 branch June 23, 2026 12:21
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.

Docs: document durable + refreshable ChannelDirectory (PR #2186)

1 participant