fix(feishu): wire setup runtime setter#89689
Conversation
|
Codex review: passed. Reviewed June 3, 2026, 7:39 AM ET / 11:39 UTC. Summary PR surface: Source +7, Tests +11. Total +18 across 3 files. Reproducibility: yes. source inspection gives a high-confidence path: current main has no Feishu setup-entry runtime descriptor while monitorSingleAccount falls back to getFeishuRuntime().channel. I did not run a live Feishu tenant repro. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land the narrow setup-entry runtime wiring with its targeted regression test; a broader loader-level test would be useful follow-up coverage but is not required for this patch. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: current main has no Feishu setup-entry runtime descriptor while monitorSingleAccount falls back to getFeishuRuntime().channel. I did not run a live Feishu tenant repro. Is this the best way to solve the issue? Yes, this is the best fix shape: it uses the existing bundled setup-entry runtime contract and matches sibling Matrix/Slack patterns without loading the broad Feishu runtime API during setup. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against e5e6cf04a2f4. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +7, Tests +11. Total +18 across 3 files. 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
|
|
This looks like a good narrow fix. One extra test that could make it even stronger: exercise the actual setup-loader path (the place that consumes The current test proves the entry exposes the setter and that |
|
@clawsweeper automerge |
|
🦞🔧 Source: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix. Automerge progress:
|
|
ClawSweeper 🐠 reef update Thanks for the work on this. ClawSweeper could not push to this branch with the permissions available, so it opened a narrow replacement PR to keep the fix swimming forward without losing the contributor trail. not your fault, just GitHub branch-permission tides. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against cbad0c6. |
Summary
setFeishuRuntimefrom the Feishu setup-only entryReal behavior proof
Behavior or issue addressed: Feishu setup-only / setup-runtime registration did not initialize the Feishu runtime store. The monitor path can then reach
getFeishuRuntime().channelwithout an initialized runtime, causing inbound dispatch for Feishu messages to fail beforechannel.inbound.run(...)can run.Real environment tested: User-designated remote test machine, fresh shallow
openclaw/openclawcheckout atorigin/mainplus this patch, Node v22.22.2, pnpm v11.2.2 via corepack.Exact steps or command run after this patch:
corepack pnpm install --frozen-lockfile --ignore-scriptsnode --import tsx .tmp-check-feishu-runtime.mjscorepack pnpm exec vitest run extensions/feishu/setup-entry.test.ts --reporter=dotThe smoke script imported the patched Feishu setup entry, called
setupEntry.setChannelRuntime(runtime), then importedgetFeishuRuntime()and verified that the stored runtime is the same object and thatchannel.inbound.run()is reachable.Evidence after fix: Terminal output from the user-designated remote test machine:
Targeted regression test output from the same remote machine:
Observed result after fix: The Feishu setup-only entry now exposes and applies the runtime setter. After setup-only registration calls the setter,
getFeishuRuntime()returns the active runtime andgetFeishuRuntime().channel.inbound.runis available instead of undefined.What was not tested: A live Feishu/Lark tenant message was not sent; the remote verification exercised the runtime-registration path that caused the reported dispatch crash, plus the targeted regression test.
Supplemental verification
git diff --checkgit verify-commit HEADCloses #88024