Skip to content

fix(plugin-runtime): restore channel turn alias - #91245

Merged
fuller-stack-dev merged 13 commits into
openclaw:mainfrom
849261680:fix/91122-runtime-channel-turn-alias
Sep 17, 2026
Merged

fuller-stack-dev merged 13 commits into
openclaw:mainfrom
849261680:fix/91122-runtime-channel-turn-alias

Conversation

@849261680

@849261680 849261680 commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #91122

What Problem This Solves

Fixes older shipped channel plugins failing on core.channel.turn.* after the runtime renamed that API to channel.inbound.*.

User Impact

Existing plugins can use the deprecated alias again, including the current runtime-bound dispatch helper. New plugins should continue using inbound. No configuration, provider, or migration changes are required.

Why This Change Was Made

turn references the complete same five-member object as inbound, including after registration scopes the context builder. Runtime-injected dispatch keeps precedence; test mocks preserve defined canonical overrides over legacy overrides. Lazy loading and generic signatures remain intact.

The original implementation and contributor commits by @849261680 are retained. This maintainer repair updates the existing PR to current main, removes the unrelated snapshot-test edit and obsolete baseline/documentation paths, and records the alias in current compatibility metadata.

Evidence

Current integration head: 1387f50f563014a93cc5a6aa523bb59a31b1256c. The eleven-file alias repair remains byte-identical to the accepted prior proof.

  • Independent review: no actionable P0–P2 findings. The subsequent complete typed-fixture correction also passed independent review.
  • Focused suites: 67 tests passed across runtime, scoped registration, mocks, and compatibility metadata. After correcting the typed fixture, its 12 runtime tests passed again.
  • Regression check against pinned main: three expected failures for missing alias, missing dispatch, and incorrect scoped-object identity.
  • pnpm build: completed successfully. No ineffective-dynamic-import warning. The unchanged UI build reported a startup-size advisory (354.3 versus 354.1 KiB); the build exit was zero.
  • Built-runtime proof at 2026-09-17 00:44 UTC imported dist/plugins/runtime/index.js, called the actual core runner/dispatcher with isolated session storage, and observed two delivered final payloads. Both names used the runtime-injected dispatcher despite a conflicting caller override:
{"sameObject":true,"helpers":["buildContext","run","runPreparedReply","dispatch","dispatchReply"],"boundDispatchCalls":2,"delivered":[{"surface":"inbound","text":"alias runtime accepted","kind":"final"},{"surface":"turn","text":"alias runtime accepted","kind":"final"}],"drop":{"dispatched":false,"kind":"drop"}}

The built production sources are blob-identical to this head; intervening main changes did not change the runtime/turn owners or the eleven repair paths. The final fixture-only change was separately reviewed and tested. Exact-head hosted CI and native preparation/landing remain required.

The PR is synced with main 75d29a7c637bb938440afb59669807bff749f0c0. All temporary prerequisite deltas now come entirely from landed canonical main, including the UI startup fix (#150491) and Qwen budget fixture (#150523). The final diff is exactly the eleven-file accepted alias repair; its blobs are unchanged.

Historical integration verification included independent review, Qwen/cold-checkout/native-wrapper tests, and local voice routing. On prior head 980effb30baa, hosted voice routing passed with 165 assertions across 15 files and worker exit 0. Its overall CI run was later cancelled by the necessary Qwen/main conflict sync, with one inherited installer one-second loopback timeout and two unfinished jobs. That same installer test passed on prior byte-identical source. A retry request was rejected because the workflow was still running; no retry started. Neither superseded run receives full-CI credit.

Required exact-head CI 35178127514 and openclaw/ci-gate passed on attempt 2 after one failed-jobs-only retry. The Codex package compile timeout and IPv6 portal shard passed without source or timeout changes; successful jobs were not replayed. Native review and prepare-run passed on 1387f50f563014a93cc5a6aa523bb59a31b1256c. Landed via the native workflow as c147150cca9d, verified on current main. No required gate was waived and no accepted alias proof was replayed.

Proof limit: the reply producer and delivery observer were injected into the real built core dispatch path. No live provider, Feishu account, or old published Feishu package was exercised. The prior contributor four-helper probe remains historical evidence, not acceptance for current dispatch.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 11:36 PM ET / September 17, 2026, 03:36 UTC (Revision 17).

ClawSweeper review

What this changes

Restores the deprecated channel.turn API as the same object as channel.inbound, including scoped registration, dispatcher binding, test helpers, and migration documentation.

Merge readiness

✅ Ready for maintainer review

This repair remains necessary: current main and v2026.9.4 still lack the alias. Earlier blocking findings are resolved, and the recorded production-path proof supports the focused compatibility fix.

Priority: P1
Reviewed head: 1387f50f563014a93cc5a6aa523bb59a31b1256c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused compatibility repair with meaningful production-path evidence and no remaining actionable finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Recorded built-runtime execution exercises the real runner and dispatcher through both names, observes two final deliveries and a drop, and verifies bound-dispatch precedence. The production owners match the accepted repair; live providers and old published plugin packages were explicitly outside this proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded built-runtime execution exercises the real runner and dispatcher through both names, observes two final deliveries and a drop, and verifies bound-dispatch precedence. The production owners match the accepted repair; live providers and old published plugin packages were explicitly outside this proof.
Evidence reviewed 9 items Complete alias and dispatcher binding: The alias references the complete five-member inbound object. Its dispatch function retains runtime-injected dispatcher precedence and existing lazy loading.
Scoped identity and prior findings: Registered bundled runtimes assign both names to the same scoped object, preserving the host context builder. Mock overrides merge legacy values beneath defined canonical values, then rebind the alias. These resolve the earlier complete-contract, scoped-runtime, and override findings.
Still absent on current main: Current-main runtime source exposes inbound without turn; its migration documentation still describes the alias as removed. The linked open issue remains the canonical report: #91122.
Findings None None.
Security None None.

How this fits together

Channel plugins pass incoming messages into OpenClaw’s shared runtime for context construction, session recording, and reply dispatch. The compatibility alias lets older callers reach that same pipeline.

flowchart LR
  A[Incoming channel message] --> B[Channel plugin]
  B --> C[Legacy turn API]
  B --> D[Current inbound API]
  C --> E[Shared scoped runtime]
  D --> E
  E --> F[Session and reply dispatch]
  F --> G[Channel delivery]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +7, Tests +79, Docs +3. Total +89 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 15 8 +7
Tests 6 177 98 +79
Docs 1 5 2 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 197 108 +89

Review metrics

Metric Value Why it matters
Code growth by responsibility Production +7 lines; tests and test support +79; docs +3 The small production increase restores the shared compatibility contract; most growth protects alias identity and dispatch behavior.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #91122
Summary: This PR is the open implementation candidate for the canonical missing-alias report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one canonical inbound implementation and retain its deprecated alias for published plugins until the documented migration and removal conditions are met.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main lacks channel.turn, so an older plugin calling channel.turn.run reaches undefined; the discussion supplies matching production failures. This reviewer did not execute a reproduction.

Is this the best way to solve the issue?

Yes. Object identity preserves the canonical implementation and scoped dispatcher while repairing the reported legacy call path without new configuration or persisted-state changes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9a4468148bc0.

Labels

Label justifications:

  • P1: Reported installed channel plugins lose inbound replies when they call the missing legacy runtime API.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded built-runtime execution exercises the real runner and dispatcher through both names, observes two final deliveries and a drop, and verifies bound-dispatch precedence. The production owners match the accepted repair; live providers and old published plugin packages were explicitly outside this proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded built-runtime execution exercises the real runner and dispatcher through both names, observes two final deliveries and a drop, and verifies bound-dispatch precedence. The production owners match the accepted repair; live providers and old published plugin packages were explicitly outside this proof.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-20T04:21:17.933Z sha cd94952 :: found issues before merge. :: [P1] Alias the complete current inbound API | [P1] Rebind the alias in scoped plugin runtimes
  • reviewed 2026-08-26T05:09:41.280Z sha cd94952 :: needs changes before merge. :: [P1] Preserve the complete inbound contract in the alias | [P1] Retain scoped inbound dispatch when rebasing
  • reviewed 2026-09-04T21:35:58.948Z sha cd94952 :: blocked before merge. :: [P1] Preserve the complete inbound contract in the alias
  • reviewed 2026-09-17T00:57:44.016Z sha 29e455f :: blocked before merge. :: none
  • reviewed 2026-09-17T01:04:58.232Z sha 29e455f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T01:22:28.715Z sha 29e455f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T02:38:12.680Z sha c8b7d7b :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T03:05:18.669Z sha 980effb :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label Jun 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 7, 2026
@849261680
849261680 force-pushed the fix/91122-runtime-channel-turn-alias branch from 9234580 to 2ebe26c Compare June 7, 2026 21:13
@clawsweeper

clawsweeper Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 7, 2026
@849261680
849261680 force-pushed the fix/91122-runtime-channel-turn-alias branch from 2ebe26c to 54890e2 Compare June 7, 2026 21:39
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 7, 2026
@849261680
849261680 force-pushed the fix/91122-runtime-channel-turn-alias branch from 54890e2 to 17f1e84 Compare June 10, 2026 18:31
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 10, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jun 15, 2026
@nissanlogan

Copy link
Copy Markdown

Affected user here — this PR would fix a silent, total inbound break for the @openclaw/bluebubbles channel on the 2026.6.6 core. I filed it as #93165 (closed as a duplicate of #91122); reposting the impact here since this is where the fix lives.

Symptom / repro: @openclaw/bluebubbles 2026.5.7 (npm latest; no 6.x build exists) calls core.channel.turn.run(...) in its inbound path. Since the 2026-06-03 rename of channel.turn → channel.inbound (no compat shim), every inbound message throws TypeError: Cannot read properties of undefined (reading 'run') in the debounce-flush path. The webhook still returns 200, so it fails silently — no reply is generated and conversation-memory (lcm) writes stop — until you notice messages going unanswered (≈2 days in my case). Outbound is unaffected, which masks it further.

Restoring channel.turn as an object-identical alias of channel.inbound (this PR) resolves it with no plugin change required. I'd strongly favor landing the alias over dropping the compat path — there's at least one production iMessage deployment depending on it, and the failure mode is invisible until messages are already being lost. Happy to test a build against a live BlueBubbles/iMessage setup if useful.

@bravostation

Copy link
Copy Markdown
Contributor

Thanks @openclaw-barnacle — we've already migrated to imsg/iMessage (as mentioned in the comment), so the BlueBubbles channel itself isn't the concern.

The point of the +1 was specifically about this PR's plugin-SDK compatibility fix, not about re-adding BlueBubbles to core. The core.channel.turn → core.channel.inbound rename is a breaking plugin-SDK API change that silently breaks any third-party plugin compiled against the pre-2026.5.22 surface — BlueBubbles was just the canary. Per issue #91122 (which this PR closes), @openclaw/feishu and other community plugins hit the same crash.

The alias approach here restores semver-compatible behaviour for third-party plugins published to ClawHub without requiring every plugin author to cut a new release. That's the case for merging this — it's unrelated to whether BlueBubbles is bundled or not.

@openclaw-barnacle

Copy link
Copy Markdown

BlueBubbles is deprecated and no longer ships as a bundled OpenClaw channel. Use iMessage via imsg instead: https://docs.openclaw.ai/channels/imessage. If this needs to stay BlueBubbles-backed, publish it as a third-party plugin on ClawHub instead of adding it back to core.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 23, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 5, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Aug 6, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 16, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 26, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 17, 2026
Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence.
fuller-stack-dev and others added 2 commits September 16, 2026 18:49
Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned.

Closes openclaw#91122

Co-authored-by: Yzx <[email protected]>
@fuller-stack-dev

Copy link
Copy Markdown
Member

@clawsweeper re-review

Current head: 29e455f1907d7fbffd7bd96f57778a2d0ad5e79b.

The existing PR now preserves contributor ancestry and includes the complete five-member same-object alias, exact runtime-bound dispatch, scoped-registration identity, and defined canonical mock-override precedence. Obsolete paths and the unrelated snapshot-test change are removed from the final diff.

The updated PR body records fresh independent review, 67 focused passing tests (plus a 12-test rerun after the typed-fixture correction), and the actual built-runtime runner/dispatch proof through both names. The historical four-helper probe is explicitly not current dispatch acceptance. The real core pipeline used isolated session storage, an injected reply producer and local delivery observer; no live provider/Feishu claim is made.

Exact-head hosted CI and final native preparation are still in progress; this is a review request, not merge/readiness credit.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

fuller-stack-dev and others added 6 commits September 16, 2026 20:18
Consume the reviewed file-preview lazy-English extraction from openclaw#150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from openclaw#150026. Native manifest closure is now also present on main via
openclaw#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
Replace the temporary file-preview extraction with the current-main implementation from openclaw#150491 before merging main. Preserve the channel alias repair and existing contributor ancestry.

Co-authored-by: Peter Steinberger <[email protected]>
Use the current-main Qwen fixture from openclaw#150523 and openclaw#82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M stale Marked as stale due to inactivity status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core/runtime] Backward-compat shim missing: core.channel.turn.* renamed to core.channel.inbound.* on 2026-06-03

4 participants