feat(channels): canonicalize conversation bindings - #39
Merged
Conversation
Introduce a host-owned canonical conversation key helper and switch gateway channels to use explicit channel scopes and encoded platform ids. Channel /resume now rebinds the current external conversation to the resumed session using the existing session.binding.rebound projection. Validation: uv run pytest tests/runtime/test_session_routing.py tests/runtime/test_session_commands.py tests/runtime/test_sessions_context.py tests/channels; uv run python -m compileall demiurge/runtime demiurge/channels tests/runtime tests/channels
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Canonicalizes channel
conversation_keygeneration through a host-owned runtime helper and updates channel adapters to use route keys for Telegram, Slack, Mattermost, Matrix, Email, and Webhook fallback conversations.This is an intentional breaking change for existing durable channel bindings: old key shapes such as
telegram:123are not migrated or looked up. Existing external conversations start fresh unless the operator explicitly resumes the intended session.Behavior Changes
telegram:dm:<chat_id>; non-private chats bind astelegram:group:<chat_id>without topic routing.:thread:<id>route keys.conversation_keyvalues still win./resumenow persists the current external conversation binding to the resumed session, so the next inbound message in that conversation continues in the resumed transcript.Documentation
Updated developer delivery/context docs and the channel configuration how-to, including the zh-CN site mirror.
Verification
List the commands you ran and the result.
Change Checklist