Repository navigation
fix(channels): keep replies working after hot config reloads - #147001
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 13, 2026, 9:29 AM ET / 13:29 UTC (Revision 6). ClawSweeper reviewWhat this changesMakes channel reply dispatch use the Gateway’s committed model configuration after hot reloads, preserves the legacy SDK argument, and adds regression coverage and documentation. Merge readiness✅ Ready for maintainer review Keep open as a useful, supported fix: current main still contains the low-level dispatch gap. No actionable patch defects remain, and the recorded Gateway proof covers the changed boundary. Priority: P1 Review scores
Verification
How this fits togetherChannel plugins pass incoming messages and captured configuration into shared reply dispatch. Dispatch selects the prepared model runtime before running the agent and delivering its reply. flowchart TD
A[Incoming channel message] --> B[Monitor with captured config]
B --> C[Shared reply dispatch]
D[Gateway config publication] --> E[Committed model runtime]
C --> E
E --> F[Agent turn]
F --> G[Channel reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +161, Docs +9. Total +171 across 10 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Use one committed publication for model admission while preserving exact catalog isolation, explicit per-turn overrides, and channel-owned ingress durability. Do we have a high-confidence way to reproduce the issue? Yes: source identifies the retained-config low-level dispatch path, and the recorded baseline regression fails after publication with the reported error. This read-only review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes: extending the existing publication owner to low-level dispatch repairs the missing wiring without weakening catalog equality or adding a second retry or runtime owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c07d397c7970. LabelsLabel 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.
|
* commit '0ac8a700e43efceef73d92fe8e50b185819e38ad': (27 commits) test(acpx): prove targeted turn cancellation (#137049) fix(ci): honor realtime meeting live-test opt-in (#147044) improve: reduce heartbeat enrollment work for large fleets (#147055) fix(gateway): install despite stale Linux session bus addresses (#146569) chore(i18n): refresh native locales (#147025) fix: avoid Gateway reinstalls when macOS service inspection is inconclusive (#146880) fix(pairing): QR setup rejects trusted-proxy gateways without a shared secret (#147036) fix(update): bound activation and accept slow Windows identity reads (#147019) perf(accounts): avoid materializing avatars for owner checks (#147032) improve(status): report external and ArrayBuffer memory (#141902) fix(update): preserve linked plugins during post-core sync (#147009) fix(channels): keep replies working after hot config reloads (#147001) refactor(gateway): defer worker transcript runtime loading (#143495) improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021) fix(test): avoid settings lock writer startup timeouts (#147029) fix(update): correct backup guidance and cover incident regressions (#147023) refactor(gateway): share connection lifecycle across transports (#145950) refactor(telegram): share HTML text escaping (#146936) perf(build): reduce disk use in UI performance checks (#146687) refactor(memory-wiki): share freshness result construction (#146935) ... # Conflicts: # src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts
…w#147001) Keep inbound channel replies working after hot config reloads when a long-lived plugin monitor retains its startup config. Shared reply dispatch now always selects the Gateway's committed model-runtime publication, preserving exact catalog isolation and publication waits without restarting the monitor. The shipped optional usePublishedModelRuntime SDK argument remains accepted, deprecated, and ignored until the next SDK major. Standalone dispatch and explicit per-turn overrides retain their existing contracts; transport durability remains owned by channel ingress. The low-level regression delivers before reload, fails on the original code after reload with PreparedModelCatalogConfigReplacedError, and passes after the fix. Focused dispatch and sibling tests, standalone runner fixtures, build, and changed-file checks passed. A synthetic Gateway/channel/HTTP-provider harness delivered two replies around reload with the same Gateway process and monitor; real WeChat and Windows coverage remains unproven. Fixes openclaw#146854 Related: openclaw#145563 Reported by @sunhsiao (openclaw#146854). Reproduction discussion and regression shape from @Lidashi1025 and @BronyaZaychik0328 (openclaw#145563).
Fixes #146854
Related: #145563
What Problem This Solves
Fixes inbound channel replies failing with
PreparedModelCatalogConfigReplacedErrorafter a hot config reload when a long-lived plugin monitor retains its startup config. For a transport whose cursor already advanced without durable ingress, that failure loses the message before a model turn runs.User Impact
Channel replies continue under the committed config after model-neutral hot reloads, including
tools.*and internal-hook changes, without restarting the Gateway or channel monitor.Reported by @sunhsiao (#146854); reproduction discussion and regression shape from @Lidashi1025 and @BronyaZaychik0328 (#145563).
Why This Change Was Made
The high-level inbound wrapper opted into the existing prepared reply publication owner, but the registered low-level plugin dispatcher did not. Shared dispatch now always selects that owner, which waits for an in-progress publication and carries its config, catalog, directories, and plugin generation together. Exact catalog isolation remains enforced.
The opt-in branch and internal flag arguments are removed. The shipped optional
usePublishedModelRuntimeSDK argument remains accepted, deprecated and ignored, until the next SDK major. Standalone dispatch and explicit per-turn config overrides retain their existing contracts. Production LOC delta: -1; no new runtime owner, retry loop, configuration option, dependency, or storage change.Heartbeat already reaches the shared published-runtime path.
/modelsalready projects the published owner's config; Telegram callback failures already reach its retryable ingress drain. Focused sibling coverage includes publication waits, thinking-catalog isolation, model browsing recovery, and dispatch lifecycle/delivery.Evidence
Exact-head CI passed: run 34758958274 completed successfully for
2cc2a214844321a81e6810693edb4fbeaeeec6ee; the native CI watcher returnedGREEN. The refreshed merge ref was verified against current main and includes the required baseline repair. The earlier run failed only the known baseline reclamation-memory test. One tree-identical refresh commit resolved the prior PR API/branch synchronization lag.ce6718fd82a: four adapted [Bug]: WeChat channel reply dispatch fails withPreparedModelCatalogConfigReplacedError#145563 mechanism tests pass while preserving the expected exact-config rejections. The new low-level dispatch regression delivers before reload, then fails after reload withPreparedModelCatalogConfigReplacedError(1 failed, 4 passed).undefined); all 32 source-delivery and compaction tests pass with their original assertions.tools.exec.mode: deny → auto; same Gateway PID, same monitor identity, one monitor start, retained config A, committed config B, no restart requested.This is synthetic Gateway/channel/provider proof, not a real WeChat service or Windows-platform run. Transport durability still belongs to the existing ingress owner; this change prevents the reproduced stale-config dispatch rejection without inventing a queue for SDK callers that do not use durable ingress.
ClawSweeper review
The completed review at
2cc2a214844321a81e6810693edb4fbeaeeec6eefound no actionable patch defects, confirmed the head mismatch was resolved, and accepted the ephemeral Gateway/channel/mock-provider proof. No findings required changes or skips. Real WeChat and Windows coverage remains a gap.