Skip to content

Share dispatcher queue cancellation mechanics - #3036

Merged
George Ng (GeorgeNgMsft) merged 1 commit into
georgengmsft-guarded-action-executionfrom
georgengmsft-share-dispatcher-cancellation
Sep 19, 2026
Merged

George Ng (GeorgeNgMsft) merged 1 commit into
georgengmsft-guarded-action-executionfrom
georgengmsft-share-dispatcher-cancellation

Conversation

@GeorgeNgMsft

Copy link
Copy Markdown
Contributor

This PR removes duplicated dispatcher cancellation code while keeping the public cancellation APIs separate. cancelCommand and structured cancelAction still provide different ownership checks and result shapes, but they now share one internal helper for removing queued requests, marking running requests cancelled, and aborting their controller.

Changes

  • Add an internal cancelQueuedRequest helper for request-ID-based queue cancellation.
  • Reuse it from Dispatcher.cancelCommand.
  • Reuse it from structured operation cancellation after the structured terminal result has been published.
  • Preserve event-before-abort ordering, queued/running/not-found results, and idempotent running cancellation.
  • Leave cancelCommandByClientId and the agent-RPC cancelAction(actionContextId) path unchanged.

Validation

  • Dispatcher cancellation and queue suites: 5 suites, 112 tests.
  • Dispatcher RPC: 19 tests.
  • Agent-server structured host: 7 tests.
  • Agent-server dependency build and formatting checks.
  • Lint, complexity, circular-dependency, and test-debt ratchets against PR [2/3] Add direct action call path to dispatcher #2992 head a6049a3bf15966d09db5c0b5fc8e8b2deb0bf257.

@GeorgeNgMsft
George Ng (GeorgeNgMsft) marked this pull request as ready for review September 18, 2026 23:59
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@GeorgeNgMsft
George Ng (GeorgeNgMsft) merged commit 3520259 into georgengmsft-guarded-action-execution Sep 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants