fix(line): implement create_source for dispatch - #24254
Closed
KevinJ1729 wants to merge 1 commit into
Closed
Conversation
Collaborator
KevinJ1729
force-pushed
the
codex/line-create-source-fallback
branch
from
May 12, 2026 10:04
70b37e2 to
9d4371a
Compare
Author
|
Thanks for the clarification. I understand this PR overlaps with the existing fixes for the LINE create_source/build_source issue. To avoid adding noise for maintainers, I’ll close this PR. If the message_id handling or regression test from this PR is still useful after the main fix lands, I’d be happy to open a smaller follow-up PR focused only on that part. |
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
LineAdapter.create_source()directly in the native LINE platform pluginmessage_idinto the generatedSessionSourceSessionSourcecreation and message dispatchContext
Hermes Agent v0.13.0 includes the native LINE platform plugin, but LINE webhook dispatch can fail when the gateway calls the adapter source-construction contract and the LINE adapter does not provide an explicit
create_source()implementation.In production this showed up after signed LINE webhook events reached the adapter, then failed before dispatch with:
This patch makes the LINE adapter's dispatch contract explicit instead of relying on surrounding gateway/base behavior, so LINE webhook events consistently produce a
SessionSourcewithplatform=line, chat/user metadata, and the triggering message id.Testing
python -m py_compile plugins/platforms/line/adapter.py tests/gateway/test_line_plugin.pypython -m pytest tests/gateway/test_line_plugin.py -qlocally becausepytestis not installed in this Windows Python environment.uv run pytest tests/gateway/test_line_plugin.py -qlocally becauseuvis not installed in this Windows shell.