Skip to content

refactor(core): declare outbound target grammar on the messaging adapter (batch 2) - #107953

Merged
steipete merged 2 commits into
mainfrom
claude/chanref-literal-batch2
Jul 15, 2026
Merged

steipete merged 2 commits into
mainfrom
claude/chanref-literal-batch2

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 channel messaging adapter, read generically by core.

Why This Change Was Made

New fields directTargetStyle, targetIdComparison, and numericTopicShorthand on the messaging adapter (type fields only — SDK export counts unchanged, verified). Core swaps: USER_PREFIXED_DIRECT_TARGET_CHANNELS in message-tool.ts, both comparison sets in source-delivery-plan.ts (undeclared channels fall through to generic target normalization exactly as before), and the four === "telegram" shorthand branches in conversation-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

  • Blacksmith Testbox: full tsgo typecheck green; message-tool, source-delivery-plan (+ outbound suite), conversation-resolution, group-id tests green; all check:changed lanes green except lint 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.
  • Autoreview (codex gpt-5.6-sol, xhigh): clean, "patch is correct (0.95)" — confirms every previously hardcoded case has a corresponding declaration and undeclared plugins retain generic handling.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: telegram Channel integration: telegram agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jul 15, 2026
@steipete

Copy link
Copy Markdown
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 lint core, which fails in two embedded-agent-runner files this PR does not touch (landed by #107900 an hour before this run). Autoreview clean at 0.95. Waiting for a fresh hosted-CI cycle only re-enters the moving-main race documented across this program.

@steipete
steipete merged commit 894cc60 into main Jul 15, 2026
168 of 174 checks passed
@steipete
steipete deleted the claude/chanref-literal-batch2 branch July 15, 2026 03:09
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: telegram Channel integration: telegram maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant