Skip to content

fix(queue): end queued input only on a recorded cause - #200433

Merged
obviyus merged 5 commits into
mainfrom
fix/queued-input-recorded-cause
Nov 17, 2026
Merged

obviyus merged 5 commits into
mainfrom
fix/queued-input-recorded-cause

Conversation

@obviyus

@obviyus obviyus commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A message queued while a turn runs could be dropped because a check failed, not because anything ended it.

The custody contract (docs/concepts/session-controller.md) lets an accepted input end only as consumed, deliberately dropped, cancelled or interrupted, and requires every accepted input to stay accounted for. The access-policy contract (docs/plugins/sdk-runtime/gateway-and-nodes.md) says an owner aborts its signal when a source is revoked, and that an internal assertion error "refuses the operation without revoking the person or their admitted runs".

The code did the opposite in two places:

  • The authority owners latched a revocation they found inside assertCurrent() without aborting their signal (operator-run-authority.ts, admitted-run-context.ts). Revocations found by event rechecks were recorded; ones found by a direct check were not.
  • Seven queue and mailbox readers ended custody when assertCurrent() threw: isFollowupOperatorAuthorityCurrent and its four callers (followup runner, drain retry filter, stalled-turn handoff, goal return), mailbox claim release, early injection and steer admission, reserveSteerCandidate, and the channel steer caller. Each re-derived the owner's decision from the thrown error with its own rule.

On a real Gateway with an access-policy plugin, a 30 s policy outage while a message was queued dropped it as withheld; it never ran after the policy returned.

Fix

  • Owners record revocation: assertCurrent in operator-run-authority.ts uses its existing revoke(), and createAdmittedRunOperatorAuthority aborts a local revocation signal, composed with the upstream one, instead of keeping a private latch. A policy outage stays non-terminal.
  • Queue and mailbox custody end only on recorded facts: the input's abort signal (which already includes the source authority's signal), retirement, cancellation, or consumption. A failed check now only refuses that attempt; the input stays queued and the drain retries it.
  • Deleted isFollowupOperatorAuthorityCurrent and every inferred custody end listed above. The deletions in drain.ts, agent-runner-execute.ts and goal-continuation-return.ts match refactor(subagents): restore completion authority from saved origin facts #200231.
  • Notices survive the owner's new revocation signal. The stalled-turn handoff refuses a continuation while the source authority is aborted or refusing, without ending custody, so the original dispatch keeps its fallback notice. runReplyAgent still returns a prepared preflight failure notice when the operation was aborted by the source authority's own revocation; an explicit Stop, supersession or restart stays silent.

No new helper, flag, retry, backoff, schema or config. Production code: net −43 lines.

Replaces #200413, which taught two of these readers a wider "temporary" rule; that rule disagreed with the owner on remote-ingress "owner changed" errors and would have retried such an input forever.

User impact

  • A message queued during a temporary access-policy outage runs after the policy recovers.
  • An internal policy error no longer silently drops a queued message.
  • Revocation, Stop, delete and graceful restart behave as before: revoked, stopped and deleted messages are cancelled with zero model calls.

Affected installs: those using an access-policy plugin whose evaluation can fail. No built-in policy reaches the outage path.

Evidence

  • Regression tests, red on the merge base b4254cb2, green on this head:

    • mailbox: the exact controller input survives a refusing run or adapter authority (base: consumed);
    • followup runner: policy outage and an unsignaled internal assertion error keep the input (base: dropped);
    • authority owners: a revocation found by assertCurrent aborts the owner's signal, including remote-ingress owner replacement (base: signal not aborted);
    • steering: early and guarded steer assertions, reserveSteerCandidate, and the channel steer caller keep the source after an unsignaled failure and still end it on recorded cancellation (base: retired).
  • Real Gateway from source (ocx src, isolated state, real model, a test access-policy plugin loaded through plugins.load.paths that reads its grant from a file; non-owner sender), base vs head, with the message confirmed queued before each event:

    Event Base b4254cb2 Head
    30 s policy outage (grant file moved away and back) withheld; never answered same queued run answered after restore; 0 model calls during the outage; no failure notice for the queued message
    Grant revoked cancelled, 0 model calls, socket 4001 grant-revoked same
    Outage, then grant revoked already withheld during the outage kept through the outage, then cancelled; 0 model calls
    Stop cancelled, 0 model calls same
    Delete removed, 0 model calls same
    Graceful restart resumed and answered same

    During the outage the head logs 14 refused attempts in 30 s (peak 2/s), each refused before any model call.

  • Accepted edge: a long outage keeps the message queued on the drain's existing retry cadence.

- Publish latched revocation through authority-owner signals and preserve the terminal reason.
- Remove assertion-derived input retirement from queue and mailbox custody, including direct steering callers.
- Cover policy outages, internal refusals, ingress-owner replacement, and recorded cancellation; document the custody contract.
- Pinned-base real Gateway outage loses the queued input; source-tier head matrix retains and answers it with no queued-attempt failure notice.
- The deleted authority diagnostic was its only reader before reassignment.
@clawsweeper

clawsweeper Bot commented Nov 17, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: efc3df63e0d639ad59c8a0e800967e65a8baec30
  • Maintainer: @obviyus
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/operator-run-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR preserves queued input through failed authority checks and makes authority owners publish terminal revocation through abort signals.

Example: A message waits behind an active turn during a 30-second access-policy outage.

  • Before: The queued message is withheld and never answered.
  • After: The message remains queued and runs after policy recovery.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The owner-layer repair has clear value, but CI exposes a dispatch regression and incomplete migration of affected tests.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the contributor proof gate; its body reports isolated real-Gateway outage recovery and cancellation controls, but supplies no independently inspectable runtime output.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A queued message disappears during a temporary policy failure even though its sender retains access.
Reason: The maintainer-authored direction restores the documented custody contract using existing authority and queue owners.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this maintainer-authored PR addresses a current message-loss path, but stalled-turn recovery now throws on revoked authority and affected sibling tests fail.

Priority: P2
Reviewed head: a28126402fd356a13685665a966c862b60c5573a

Before merge

  • [P2] Preserve the stalled-turn fallback when recovery admission refuses (P2) - When a persisted turn stalls and its authority first reports revocation during recovery enqueue, removing the earlier probe lets enqueueFollowupRun reach markFollowupRunEnqueued, whose assertCurrent throws. continueStalledReplyTurn now throws instead of returning false. dispatch-from-config.prepare-context.ts invokes this callback before sendFinalReply, so the exception bypasses the fallback stall notice and subsequent dispatch cleanup. Exact-head CI demonstrates this in agent-runner.stalled-turn.test.ts:575. Handle the rejected enqueue at this boundary while retaining recorded cancellation and the existing false-return contract.
  • [P2] Migrate sibling tests to the published revocation signal (P2) - The composed signal changes existing consumer contracts, but only some affected tests were updated. Exact-head CI fails server-plugin-in-process-dispatch.scopes.test.ts:269 because it still requires signal identity, operator-run-cancellation.test.ts:258 because it expects a directly refused retired occurrence to remain unsignaled, and agent-runner-direct-runtime-config.test.ts:568 because it expects a compaction notice after revocation now cancels preparation. Update these tests to assert the intended cancellation outcomes while retaining scope attenuation, independently admitted target liveness, device revocation, and rejected-input persistence checks; do not restore signal identity or suppress the failures.

Findings

  • [P2] [P2] Preserve the stalled-turn fallback when recovery admission refuses — src/auto-reply/reply/agent-runner-execute.ts:77
  • [P2] [P2] Migrate sibling tests to the published revocation signal — src/agents/admitted-run-context.ts:68-71
Agent review details

How this fits together

The session controller retains accepted input, queue adapters schedule its execution, and operator-authority owners determine whether a new attempt may start.

flowchart TD
  A[Accepted message] --> B[Session mailbox]
  B --> C[Turn admission]
  C --> D[Authority owner]
  D --> E[Agent execution]
  D --> F[Temporary refusal]
  F --> B
  D --> G[Recorded cancellation]
Loading

Technical review

Best possible solution:

Retain owner-recorded revocation and FIFO custody, handle refused recovery enqueue without escaping dispatch, and migrate affected sibling tests.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the discard paths, and the PR describes a concrete base/head Gateway reproduction; this read-only review ran no target code.

Is this the best way to solve the issue?

Publishing revocation at its existing owners and removing inferred custody endings is a focused repair, but the stalled-recovery callback and sibling tests need adaptation.

Full review comments:

  • [P2] [P2] Preserve the stalled-turn fallback when recovery admission refuses — src/auto-reply/reply/agent-runner-execute.ts:77
    When a persisted turn stalls and its authority first reports revocation during recovery enqueue, removing the earlier probe lets enqueueFollowupRun reach markFollowupRunEnqueued, whose assertCurrent throws. continueStalledReplyTurn now throws instead of returning false. dispatch-from-config.prepare-context.ts invokes this callback before sendFinalReply, so the exception bypasses the fallback stall notice and subsequent dispatch cleanup. Exact-head CI demonstrates this in agent-runner.stalled-turn.test.ts:575. Handle the rejected enqueue at this boundary while retaining recorded cancellation and the existing false-return contract.
    Confidence: 0.99
  • [P2] [P2] Migrate sibling tests to the published revocation signal — src/agents/admitted-run-context.ts:68-71
    The composed signal changes existing consumer contracts, but only some affected tests were updated. Exact-head CI fails server-plugin-in-process-dispatch.scopes.test.ts:269 because it still requires signal identity, operator-run-cancellation.test.ts:258 because it expects a directly refused retired occurrence to remain unsignaled, and agent-runner-direct-runtime-config.test.ts:568 because it expects a compaction notice after revocation now cancels preparation. Update these tests to assert the intended cancellation outcomes while retaining scope attenuation, independently admitted target liveness, device revocation, and rejected-input persistence checks; do not restore signal identity or suppress the failures.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 81d8ceeaad93.

Provenance checked

  • Admitted operator revocation latch keeps the original intent (715077a: Preserve the original operator's permission ceiling and current authorization across queued and delegated work.)
  • Temporary access-policy failures keeps the original intent (5a1c9b5: Refuse failed policy evaluations without permanently revoking otherwise valid operator authority.)
  • Follow-up authority probing changes intended behavior with a stated reason (d981eaa: Make revoked queued input fail visibly and centralize repeated authority probes; this PR explains why custody must instead consume recorded revocation.)
  • Mailbox claim release and steering custody changes intended behavior with a stated reason (36e277d: Give each session one controller for scheduling and source settlement; this PR removes reader-side authority inference while preserving that ownership.)
  • Steering fallback during policy outages keeps the original intent (9a3b527: Retain known-undelivered steering during unavailable policy checks while keeping real revocation terminal.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5d3d341 adds src/agents/admitted-run-context.ts:81 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5d3d341eda21; files: src/agents/admitted-run-context.ts)
  • Ayaan Zaidi: Raw commit d981eaa adds src/auto-reply/reply/followup-runner.ts:133 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d981eaa83bce; files: src/auto-reply/reply/followup-runner.ts)
  • Shakker: Raw commit 715077a adds src/agents/admitted-run-context.ts:53 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 715077a3befb; files: src/agents/admitted-run-context.ts)

PR surface

Source -69, Tests +237, Docs +5. Total +173 across 21 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 12 19 88 -69
Tests 8 293 56 +237
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 317 144 +173

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Temporary failures in an installed access-policy plugin can discard queued messages; the affected configuration has limited scope.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Temporary failures in an installed access-policy plugin can discard queued messages; the affected configuration has limited scope.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 1:02 AM ET / 06:02 UTC.

- Refuse stalled continuation admission without ending queued-input custody.
- Deliver the prepared preflight failure notice for its recorded source revocation while keeping explicit Stop and supersession silent.
- Update consumer assertions to test revocation propagation and accepted-turn independence rather than upstream signal identity.
- Verified 41 focused consumer files, 1008 tests, across 9 Vitest shards; full runtime-alias inventory retained for hosted CI.
…rded-cause

# Conflicts:
#	src/gateway/operator-run-cancellation.test.ts
- The test typecheck rejected a possibly undefined reply operation.
@obviyus
obviyus merged commit d979dba into main Nov 17, 2026
130 checks passed
@obviyus
obviyus deleted the fix/queued-input-recorded-cause branch November 17, 2026 07:26
@obviyus

obviyus commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as d979dba.

A queued message now ends only for a recorded cause (revocation, Stop, delete, consumption). A failed or unavailable access check refuses that attempt and keeps the message queued; it runs when the policy returns. Proof: regression tests red on the merge base and green here, a real-Gateway base vs head matrix in the description, and green CI on efc3df6.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
## Problem

A message queued while a turn runs could be dropped because a check failed, not because anything ended it.

The custody contract (`docs/concepts/session-controller.md`) lets an accepted input end only as consumed, deliberately dropped, cancelled or interrupted, and requires every accepted input to stay accounted for. The access-policy contract (`docs/plugins/sdk-runtime/gateway-and-nodes.md`) says an owner aborts its signal when a source is revoked, and that an internal assertion error "refuses the operation without revoking the person or their admitted runs".

The code did the opposite in two places:

- The authority owners latched a revocation they found inside `assertCurrent()` without aborting their signal (`operator-run-authority.ts`, `admitted-run-context.ts`). Revocations found by event rechecks were recorded; ones found by a direct check were not.
- Seven queue and mailbox readers ended custody when `assertCurrent()` threw: `isFollowupOperatorAuthorityCurrent` and its four callers (followup runner, drain retry filter, stalled-turn handoff, goal return), mailbox claim release, early injection and steer admission, `reserveSteerCandidate`, and the channel steer caller. Each re-derived the owner's decision from the thrown error with its own rule.

On a real Gateway with an access-policy plugin, a 30 s policy outage while a message was queued dropped it as `withheld`; it never ran after the policy returned.

## Fix

- Owners record revocation: `assertCurrent` in `operator-run-authority.ts` uses its existing `revoke()`, and `createAdmittedRunOperatorAuthority` aborts a local revocation signal, composed with the upstream one, instead of keeping a private latch. A policy outage stays non-terminal.
- Queue and mailbox custody end only on recorded facts: the input's abort signal (which already includes the source authority's signal), retirement, cancellation, or consumption. A failed check now only refuses that attempt; the input stays queued and the drain retries it.
- Deleted `isFollowupOperatorAuthorityCurrent` and every inferred custody end listed above. The deletions in `drain.ts`, `agent-runner-execute.ts` and `goal-continuation-return.ts` match openclaw#200231.
- Notices survive the owner's new revocation signal. The stalled-turn handoff refuses a continuation while the source authority is aborted or refusing, without ending custody, so the original dispatch keeps its fallback notice. `runReplyAgent` still returns a prepared preflight failure notice when the operation was aborted by the source authority's own revocation; an explicit Stop, supersession or restart stays silent.

No new helper, flag, retry, backoff, schema or config. Production code: net −43 lines.

Replaces openclaw#200413, which taught two of these readers a wider "temporary" rule; that rule disagreed with the owner on remote-ingress "owner changed" errors and would have retried such an input forever.

## User impact

- A message queued during a temporary access-policy outage runs after the policy recovers.
- An internal policy error no longer silently drops a queued message.
- Revocation, Stop, delete and graceful restart behave as before: revoked, stopped and deleted messages are cancelled with zero model calls.

Affected installs: those using an access-policy plugin whose evaluation can fail. No built-in policy reaches the outage path.

## Evidence

- Regression tests, red on the merge base `20a8025c`, green on this head:
  - mailbox: the exact controller input survives a refusing run or adapter authority (base: consumed);
  - followup runner: policy outage and an unsignaled internal assertion error keep the input (base: dropped);
  - authority owners: a revocation found by `assertCurrent` aborts the owner's signal, including remote-ingress owner replacement (base: signal not aborted);
  - steering: early and guarded steer assertions, `reserveSteerCandidate`, and the channel steer caller keep the source after an unsignaled failure and still end it on recorded cancellation (base: retired).
- Real Gateway from source (`ocx src`, isolated state, real model, a test access-policy plugin loaded through `plugins.load.paths` that reads its grant from a file; non-owner sender), base vs head, with the message confirmed queued before each event:

  | Event | Base `20a8025c` | Head |
  |---|---|---|
  | 30 s policy outage (grant file moved away and back) | withheld; never answered | same queued run answered after restore; 0 model calls during the outage; no failure notice for the queued message |
  | Grant revoked | cancelled, 0 model calls, socket 4001 `grant-revoked` | same |
  | Outage, then grant revoked | already withheld during the outage | kept through the outage, then cancelled; 0 model calls |
  | Stop | cancelled, 0 model calls | same |
  | Delete | removed, 0 model calls | same |
  | Graceful restart | resumed and answered | same |

  During the outage the head logs 14 refused attempts in 30 s (peak 2/s), each refused before any model call.
- Accepted edge: a long outage keeps the message queued on the drain's existing retry cadence.

Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 19, 2026
A message queued while a turn runs could be dropped because a check failed, not because anything ended it.

The custody contract (`docs/concepts/session-controller.md`) lets an accepted input end only as consumed, deliberately dropped, cancelled or interrupted, and requires every accepted input to stay accounted for. The access-policy contract (`docs/plugins/sdk-runtime/gateway-and-nodes.md`) says an owner aborts its signal when a source is revoked, and that an internal assertion error "refuses the operation without revoking the person or their admitted runs".

The code did the opposite in two places:

- The authority owners latched a revocation they found inside `assertCurrent()` without aborting their signal (`operator-run-authority.ts`, `admitted-run-context.ts`). Revocations found by event rechecks were recorded; ones found by a direct check were not.
- Seven queue and mailbox readers ended custody when `assertCurrent()` threw: `isFollowupOperatorAuthorityCurrent` and its four callers (followup runner, drain retry filter, stalled-turn handoff, goal return), mailbox claim release, early injection and steer admission, `reserveSteerCandidate`, and the channel steer caller. Each re-derived the owner's decision from the thrown error with its own rule.

On a real Gateway with an access-policy plugin, a 30 s policy outage while a message was queued dropped it as `withheld`; it never ran after the policy returned.

- Owners record revocation: `assertCurrent` in `operator-run-authority.ts` uses its existing `revoke()`, and `createAdmittedRunOperatorAuthority` aborts a local revocation signal, composed with the upstream one, instead of keeping a private latch. A policy outage stays non-terminal.
- Queue and mailbox custody end only on recorded facts: the input's abort signal (which already includes the source authority's signal), retirement, cancellation, or consumption. A failed check now only refuses that attempt; the input stays queued and the drain retries it.
- Deleted `isFollowupOperatorAuthorityCurrent` and every inferred custody end listed above. The deletions in `drain.ts`, `agent-runner-execute.ts` and `goal-continuation-return.ts` match #200231.
- Notices survive the owner's new revocation signal. The stalled-turn handoff refuses a continuation while the source authority is aborted or refusing, without ending custody, so the original dispatch keeps its fallback notice. `runReplyAgent` still returns a prepared preflight failure notice when the operation was aborted by the source authority's own revocation; an explicit Stop, supersession or restart stays silent.

No new helper, flag, retry, backoff, schema or config. Production code: net −43 lines.

Replaces #200413, which taught two of these readers a wider "temporary" rule; that rule disagreed with the owner on remote-ingress "owner changed" errors and would have retried such an input forever.

- A message queued during a temporary access-policy outage runs after the policy recovers.
- An internal policy error no longer silently drops a queued message.
- Revocation, Stop, delete and graceful restart behave as before: revoked, stopped and deleted messages are cancelled with zero model calls.

Affected installs: those using an access-policy plugin whose evaluation can fail. No built-in policy reaches the outage path.

- Regression tests, red on the merge base `b4254cb2`, green on this head:
  - mailbox: the exact controller input survives a refusing run or adapter authority (base: consumed);
  - followup runner: policy outage and an unsignaled internal assertion error keep the input (base: dropped);
  - authority owners: a revocation found by `assertCurrent` aborts the owner's signal, including remote-ingress owner replacement (base: signal not aborted);
  - steering: early and guarded steer assertions, `reserveSteerCandidate`, and the channel steer caller keep the source after an unsignaled failure and still end it on recorded cancellation (base: retired).
- Real Gateway from source (`ocx src`, isolated state, real model, a test access-policy plugin loaded through `plugins.load.paths` that reads its grant from a file; non-owner sender), base vs head, with the message confirmed queued before each event:

  | Event | Base `b4254cb2` | Head |
  |---|---|---|
  | 30 s policy outage (grant file moved away and back) | withheld; never answered | same queued run answered after restore; 0 model calls during the outage; no failure notice for the queued message |
  | Grant revoked | cancelled, 0 model calls, socket 4001 `grant-revoked` | same |
  | Outage, then grant revoked | already withheld during the outage | kept through the outage, then cancelled; 0 model calls |
  | Stop | cancelled, 0 model calls | same |
  | Delete | removed, 0 model calls | same |
  | Graceful restart | resumed and answered | same |

  During the outage the head logs 14 refused attempts in 30 s (peak 2/s), each refused before any model call.
- Accepted edge: a long outage keeps the message queued on the drain's existing retry cadence.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit d979dba)

Release adaptation: preserve both baseline occurrence-retirement and session-replacement cases; expect permanent authority failures to record cancellation in each.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit fb38fcadada62aadc8d0b94265dd9123df11f8c6)
RomneyDa added a commit that referenced this pull request Nov 19, 2026
Align the accepted-turn cancellation regression with #200433: permanent assertion failure records source abortion. Check the pre-assert signal separately and retain child liveness and subsequent device-revocation assertions.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 9d26cccaeb2be66f0e186d1574a2b1324fda9a39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. security-sensitive-changed size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant