Repository navigation
refactor(core): declare outbound target grammar on the messaging adapter (batch 2) - #107953
Merged
Merged
Conversation
Contributor
Author
|
Landing via admin merge under maintainer authorization: standalone validation fully green on this head (tsgo full typecheck, the four touched suites, all check:changed lanes) except |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 15, 2026
…ter (batch 2) (openclaw#107953) * refactor(core): declare outbound target grammar on the messaging adapter (batch 2) * test(outbound): drop a useless spread in the comparison fixture
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
…ter (batch 2) (openclaw#107953) * refactor(core): declare outbound target grammar on the messaging adapter (batch 2) * test(outbound): drop a useless spread in the comparison fixture
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.
What Problem This Solves
Batch 2 of the core→channel-literal purge: core hardcoded three families of outbound target grammar per channel — which channels need
user:-prefixed DM targets, how prefixed target ids compare (case-sensitive vs lowercase), and telegram's bare-numeric topic shorthand. These become declarative fields on the channelmessagingadapter, read generically by core.Why This Change Was Made
New fields
directTargetStyle,targetIdComparison, andnumericTopicShorthandon the messaging adapter (type fields only — SDK export counts unchanged, verified). Core swaps:USER_PREFIXED_DIRECT_TARGET_CHANNELSinmessage-tool.ts, both comparison sets insource-delivery-plan.ts(undeclared channels fall through to generic target normalization exactly as before), and the four=== "telegram"shorthand branches inconversation-resolution.ts/group-id.ts. Declarers: discord/mattermost/msteams/slack (user-prefixed), googlechat/mattermost/matrix (case-sensitive), discord/slack (lowercase), telegram (numeric shorthand). Core runtime LOC net zero; the literal sets are gone.User Impact
None — table-driven pins prove declared channels behave as the old sets did and undeclared channels keep today's generic handling.
Evidence
tsgotypecheck green; message-tool, source-delivery-plan (+ outbound suite), conversation-resolution, group-id tests green; allcheck:changedlanes green exceptlint core, which fails on two files this PR does not touch (src/agents/embedded-agent-runner/run/attempt-dispatch-preparation.ts,attempt-recovery.ts) — landed an hour ago by refactor: split embedded agent runner orchestration #107900 in the agents stream.