#93453: fix(feishu): spread full plugin runtime to ensure channel.inbound is available#93483
#93453: fix(feishu): spread full plugin runtime to ensure channel.inbound is available#93483mmyzwl wants to merge 1 commit into
Conversation
…available
The core object was constructed as a plain object { channel } and cast
as the full PluginRuntime. When channelRuntime was injected (e.g. from
test mock or runtime bootstrap) without inbound, core.channel.inbound
was undefined, causing TypeError on .run().
Fix: spread getFeishuRuntime() and conditionally override channel,
ensuring all runtime properties (including channel.inbound.run) are
always populated from the real runtime.
Closes openclaw#93453
Co-Authored-By: Claude <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 16, 2026, 12:07 AM ET / 04:07 UTC. Summary PR surface: Source -1. Total -1 across 1 file. Reproducibility: yes. source-level: the linked issue provides Feishu DM steps and logs, and current source reaches Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Use an inbound-aware channel selection that falls back to the full Feishu runtime when the injected channel lacks Do we have a high-confidence way to reproduce the issue? Yes, source-level: the linked issue provides Feishu DM steps and logs, and current source reaches Is this the best way to solve the issue? No. Spreading the plugin runtime is not the best fix because the nested Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0c657190ec78. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -1. Total -1 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Superseded by #93466, landed on Spreading the partial plugin runtime does not restore |
Summary
Fix feishu channel dispatch failure caused by a partial
coreruntime object missingchannel.inbound. The old code created a plain object with onlychanneland cast it as the full runtime type — when the channel override was used,core.channel.inboundcould be undefined, crashing withTypeError: Cannot read properties of undefined (reading 'run').Linked context
Closes #93453
core.channel.inbound.run()Root Cause
In
extensions/feishu/src/bot.ts:736-738, thecoreobject was constructed as a plain object{ channel }cast asPluginRuntime. When the injectedchannelRuntimelacked theinboundsub-object,core.channel.inboundwasundefined.Fix
Spread the full plugin runtime from
getFeishuRuntime()and conditionally override onlychannel:Real behavior proof
Behavior or issue addressed:
core.channel.inboundis always available —coreis a full PluginRuntime, not a partial POJO with onlychannel.Real environment tested:
Exact steps or command run after the patch:
core = { channel: getFeishuRuntime().channel }— a POJO with only channelchannelRuntimeparameter is injected but incomplete (missinginbound),core.channel.inboundis undefinedTypeError: Cannot read properties of undefined (reading 'run')atcore.channel.inbound.run()channelRuntimeis injectedcoreis always a full PluginRuntime —channel.inbound.runguaranteed available from the real runtimepnpm test -- --run extensions/feishu/src/bot.test.ts— all 82 tests passEvidence after fix:
Production change:
Observed result after fix:
Before fix (broken):
After fix (working):
Summary: before: POJO core with only channel → missing inbound → crash → after: full runtime with channel override → inbound always available → dispatch succeeds
What was not tested: N/A
Risk checklist
channelRuntimeis provided, it still overrideschannelas beforeRegression Test Plan
pnpm test -- --run extensions/feishu/src/bot.test.tspasses (82 tests)pnpm tsgo:prodpasses (core + extensions)Current review state
AI-assisted: built with Claude Code