Repository navigation
fix(channels): record a refused queued request for the owner without replying in the channel - #202252
Merged
Merged
Conversation
Contributor
|
🦞👀 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. |
…replying in the channel - Record a fixed host-authored refusal in the lifecycle error terminal while preserving the denied request failure bookkeeping and leaving access-verification outages unchanged. - Fix a send-after-revocation bug by marking the retained NO_REPLY token with existing silentReply metadata: bare token text reaches reply-dispatcher deliver on main instead of being suppressed. - Downstream outbound normalization deliberately preserves literal NO_REPLY (src/infra/outbound/payloads.test.ts:106-116). Discord forwards the nonempty payload through monitor/message-handler.process.ts:495-557 and monitor/reply-delivery.ts:150-191 to send.outbound.ts:276-287; there is no later token-specific suppression in that path. This is source-traced channel-send behavior, not a claimed live platform send. - Exercise the real runner, dispatcher delivery boundary, lifecycle recorder and chat-history projection: one visible correlated receipt, idempotent replay, fixed notice, no projected nested-cause secret and zero raw/prepared channel delivery calls. - Red on unchanged production: missing errorNotice assertion; a separate baseline run also observed one deliver call with literal NO_REPLY. Final vitest-source selection passes 159 tests across 13 files. - Passed production and test typechecks, touched-file oxlint/oxfmt, lifetime/line-cap/session-identity/test-lines ratchets, docs MDX and docs formatting. Document the channel-silent owner receipt behavior.
obviyus
force-pushed
the
fix/record-revoked-channel-refusal
branch
from
November 20, 2026 05:34
9514e29 to
2db6916
Compare
This was referenced Nov 20, 2026
obviyus
added a commit
that referenced
this pull request
Nov 20, 2026
Problem: several user-facing refusals were honest but had no next step or used internal words: "message action authority is no longer active" for an ended message turn, "approval consumption is no longer available", "approval record is no longer current", "approval run already aborted", the owner notice for a refused queued request (#202252), and "OpenClaw session changed during audit persistence". A Stop during approval preparation could also miss the cancellation sweep, so the user still got an approval prompt for stopped work. Fix (text in existing owners, no new error types and no identity comparisons): "The message turn has ended. Start a new turn to retry."; "This approval is no longer available. Start a new turn to request approval again."; "The approval run was stopped. Start a new turn to request approval again."; the owner notice adds "Review the channel access settings; once access is restored, ask the requester to send the request again."; the system-agent audit fence reads "This OpenClaw chat changed while the change was being saved. Check the current settings before making a new request." Main's two specific corrective notices are unchanged. Approval registration that finds the run already stopped settles the record as cancelled before any prompt is delivered. Proof: Stop-during-preparation regression red on base, green with the fix; affected Slack, Teams, approval and system-agent suites; session-identity ratchet, oxlint, format; clean exact-head local ClawSweeper review; real Gateway run (Stop on a real-model exec: no approval prompt, the run cancelled, the new stopped-run wording returned). Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus
added a commit
that referenced
this pull request
Nov 20, 2026
…rts (#202330) Problem: on Discord, a message queued behind a busy turn was admitted and run after its sender lost access (real Discord on main: config.patch returned 05:15:42.400Z, the queued message was admitted 05:15:43.874Z and replied). Preflight decided access once at receipt and shared run admission reused that decision; the only admission-time renewal was bound for public child-session publication (X). Fix: one Discord access decision (resolveDiscordMessageAccess) serves receipt (receipt policy) and queued-run admission (live policy); preflight's copy is deleted and receipt-time native facts are reused without refetch. childSessionPublication.audience becomes optional: the same memoized renewal runs for ordinary user_request and room_event ingress at the start of the queued turn, before memory-flush or compaction model work; child-session publication still requires audience "public" on a user request. A refused queued turn reaches #202252's existing denied handler (silent on the channel, one owner notice). Started turns are not rechecked. Proof: real queued path (followup-runner, followup-turn-execution, canonical execution, Gateway lifecycle persistence): red on the previous head (no owner notice); green with exactly one persisted owner notice, zero provider requests (including maintenance), zero deliveries, for user_request and room_event; allowed queued messages run once; unavailable verification still warns. 295 tests across 7 files; typecheck, oxlint, format, ratchets; clean exact-head local ClawSweeper review; real Discord run on the exact head (see the PR comment). Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 21, 2026
…replying in the channel (openclaw#202252) Problem: a queued channel request refused at admission because the requester's channel access is gone (ChannelRunAuthorizationError "denied") gave the session owner no reason in the transcript or Control UI, and its "silent" reply was a bare NO_REPLY text without silentReply metadata, so it reached the reply dispatcher's deliver and could be sent to the revoked conversation. Reachable today only through channels that supply a public child-session publication renewal (the X plugin). Fix: the denied branch's existing lifecycle error terminal carries a fixed host-authored errorNotice ("This request was not started because the requester no longer has access to this channel."), and the final payload is marked silent through setReplyPayloadMetadata. The unavailable branch, token, failure bookkeeping and log are unchanged. docs/channels/groups.md documents the owner-visible, channel-silent refusal. Proof: source tier (ocx test). New regression through the real runner and reply dispatcher: one visible receipt with the run id and notice, projected history, replay dedupe, no nested secret in displayed/projected text, zero deliver/deliverPrepared calls; the notice assertion is red on unchanged main, where deliver received bare NO_REPLY. 159 tests across 13 files; typecheck, oxlint, format, ratchets, docs checks; clean exact-head local ClawSweeper review; ocx build --dts plus packed install smoke. A real Discord run on main and head confirmed Discord does not reach this branch (no publication renewal) and found a separate pre-existing queued-admission bug, fixed separately. Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 21, 2026
…#202402) Problem: several user-facing refusals were honest but had no next step or used internal words: "message action authority is no longer active" for an ended message turn, "approval consumption is no longer available", "approval record is no longer current", "approval run already aborted", the owner notice for a refused queued request (openclaw#202252), and "OpenClaw session changed during audit persistence". A Stop during approval preparation could also miss the cancellation sweep, so the user still got an approval prompt for stopped work. Fix (text in existing owners, no new error types and no identity comparisons): "The message turn has ended. Start a new turn to retry."; "This approval is no longer available. Start a new turn to request approval again."; "The approval run was stopped. Start a new turn to request approval again."; the owner notice adds "Review the channel access settings; once access is restored, ask the requester to send the request again."; the system-agent audit fence reads "This OpenClaw chat changed while the change was being saved. Check the current settings before making a new request." Main's two specific corrective notices are unchanged. Approval registration that finds the run already stopped settles the record as cancelled before any prompt is delivered. Proof: Stop-during-preparation regression red on base, green with the fix; affected Slack, Teams, approval and system-agent suites; session-identity ratchet, oxlint, format; clean exact-head local ClawSweeper review; real Gateway run (Stop on a real-model exec: no approval prompt, the run cancelled, the new stopped-run wording returned). Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 21, 2026
…rts (openclaw#202330) Problem: on Discord, a message queued behind a busy turn was admitted and run after its sender lost access (real Discord on main: config.patch returned 05:15:42.400Z, the queued message was admitted 05:15:43.874Z and replied). Preflight decided access once at receipt and shared run admission reused that decision; the only admission-time renewal was bound for public child-session publication (X). Fix: one Discord access decision (resolveDiscordMessageAccess) serves receipt (receipt policy) and queued-run admission (live policy); preflight's copy is deleted and receipt-time native facts are reused without refetch. childSessionPublication.audience becomes optional: the same memoized renewal runs for ordinary user_request and room_event ingress at the start of the queued turn, before memory-flush or compaction model work; child-session publication still requires audience "public" on a user request. A refused queued turn reaches openclaw#202252's existing denied handler (silent on the channel, one owner notice). Started turns are not rechecked. Proof: real queued path (followup-runner, followup-turn-execution, canonical execution, Gateway lifecycle persistence): red on the previous head (no owner notice); green with exactly one persisted owner notice, zero provider requests (including maintenance), zero deliveries, for user_request and room_event; allowed queued messages run once; unavailable verification still warns. 295 tests across 7 files; typecheck, oxlint, format, ratchets; clean exact-head local ClawSweeper review; real Discord run on the exact head (see the PR comment). Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…replying in the channel (#202252) Problem: a queued channel request refused at admission because the requester's channel access is gone (ChannelRunAuthorizationError "denied") gave the session owner no reason in the transcript or Control UI, and its "silent" reply was a bare NO_REPLY text without silentReply metadata, so it reached the reply dispatcher's deliver and could be sent to the revoked conversation. Reachable today only through channels that supply a public child-session publication renewal (the X plugin). Fix: the denied branch's existing lifecycle error terminal carries a fixed host-authored errorNotice ("This request was not started because the requester no longer has access to this channel."), and the final payload is marked silent through setReplyPayloadMetadata. The unavailable branch, token, failure bookkeeping and log are unchanged. docs/channels/groups.md documents the owner-visible, channel-silent refusal. Proof: source tier (ocx test). New regression through the real runner and reply dispatcher: one visible receipt with the run id and notice, projected history, replay dedupe, no nested secret in displayed/projected text, zero deliver/deliverPrepared calls; the notice assertion is red on unchanged main, where deliver received bare NO_REPLY. 159 tests across 13 files; typecheck, oxlint, format, ratchets, docs checks; clean exact-head local ClawSweeper review; ocx build --dts plus packed install smoke. A real Discord run on main and head confirmed Discord does not reach this branch (no publication renewal) and found a separate pre-existing queued-admission bug, fixed separately. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 3e7c305) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 3652c722ed8475e1f6c9ace6d7159f61fa844bfc)
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 24, 2026
…rts (#202330) Problem: on Discord, a message queued behind a busy turn was admitted and run after its sender lost access (real Discord on main: config.patch returned 05:15:42.400Z, the queued message was admitted 05:15:43.874Z and replied). Preflight decided access once at receipt and shared run admission reused that decision; the only admission-time renewal was bound for public child-session publication (X). Fix: one Discord access decision (resolveDiscordMessageAccess) serves receipt (receipt policy) and queued-run admission (live policy); preflight's copy is deleted and receipt-time native facts are reused without refetch. childSessionPublication.audience becomes optional: the same memoized renewal runs for ordinary user_request and room_event ingress at the start of the queued turn, before memory-flush or compaction model work; child-session publication still requires audience "public" on a user request. A refused queued turn reaches #202252's existing denied handler (silent on the channel, one owner notice). Started turns are not rechecked. Proof: real queued path (followup-runner, followup-turn-execution, canonical execution, Gateway lifecycle persistence): red on the previous head (no owner notice); green with exactly one persisted owner notice, zero provider requests (including maintenance), zero deliveries, for user_request and room_event; allowed queued messages run once; unavailable verification still warns. 295 tests across 7 files; typecheck, oxlint, format, ratchets; clean exact-head local ClawSweeper review; real Discord run on the exact head (see the PR comment). Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 5148804) Gap-sweep intake (Dallin, 2026-11-24): ledger-high/P0-P1 fix not yet on 2026.11.10. Clean apply. Later main mentions of #202330: 656de08 test(discord): stop pinning refused-followup notice wording (#202471);. Co-authored-by: RomneyDa <[email protected]>
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.
What problem this solves
When a queued channel request is refused at admission because the requester's channel access is gone (
ChannelRunAuthorizationErrorkinddenied), the runner meant to stay silent on the channel, but:errorNotice, so the transcript and Control UI showed only a generic failure.NO_REPLYtext withoutsilentReplymetadata.normalizeReplyPayloadsuppresses only payloads with that metadata (normalize-reply.ts:94-98), and outbound normalization deliberately keeps literalNO_REPLYtext (infra/outbound/payloads.test.ts:106-116). So the payload reached the reply dispatcher'sdeliver. On a channel that reaches this branch, the literal text could be sent to the conversation whose access had just been revoked.Reach: this branch fires only when a channel supplies a public child-session publication renewal (
child-session-publication.ts:29-39, bound inhost-context-builder.ts:94-126). Today that is only the X plugin (extensions/x/src/ingress.ts). Discord, for example, never reaches it (see Evidence).Change
src/auto-reply/reply/agent-runner-error-handler.ts, denied branch only:errorNotice: "This request was not started because the requester no longer has access to this channel." It contains no cause text, requester text, channel ids or policy details.setReplyPayloadMetadata(..., { silentReply: true }).unavailablebranch, which still replies "could not verify current channel access".Docs:
docs/channels/groups.mdstates that such a refusal is silent on the channel but recorded for the owner.Evidence
Proof tier: source (
ocx test).agent-runner-execution-terminal-failures.test.ts, through the real runner and reply dispatcher:run-failed-before-replyreceipt with the run id and the notice;deliver/deliverPreparedcalls.On unchanged main, the notice assertion fails and
deliverreceives bareNO_REPLYonce.userswithconfig.patch. On both revisions, a fresh message from the removed sender was ignored, confirming the revocation. Message 2 still ran and replied normally, and this branch was not reached, because Discord supplies no publication renewal. So there is no live proof of this branch; the X plugin has no live proof route here.message-handler.preflight.ts:581-605). It will be fixed in its own PR.Production +9 −2 lines, test +76, docs +2.