Skip to content

fix(feishu): preserve webhooks on supported 9.6 hosts - #160455

Merged
steipete merged 3 commits into
mainfrom
codex/feishu-webhook-host-floor-20260928
Sep 28, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/feishu-webhook-host-floor-20260928

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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 successor 1dc0415bc9bd9c9ffb4abeda066d6020bf587083 changes 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 to legacyWebhook, 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.0 version 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.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 28, 2026 12:45
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: feishu Channel integration: feishu size: M labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 5:31 PM ET / 21:31 UTC (Revision 6).

ClawSweeper review

What this changes

The 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 provenance

Possible 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
Reviewed head: 5b373051bf2eb63e0c06fac16cb672e8c493796f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The bounded compatibility patch has strong installed-update and HTTP behavior evidence, and the prior actionable fixture finding is resolved.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed Feishu listener path is covered by a reported installed core-first update and real HTTP requests against a packaged local setup: settings and port survived migration, signed/unsigned/wrong-path requests returned 200/401/404, and shutdown released the listener. The provider endpoint was synthetic loopback rather than live Feishu; no stored-data contract changes in this PR.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed Feishu listener path is covered by a reported installed core-first update and real HTTP requests against a packaged local setup: settings and port survived migration, signed/unsigned/wrong-path requests returned 200/401/404, and shutdown released the listener. The provider endpoint was synthetic loopback rather than live Feishu; no stored-data contract changes in this PR.
Evidence reviewed 10 items Current-main gap: Current main registers the legacy endpoint through the Gateway route and has no older-host listener fallback in this path.
Published host contract: The published 2026.9.6 webhook SDK provides route registration and guards but does not export getWebhookLegacyListener, the capability used by current main.
Declared compatibility floor: Feishu declares OpenClaw and Plugin API compatibility beginning at 2026.9.6.
Findings None None.
Security None None.

How this fits together

Feishu 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +103, Tests +217, Docs +12. Total +332 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 113 10 +103
Tests 1 217 0 +217
Docs 1 15 3 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 345 13 +332

Review metrics

Metric Value Why it matters
Production and test growth production +113/-10 lines; tests +217 lines The private listener restores the declared older-host contract, with focused HTTP and lifecycle coverage.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed Feishu listener path is covered by a reported installed core-first update and real HTTP requests against a packaged local setup: settings and port survived migration, signed/unsigned/wrong-path requests returned 200/401/404, and shutdown released the listener. The provider endpoint was synthetic loopback rather than live Feishu; no stored-data contract changes in this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: A supported Feishu webhook host can report readiness while its configured callback endpoint refuses connections.
  • merge-risk: 🚨 compatibility: The patch selects listener ownership by host capability, while installations with obsolete settings need the documented core-first update sequence.
  • merge-risk: 🚨 message-delivery: Listener selection and shutdown directly determine whether Feishu callbacks reach the signature verifier and event dispatcher.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed Feishu listener path is covered by a reported installed core-first update and real HTTP requests against a packaged local setup: settings and port survived migration, signed/unsigned/wrong-path requests returned 200/401/404, and shutdown released the listener. The provider endpoint was synthetic loopback rather than live Feishu; no stored-data contract changes in this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Feishu listener path is covered by a reported installed core-first update and real HTTP requests against a packaged local setup: settings and port survived migration, signed/unsigned/wrong-path requests returned 200/401/404, and shutdown released the listener. The provider endpoint was synthetic loopback rather than live Feishu; no stored-data contract changes in this PR.

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)
  • Alix-007: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Agustin Rivera: 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 (5 earlier review cycles)
  • reviewed 2026-09-28T12:56:19.047Z sha 0fdb233 :: blocked before merge. :: none
  • reviewed 2026-09-28T13:04:13.912Z sha 0fdb233 :: blocked before merge. :: [P2] Hold a test port claim until the Feishu listener binds
  • reviewed 2026-09-28T13:55:58.733Z sha 0fdb233 :: blocked before merge. :: [P2] Retain the test port claim through monitor shutdown
  • reviewed 2026-09-28T15:31:35.928Z sha 0fdb233 :: blocked before merge. :: [P2] Retain the test port claim through monitor shutdown
  • reviewed 2026-09-28T21:02:58.225Z sha 04bdcbf :: blocked before merge. :: [P2] Retain the test port claim through monitor shutdown

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added 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. and removed 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. labels Sep 28, 2026
@steipete
steipete merged commit dba4c4f into main Sep 28, 2026
110 of 111 checks passed
@steipete
steipete deleted the codex/feishu-webhook-host-floor-20260928 branch September 28, 2026 21:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

MarMarLabs added a commit to MarMarLabs/openclaw that referenced this pull request Sep 29, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
* fix(feishu): preserve webhooks on supported 9.6 hosts

* docs(feishu): clarify legacy webhook update order

* test(feishu): retain webhook fixture port claims
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant