Repository navigation
fix(feishu): preserve webhooks on supported 9.6 hosts - #160455
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 5:31 PM ET / 21:31 UTC (Revision 6). ClawSweeper reviewWhat this changesThe Feishu plugin adds a private listener for legacy webhook endpoints on 2026.9.6 hosts, tests callback and shutdown behavior, and documents the upgrade order. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR still has a distinct purpose: current main relies on a Gateway listener capability absent from the supported 2026.9.6 host. The prior fixture finding is fixed, the companion update repair has merged, and the reported installed-update proof covers the relevant behavior. Priority: P1 Review scores
Verification
How this fits togetherFeishu callbacks enter OpenClaw through an HTTP listener and pass through path and signature checks before event dispatch. Newer hosts own legacy listeners in the Gateway; this change lets the Feishu plugin serve that endpoint on supported older hosts. flowchart LR
A[Feishu callback] --> B{Host capability}
B -->|Newer host| C[Gateway listener]
B -->|2026.9.6 host| D[Feishu compatibility listener]
C --> E[Path and signature checks]
D --> E
E --> F[Feishu event dispatch]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +103, Tests +217, Docs +12. Total +332 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the compatibility listener private to Feishu until the declared host floor includes Gateway-owned listeners, and coordinate its package release with a core release containing the merged plugin-update migration repair. Do we have a high-confidence way to reproduce the issue? Yes, from source: use a published 2026.9.6 host with a configured legacy Feishu webhook endpoint and the current-main plugin, then send a callback to that endpoint. The missing host SDK capability and current-main registration path explain the reported connection refusal; this read-only review did not rerun it. Is this the best way to solve the issue? Yes. A private older-host listener reuses Feishu's existing path, signature, and dispatch handler while leaving newer Gateway-owned listeners in place. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a46cde88785d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Merged via squash.
|
342 upstream commits, including the Slack huddles plugin (openclaw#159879), scoped Slack plugin reviewers (openclaw#159525) and two Feishu webhook changes (openclaw#160455, openclaw#160846) in files this branch does not touch. No file outside the generated set changed on both sides. Two conflicts, both generated: docs/.generated/config-baseline.counts.json and docs/.generated/config-baseline.sha256. openclaw#159879 takes plugin from 4374 to 4431 and openclaw#159525 takes core from 2464 to 2475. This branch keeps channel at 3788. Both files came from upstream and were regenerated. build:docker ran in a separate detached checkout of this commit outside the nested node_modules install. Regenerating there changed those two files and nothing else, giving the predicted counts, the upstream core and plugin hashes, this branch's channel hash and a new combined hash. The three generated-file checks pass there. Upstream deleted 102 test files in this range. None of them were added or changed by this branch. Feishu: 107 files and 1859 tests in the extension project, 17 files and 312 tests in the database-workers project. The forwarder test and the routing guards pass, 430 tests after upstream pruned test-projects.test.ts in this range. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 43 changed code files all pass.
* fix(feishu): preserve webhooks on supported 9.6 hosts * docs(feishu): clarify legacy webhook update order * test(feishu): retain webhook fixture port claims
Related: #158861. Companion core migration repair #160682 is landed as
216798c496a1e02782d7c32e21a11626c024ad37.What Problem This Solves
Fixes Feishu webhook startup on supported OpenClaw 2026.9.6 hosts, which do not export the newer Gateway-owned legacy-listener capability. The original registered monitor became ready without opening the configured endpoint; the regression failed with
ECONNREFUSED.User Impact
Feishu can serve its configured legacy endpoint on the supported runtime floor. Older hosts need distinct endpoints for separate accounts, as in the shipped 9.6 plugin; current hosts retain Gateway-owned shared listeners.
For an installation still using
webhookHost/webhookPort, update core to a release containing #160682 before explicitly updating a pinned Feishu package. The core updater preserves explicit plugin pins. The immutable published 9.6 plugin installer rejects the replacement schema before it can run its Doctor transform; a refused plugin-only update preserves the prior installation and settings. This distinction does not raise the runtime host floor.Why This Change Was Made
Keep the older-host listener adapter private to Feishu and pass requests through the existing signature validation and dispatch handler. Shutdown stops new socket admission, drains already-authenticated responses, then closes and joins the listener. No public SDK export, configuration option, or async session-reader dependency is introduced.
Evidence
All 56 listener, routing, signature, and durable-admission cases pass, including occupied-port refusal, shutdown drain, rebinding, and capable-host ownership. The canonical Feishu package imports its public entries and actual monitor chunk against the published 2026.9.6 SDK. Built HTTP proof covers unsigned rejection, signed challenge, wrong path, route removal, restart, held-body shutdown, and rebinding. Extension production/test types, lint, formatting, plugin boundaries, export scans, selected guards, and independent P0–P2 review pass.
Actual installed update and automatic migration passed. A fresh, genuine published 9.6 installation used its unchanged installed updater to install the reviewed core migration candidate
8e9972a572694ffd294c6a291755c82928595a90(the successor1dc0415bc9bd9c9ffb4abeda066d6020bf587083changes only six test-fixture lines). Core update completed successfully in 950.423 s, retained the explicit Feishu 9.6 pin and original port 57597, and recorded a real pending migration row. The candidate CLI then updated the explicitly requested Feishu version, automatically normalized the host/port tolegacyWebhook, preserved all other Feishu settings, and completed that same historical row without changing its report. No manual Doctor command ran. Normal Gateway startup served signed challenge 200, unsigned request 401, and wrong path 404 at port 57597 in 53.847 s; shutdown completed cleanly in 3.749 s. All task-owned processes joined, and all three fixture ports were rebound and closed.This receiving cell uses a task-only
2026.9.99-first-hop.0version derived through the maintained fixture mechanism, not a published release. Only package/build version metadata and the matching content-inventory entry changed: all other bytes, modes, and symlinks across 13,386 core members and 49 Feishu members stayed identical. The derived root passed normal package validation; all 49 installed Feishu files matched the validated fixture. The core full build passed in 19m 30.4s and canonical packing/validation in 211.346 s. The provider identity endpoint was synthetic loopback HTTPS; this does not claim live Feishu traffic or model inference.The receiving record retains the validation-window/disposal warnings, unavailable synthetic future Codex cohort with its prior version retained, synthetic plaintext-config advisory, and intentional isolated-service skip. Normal Gateway startup also logged a separate Codex catalog initialization timeout; no model/catalog health claim is made. Feishu behavior and cleanup passed independently, with no integrity drift or native-manifest hardlink warning.
The unchanged listener production head had successful CI and Package Acceptance. Its six new cases took 41.19 s of serial Vitest wall time (55.39 s with wrapper); their CI test bodies totaled 147 ms. The containing 719-test shard took 98.86 s and full job 187 s; those shared times are not attributed solely to this file. The documentation-only follow-up passed CI and its docs checks/review. The final fixture correction retains the existing cooperative port claim until all monitors have settled and cleanup has completed, closing the reviewed probe-to-bind gap without changing assertions or deadlines. Its six host-floor cases passed in 43.16 s and 25 signed-webhook siblings in 49.50 s (98.07 s including the wrapper); fresh P0–P2 review is clean. Current-head enforced checks remain separate.
Retained earlier failures and recovery evidence
The first changed-check run found an implicit-return Promise executor in the new fixture; it was corrected without changing assertions. Earlier installed proofs retained the direct plugin-only schema rejection, a same-version integrity refusal, and the original core-first lifecycle defect that selected port 3000 instead of 57597. Manual Doctor plus restart repaired that earlier state, proving the existing transform, but was never claimed as automatic completion. The actual automatic receiving cell above closes that gap through #160682. The separately observed native dependency-manifest hardlink defect was fixed canonically by #160519; its exact old-driver evidence remains retained.