fix(inbound): keep polling while turns are active - #226
Closed
NewFuture wants to merge 15 commits into
Closed
Conversation
Persist inbound batches before advancing the cursor, then transfer durable ownership when OpenClaw starts or queues the turn. Keep the existing serial fallback when durable ingress is unavailable and refresh context tokens at actual delivery time. Refs Tencent#201 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass the account ID through local slash-command sends so replies resolve the newest context token admitted from the current polling batch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert slash reply accountId token-refresh wiring and restore devDependency openclaw version to avoid widening this fix PR scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rediscover approvals that were released by another manager and keep same-session lanes blocked while any other owner still holds a live claim, with focused regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert token freshness-related messaging changes and tests while keeping durable ingress, approval lane prioritization, and lifecycle handoff behavior for midrun steering and approvals. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
NewFuture
force-pushed
the
fix/durable-inbound-polling
branch
from
July 12, 2026 16:30
86e6287 to
3ccf15b
Compare
Restore standard channel registration and message dispatch so the fix no longer depends on trusted host-only queue APIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Persist each polled batch before advancing its cursor, then dispatch asynchronously through the existing core path so steer remains core-owned and plugin approvals are not blocked by ordinary turns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Share admission, retry, and processed state across overlapping monitor instances so hot reload preserves backoff and finalizes successful records without replaying Agent work. Keep recent tombstones for the full retention window and retain natural message ordering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Release the ordered inbox lane only after beta.6+ adopts or queues a turn, retain queued follow-ups until completion, and keep older hosts on the serial compatibility path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass the durable admission lifecycle to plugin approval messages on supported hosts so they can reach core command handling before the pending approval expires. Core remains responsible for authorization and resolution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep inbox retries ordered and idempotent across restarts by persisting admission order and deriving a stable MessageSid. Narrow approval matching, retain tombstones from completion time, and remove unrelated dependency and cursor changes from the PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep polling while OpenClaw owns an active turn, serialize ordinary preprocessing only until core admission, and give plugin approvals an independent lane. Remove the plugin-local durable inbox and version gate so queue and steer semantics remain in core. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the current Weixin message text for CommandBody while retaining quoted context in Body, so reply-style approval commands remain visible to OpenClaw core. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the enriched quoted body as BodyForAgent while CommandBody carries only the current message text for slash-command parsing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip not-yet-started inbound work after monitor abort, and keep reply progress open until Core completes a queued follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Closing this draft so the validated three-file fix can be resubmitted from a clean branch with a single focused commit, following the repository conventional commit and PR style. |
Author
|
Replaced by #228, submitted from a clean branch with one focused commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #201
Problem
The Weixin monitor awaited
processOneMessageinside the long-poll loop. A long OpenClaw turn therefore stopped later polling, so ordinary mid-run messages and/approve plugin:commands could not reach core until the active reply finished.Minimal fix
getUpdatesresponse instead of awaiting full message processing./approve plugin:an independent in-memory lane so approval commands are not blocked by an active ordinary turn./approve plugin:entered while replying to a quoted message as a command while retaining the quote in the agent-visible body.Scope
The final diff contains three files:
src/monitor/monitor.tssrc/monitor/monitor.test.tssrc/messaging/process-message.tsIt intentionally has:
package.jsonchangeValidation
4a32aaf: no new findingsLive deployment
4a32aafto CT101 on the existing OpenClaw2026.7.1-beta.6; OpenClaw was not upgraded.22b6b62ce2697ee2e268a26f50de8bf43317e89cedc15e253f93aeccc426c76f.inbound-inbox.jsimplementation is absent from the installed plugin.plugin.approval.listworks and is empty; no inbound failure markers were observed./home/node/.openclaw/backups/lifecycle-fix-20260716T021812Z.