Skip to content

fix(runtime): propagate MCP cancellation while retaining execution ownership - #1017

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
loveRhythm1990:fix/moi-mcp-cancellation
Oct 16, 2026
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
loveRhythm1990:fix/moi-mcp-cancellation

Conversation

@loveRhythm1990

@loveRhythm1990 loveRhythm1990 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Agent | Codex

Summary

Before this change, run cancellation reached workspace-authority acquisition but not the in-flight MCP RPC. This change threads the token through the existing ordinary MCP client, stateless Agent Binding HTTP path, and dynamic MCP adapter.

On cancellation, the sender emits notifications/cancelled for the exact protocol request and retains the original response receiver. Accepting, rejecting, or hanging the notification must not prematurely release execution ownership. Agent Binding exchanges receive distinct JSON-RPC IDs while retaining their business call_id; cancellation also prevents further provider-interaction rounds.

Transport preflight preserves a typed cancellation-before-dispatch outcome through both transports and the executor. When no exchange ran, cancellation releases unused workspace authority without quarantine. If an earlier interaction exchange ran, cancelling the next exchange retains the existing settlement obligation and quarantine protection. Other transport errors retain their conservative outcome classification.

rmcp 1.6.0 typed cancellation removes the local response slot and synthesizes ServiceError::Cancelled. The ordinary client therefore sends the same standard wire payload through rmcp custom notifications, preserving the response slot needed to observe a racing completion. The wire regression detects premature local completion. The identity-less dynamic adapter continues rejecting invocation identities forged in tool arguments.

Related issue

Refs #1016.

Related downstream report: matrixorigin/matrixflow#18270.

This PR implements sender-side cancellation only. It must not automatically close either tracking issue.

Change type

  • Bug fix
  • Documentation
  • Test
  • Feature
  • Refactor or performance improvement
  • Build, CI, or maintenance

User and compatibility impact

Providers supporting the pinned MCP cancellation protocol can receive the run cancellation intent. Existing RPC deadlines, unknown-outcome handling, and workspace quarantine remain in place. An HTTP 202, a disconnected transport, or a locally cancelled future is not proof of remote termination.

MCP 2025-11-25, used by the pinned rmcp client, permits a receiver to stop replying after cancellation. Retaining the receiver only preserves the opportunity to observe a racing completion; a late workspace-mutating result still requires the existing explicit workspace-effect settlement evidence.

Known limitation / remaining receiver work: a provider that stops replying after cancellation can still exceed the ownership cleanup deadline and cause quarantine. Eliminating that outcome requires a matching receiving/execution-owner cancellation and settlement/readback contract. That work is not implemented here. Do not treat this PR as a complete cleanup-convergence fix, remove quarantine, or forcibly release an active writer. The historical downstream API error has not been established as a direct consequence of this sender gap.

Architecture and complexity delta

  • Canonical owner changed or extended: existing McpConnection, PreparedMcpToolCall, AgentBindingMcpRuntime, and RuntimeToolExecutor, including its dynamic adapter.
  • Existing implementations and callers searched: server-local transport and cleanup, prepared MCP invocation, Agent Binding RPC, provider-interaction rounds, workspace-effect settlement, and the consuming cancellation/execution boundaries.
  • Superseded code, states, tables, shims, or self-only tests removed: replace the fixed Agent Binding protocol request ID. Consume the existing ToolExecutionRequest at MCP dispatch rather than adding another request structure. Preserve the dynamic adapter lack of a trusted invocation identity.
  • If parallel implementations remain, their boundary and retirement condition: ordinary MCP retains rmcp transport ownership; stateless Agent Binding retains its existing authenticated HTTP owner. No new lifecycle state machine, table, poller, authorization bypass, or active-writer release path.

Verification

The sender/pre-dispatch changes were previously validated locally with CARGO_BUILD_JOBS=1 and CARGO_INCREMENTAL=0; heavy commands ran serially.

  • cargo test --locked -p astra-mcp --lib -- --test-threads=2: 36 passed, including real rmcp wire cancellation, exact request correlation, retained response ownership, and typed pre-dispatch cancellation.
  • cargo test --locked -p astra-runtime --lib mcp_transport_preflight_cancellation_preserves_workspace_dispatch_state -- --test-threads=1: 1 passed, covering four combinations: ordinary stdio MCP / Agent Binding HTTP, with zero prior dispatches / one prior interaction exchange. A test-only scheduling hook signals cancellation after the executor check and before the actual transport preflight. Both providers record actual tools/call counts. An undispatched cancellation admits a subsequent writer; an earlier unresolved mutation rejects it with OwnershipUnsettled.
  • The newly built runtime unit-test executable ran these additional filters serially: server::runtime_mcp::tests (24), server::tool_local_transport::tests (3), mcp_interaction_ (2), provider_interaction_loop (2), rejected provider submission (1), active MCP cancellation (1), dynamic adapter identity rejection (1), blank trusted identity (1), and workspace generation revocation (1). All 36 additional tests passed, for 37 distinct runtime tests / 73 total focused tests in that sender/pre-dispatch validation.
  • cargo clippy --locked -p astra-runtime -p astra-mcp --lib --tests -- -D warnings: passed.
  • cargo fmt --all -- --check and git diff --check: passed. The macOS test linker emitted its large unwind-table warning; tests completed successfully.
  • Public entrypoints exercised: ordinary rmcp duplex wire, actual stdio MCP connection through the prepared-call manager, and Server local transport through stateless Agent Binding HTTP. Active cancellation covers accepted, rejected, and hanging notification responses. The interaction-resumption regression and cleanup-deadline tests retain the prior-dispatch and second-writer protection.
  • No full local offline suite, live database/provider, real sandbox/process-termination, deployment, or scale test was run. That sender/pre-dispatch follow-up changes cancellation/dispatch classification, without schema or database changes. Existing PR CI supplies broader repository coverage; no gate or timeout was weakened. The receiving/execution-owner settlement contract remains outside this sender-only PR.

Rebase onto current main

Rebased onto d8136f40 (current main). The three sender-side cancellation commits apply unchanged. The only conflict was in e2e_matrix_execution_handoff_resume_reaches_provider_http: main independently added the canonical-context watermark wait that fixes the earlier settlement/projection race. The resolution preserves main's wait and the exact once-only assertion, removes this PR's duplicate wait implementation, and retains only the provider-arrival timeout diagnostic. No runtime policy, cancellation behavior, assertion, or timeout was relaxed relative to main.

Earlier validation at the previous PR head included three consecutive database-backed handoff journey passes, target Clippy, and formatting checks. Those results are historical; current rebase validation is recorded below.

  • cargo test --locked --offline -p astra-mcp --lib -- --test-threads=2: 36 passed.
  • Recompiled the system_matrix_http_e2e target with e2e-hooks, then ran e2e_matrix_execution_handoff_resume_reaches_provider_http against isolated local databases with the scripted provider: two consecutive passes (25.86s and 26.88s).
  • cargo fmt --all -- --check and git diff --check github/main...HEAD: passed.
  • Builds ran serially with CARGO_BUILD_JOBS=1 and CARGO_INCREMENTAL=0. The existing macOS large unwind-table linker warning appeared; compilation and execution succeeded.
  • No full local workspace or online integration suite was rerun: the resolution only removes the duplicate test wait, and the sender production patches are unchanged. The new PR head will run broader CI and optional live Harness coverage.

The previous optional live Harness failure was 7/8 cases with successful preflight. The observed missing-model spawn was rejected with tool_invalid_args, and logs did not identify the invalid argument. Current main also clarifies that this case must use a configured model name rather than an Offering ID; that upstream change is retained. A new-head run will provide fresh evidence. This PR does not weaken the Harness pass criteria.

This PR remains Draft pending CI and user review. Do not requeue or merge it automatically.

Final checklist

  • I added or updated tests at the layer that owns the behavior.
  • I updated design documentation for contract changes.
  • I checked the diff for credentials, private URLs, customer data, generated files, and other sensitive information.
  • The PR title follows the repository Conventional Commit format.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes for one substantive ownership regression in the new cancellation return between MCP provider-interaction rounds (inline finding).

Reviewed head 03e8428d8600941feeae7fc77fff7056a4146c87 against its parent/reported PR base b95f23418b73600039eac5b52059132dcffbf29a. All eight changed files and the affected call chains were inspected. During final revalidation, main advanced to c801986631b03a2a8d31e249845b68df45a994de (#1015), and GitHub now reports this PR as behind. I inspected that persistence-read delta; it does not change the finding's code or settlement boundary. This request for changes is anchored to the unchanged PR head, not an approval of integration with the new main.

The finding is source-verified: the new early return drops prior-dispatch evidence; the shared cancellation result does not restore it; workspace finalization therefore skips its required settlement check. The production interaction gate can return the submitted resolution after cancellation arrives during projection. No operational exploit or shared-service reproduction was performed.

Beyond that finding, the change extends the existing execution owners: ordinary rmcp retains its original response slot, HTTP cancellation shares the invocation's endpoint/authorization and uses a distinct per-exchange ID, and the dynamic adapter still rejects an argument-supplied invocation identity. The notification adds no DB query/transaction, independent retry loop, or detached application task. Ordinary manager locks are released before RPC execution; cancellation notification traffic remains tied to in-flight invocations. These are source observations, not scale or multi-tenant performance measurements.

The documented draft limitation remains: a provider may stop replying after cancellation under the MCP cancellation contract, and notification acknowledgement does not prove remote termination. The existing cleanup deadline/quarantine is still required. This review does not treat the sender change as the complete end-to-end cleanup fix.

Local validation on the exact head (Rust 1.97.0; one Cargo build job, incremental compilation disabled):

  • cargo test --locked -p astra-mcp --lib -- --test-threads=2: 36 passed, including the real rmcp duplex cancellation/response-retention test.
  • The built exact-head runtime unit-test executable: 29 passed across server::runtime_mcp::tests (24), dynamic-adapter identity rejection (1), provider-interaction loop bounds/repeated IDs (2), interaction deadline (1), and rejected submission (1).
  • cargo fmt --all -- --check and git diff --check: passed. The source worktree remains clean.
  • agent_binding_mcp_cancellation_retains_execution_until_provider_settles: failed before MCP dispatch, with workspace_binding_unavailable. This saved environment has /tmp owned by UID 65534 (mode 1777); the unchanged coordination-root contract requires UID 0. No trust check or host permissions were changed. The outer workspace-owner tests were inspected but not run through the same unmet prerequisite. The finding above is source-verified, not a claim of a successful runtime reproduction.
  • No live DB, external provider, real remote-process termination, contention, or scale validation was performed.

CI was independently revalidated from the complete paginated check/status, workflow run/job/suite, branch-context and applicable ruleset reads. All 15 required contexts use Actions app 15368: 13 success, plus SDK/Web scope exclusions proven by scope job 116770273958, its exact head/base merge, workflow conditions, and local classification. The administration-only branch-protection endpoint returns 403; required contexts and source-app IDs are available on the branch endpoint, with no additional check rule in the active branch ruleset.

Optional live regression run 38837656077 remains 7/8: flash_missing_child_model_fail_closed reports BehaviorContractViolation, expecting one execution-tool call but observing two rejected agent calls (tool_invalid_args, invalid_request, both not_executed). The case and CLI/server agent dispatch paths are unchanged and bypass the changed MCP dispatch; the available evidence does not establish a changed-code regression from that optional failure. It was not rerun.

No product-code edits, CI reruns, database/live-provider calls, deployments, readiness changes, branch updates, or merge actions were made. Requested review configuration: gpt-6-astra / xhigh; backend model/effort metadata is not exposed in this executor, so no independent backend-identity claim is made.

@loveRhythm1990
loveRhythm1990 marked this pull request as ready for review October 16, 2026 03:15

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes for one new P2 cancellation/dispatch-classification defect (inline). The historical P1 is fixed.

Reviewed all eight changed files and their affected call chains at head e120b1b749f9fc6fe38b33d28391e6f0f7a2fc2b against PR-reported base c801986631b03a2a8d31e249845b68df45a994de. The observed live main tip is 40012430c17977ac6bbda24c24a1800615710a04; its tree is identical to that reported base, so it introduces no additional source delta for this review.

The original finding, from review 5542397866 on 03e8428d8600941feeae7fc77fff7056a4146c87, is addressed: the cancellation return now preserves prior dispatch. The new mutating interaction-resumption fixture checks that no continuation RPC runs and that a subsequent workspace writer is rejected. I also verified its PASS, the active-cancellation retention test's PASS, and the dynamic-adapter identity test's PASS in the required runtime job for the exact head/base merge. The old resolved thread should remain resolved.

The new finding concerns the opposite boundary: a transport can reject cancellation before its first dispatch, but the executor marks every transport error as dispatched. Its workspace finalizer then quarantines a workspace-bound mutation despite no RPC having been sent. Both the Agent Binding and ordinary MCP pre-dispatch cancellation paths need to preserve that distinction, without erasing prior interaction-round dispatch. This is a source-verified concurrency/error-propagation finding; no operational reproduction or bypass demonstration was developed.

The remaining source review covered ordinary rmcp transport/response ownership, stateless HTTP dispatch and error redaction, request-scoped authorization and per-exchange IDs, dynamic-adapter identity rejection, workspace authority/finalization, durable interaction projection, shared cancellation ownership, and the existing CLI callers. The added notification remains attached to its invocation, shares the same endpoint/authorization, adds no SQL query or transaction, and introduces no detached application task or retry loop. Manager locks are released before RPC execution. The HTTP notification does not consume another tool permit and is polled alongside the original request; missing settlement retains the existing cleanup-deadline/quarantine behavior. These are source observations, not measurements of multi-user load or remote process termination.

Local validation used the saved Astra environment, Rust 1.97.0, one Cargo build job, and incremental compilation disabled:

  • cargo test --locked -p astra-mcp --lib -- --test-threads=2: 36 passed, including the real rmcp duplex cancellation/response-retention regression.
  • cargo test --locked --offline -p astra-runtime --lib server::runtime_mcp::tests -- --test-threads=2: 24 passed. The newly built exact-head runtime test executable passed six additional tests covering interaction deadlines, repeated/bounded interaction rounds, rejected submissions, dynamic-adapter identity rejection, and blank trusted identities.
  • mcp_interaction_resume_cancellation_quarantines_unsettled_mutation: failed locally before MCP dispatch with workspace_binding_unavailable. This environment's /tmp is UID 65534/mode 1777; the unchanged coordination-root contract requires UID 0. I did not change host permissions or weaken that check. The regression's successful execution is verified in the required CI log cited above, not claimed as a local pass.
  • cargo fmt --all -- --check and git diff --check: passed; the source worktree remains clean. No full local offline suite, live database/provider, real remote-process termination, or contention/load test was run.

CI and publication gates were independently rechecked: open/non-draft, exact head, connected reviewer XuPeng-SH distinct from author loveRhythm1990, and no current-head or pending duplicate review. Complete collections account for 39 checks, six suites, five workflow runs, all 37 jobs, and zero commit statuses. Branch metadata requires 15 contexts from Actions app 15368: 13 successes, plus SDK/Web exclusions established by scope job 116792323702, its exact head/base merge, workflow conditions, and the local classifier. Both listed rulesets were inspected; the applicable active branch ruleset adds creation/non-fast-forward restrictions, not another CI gate. The previously denied full classic-protection endpoint was not retried.

The optional Harness job remains 7/8. flash_missing_child_model_fail_closed reports BehaviorContractViolation: its required same-call predicates do not match one observed agent call rejected as tool_invalid_args/not_executed. I inspected the unchanged case and CLI/server agent admission paths; this evidence does not establish a regression in the changed MCP dispatch. The job was not rerun and does not independently gate this review.

The documented sender-only limitation still applies: the MCP cancellation contract allows a receiver to stop replying after cancellation. Notification acknowledgement is not settlement, and the existing quarantine boundary remains necessary. This review does not establish complete cooperative cleanup convergence.

No product edits, remote CI reruns, deployments, branch updates, or merge actions were performed. The active Mergify approval-to-queue rule was verified; this submission is REQUEST_CHANGES, not APPROVE. Requested review configuration: gpt-6-astra / xhigh; backend model/effort metadata is not independently exposed by the executor.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve the reviewed head d074494ff0515315f4481bc7b8f4469ec5af180b. All 10 changed files and their affected cancellation/ownership call chains have been reviewed. Both previous cancellation findings are fixed; no new material finding remains.

Scope and historical findings

The review covers Cargo.lock, crates/astra-mcp/Cargo.toml, the MCP connection/error/library/manager changes, runtime_mcp.rs, runtime_tool_executor.rs, its tool_handlers.rs adapter, and docs/design/runtime-lifecycle.md. The PR-reported base is c801986631b03a2a8d31e249845b68df45a994de.

  • The original prior-dispatch finding, anchored to 03e8428d8600941feeae7fc77fff7056a4146c87, is fixed: cancellation between provider-interaction rounds preserves the earlier dispatch evidence and therefore the existing settlement/quarantine obligation.
  • The transport-preflight finding, anchored to e120b1b749f9fc6fe38b33d28391e6f0f7a2fc2b, is fixed: ordinary MCP and Agent Binding HTTP retain a typed cancellation-before-dispatch outcome. The executor handles that outcome before generic transport-error classification, while still retaining earlier interaction-round dispatch. An unused workspace authority can be released without quarantine; a previously dispatched mutation still requires settlement.
  • The new caller-level regression covers both transports with zero and one prior exchange, counts actual provider calls, and checks subsequent writer admission. The required runtime CI job directly records PASS for mcp_transport_preflight_cancellation_preserves_workspace_dispatch_state, mcp_interaction_resume_cancellation_quarantines_unsettled_mutation, and agent_binding_mcp_cancellation_retains_execution_until_provider_settles.

The surrounding review checked request correlation, cancellation notification outcomes, retained original response ownership, interaction resumption, dynamic-adapter identity rejection, and workspace finalization. Notification traffic retains the invocation's endpoint/authorization and exact protocol request identity. Both paths continue observing the original response; notification acknowledgement does not replace workspace-effect settlement. No new independent lifecycle owner or cleanup shortcut was found.

Validation and limits

The completed exact-head review used the saved Astra environment with one Cargo build worker and incremental compilation disabled:

  • MCP library tests: 36 passed, including the real rmcp cancellation/response-retention regression.
  • Focused runtime MCP tests: 24 passed.
  • Additional interaction/identity tests: 6 passed.
  • Total: 66 local tests passed. Formatting and diff checks passed.
  • Two ownership tests were blocked locally by the environment prerequisite, rather than established as local passes: /tmp is owned by UID 65534, while the existing coordination-root contract requires UID 0. No host permissions or trust checks were changed. Successful ownership-regression execution is supported by the required CI log above.
  • No full local offline suite, live provider/database, real remote-process termination, or contention/scale validation was performed.

Fresh publication checks account for the complete collections: 40 check runs, 7 suites, 6 workflow runs, 38 jobs, and zero commit statuses. All 15 currently required context/app pairs pass, with GitHub Actions app 15368. Required test/static jobs and their source/run provenance were checked, including aggregate jobs and the successful replacement PR-title run. The older PR-title workflow is cancelled; the latest title validation is successful. Both rulesets were read; the applicable branch ruleset adds creation/non-fast-forward restrictions, not an extra CI gate. The previously denied administration-only full branch-protection endpoint was not retried.

CI checked merge 6e3e9c10fdc9521bb62f2508c0ef73fc0b8ba865, combining this exact head with 40012430c17977ac6bbda24c24a1800615710a04. Live main is now 7375abe0848c189019ad22b1b7b0b51390efe340. Integration with that newer main has not been tested by this review's local/CI evidence. This approval is anchored to the stated head and does not extend to a later rebase head.

The documented sender-only limitation remains: a provider may stop replying after cancellation. A notification acknowledgement or disconnected transport is not proof of remote termination; cleanup deadlines, quarantine, and the receiving execution-owner settlement contract remain necessary. This does not establish complete end-to-end cleanup convergence.

The PR was rechecked open/non-draft at the exact head, the connected reviewer is XuPeng-SH (distinct from author loveRhythm1990), and no duplicate current-head or pending review was present. Historical review bodies and original anchors were preserved. No product edits, remote CI reruns, branch changes, or direct merge action were performed. Requested review configuration was gpt-6-astra / xhigh; backend model/effort metadata was not independently exposed by the review executor.

@mergify mergify Bot added the queued label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-16 08:14 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ❌ Checks failed · in-place
  • 🚫 Left the queue — 2026-10-16 08:33 UTC · at ac2763bce7bad90a6e76ae9f92afefca19db6f55

This pull request spent 19 minutes 5 seconds in the queue, with no time running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • Test: online (integration)

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: astra-cli (edge-fs-tools)
    • check-skipped = Test: astra-cli (edge-fs-tools)
    • check-success = Test: astra-cli (edge-fs-tools)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: astra-cli (edge-git-gix)
    • check-skipped = Test: astra-cli (edge-git-gix)
    • check-success = Test: astra-cli (edge-git-gix)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: astra-cli (edge-rest)
    • check-skipped = Test: astra-cli (edge-rest)
    • check-success = Test: astra-cli (edge-rest)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: astra-cli (edge-shell)
    • check-skipped = Test: astra-cli (edge-shell)
    • check-success = Test: astra-cli (edge-shell)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: astra-cli (non-edge)
    • check-skipped = Test: astra-cli (non-edge)
    • check-success = Test: astra-cli (non-edge)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: online (core)
    • check-skipped = Test: online (core)
    • check-success = Test: online (core)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: online (integration)
    • check-skipped = Test: online (integration)
    • check-success = Test: online (integration)
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Test: macOS workspace coordination
    • check-skipped = Test: macOS workspace coordination
    • check-success = Test: macOS workspace coordination
All conditions
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: astra-cli (edge-fs-tools)
    • check-skipped = Test: astra-cli (edge-fs-tools)
    • check-success = Test: astra-cli (edge-fs-tools)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: astra-cli (edge-git-gix)
    • check-skipped = Test: astra-cli (edge-git-gix)
    • check-success = Test: astra-cli (edge-git-gix)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: astra-cli (edge-rest)
    • check-skipped = Test: astra-cli (edge-rest)
    • check-success = Test: astra-cli (edge-rest)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: astra-cli (edge-shell)
    • check-skipped = Test: astra-cli (edge-shell)
    • check-success = Test: astra-cli (edge-shell)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: astra-cli (non-edge)
    • check-skipped = Test: astra-cli (non-edge)
    • check-success = Test: astra-cli (non-edge)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: online (core)
    • check-skipped = Test: online (core)
    • check-success = Test: online (core)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: online (integration)
    • check-skipped = Test: online (integration)
    • check-success = Test: online (integration)
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Test: macOS workspace coordination
    • check-skipped = Test: macOS workspace coordination
    • check-success = Test: macOS workspace coordination
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Check PR title
    • check-neutral = Check PR title
    • check-skipped = Check PR title
  • any of [🛡 GitHub branch protection]:
    • check-success = check
    • check-neutral = check
    • check-skipped = check
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: core crates + bridge hooks
    • check-neutral = Test: core crates + bridge hooks
    • check-skipped = Test: core crates + bridge hooks
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-runtime
    • check-neutral = Test: astra-runtime
    • check-skipped = Test: astra-runtime
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: turn-core + services + plan
    • check-neutral = Test: turn-core + services + plan
    • check-skipped = Test: turn-core + services + plan
  • any of [🛡 GitHub branch protection]:
    • check-skipped = web (typecheck, test, build)
    • check-neutral = web (typecheck, test, build)
    • check-success = web (typecheck, test, build)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = Astra SDK (typecheck, test+coverage, build)
    • check-neutral = Astra SDK (typecheck, test+coverage, build)
    • check-success = Astra SDK (typecheck, test+coverage, build)

Requeued — the merge queue status continues in this comment ↓.

@mergify
mergify Bot force-pushed the fix/moi-mcp-cancellation branch from d074494 to ac2763b Compare October 16, 2026 08:14
@mergify mergify Bot added dequeued and removed queued labels Oct 16, 2026
@loveRhythm1990
loveRhythm1990 marked this pull request as draft October 16, 2026 08:40
@mergify mergify Bot removed the dequeued label Oct 16, 2026
@loveRhythm1990
loveRhythm1990 marked this pull request as ready for review October 16, 2026 09:04
@loveRhythm1990
loveRhythm1990 marked this pull request as draft October 16, 2026 09:15
@loveRhythm1990
loveRhythm1990 force-pushed the fix/moi-mcp-cancellation branch from 7331376 to 09caf96 Compare October 16, 2026 09:23
@loveRhythm1990
loveRhythm1990 marked this pull request as ready for review October 16, 2026 09:26
@mergify mergify Bot added the queued label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-16 10:07 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-16 10:42 UTC · at 17b3bc4a7ff8c1e8a2fba0e67c00585475593190 · squash

This pull request spent 35 minutes 4 seconds in the queue, including 34 minutes 7 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Check PR title
    • check-neutral = Check PR title
    • check-skipped = Check PR title
  • any of [🛡 GitHub branch protection]:
    • check-success = check
    • check-neutral = check
    • check-skipped = check
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: core crates + bridge hooks
    • check-neutral = Test: core crates + bridge hooks
    • check-skipped = Test: core crates + bridge hooks
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-runtime
    • check-neutral = Test: astra-runtime
    • check-skipped = Test: astra-runtime
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-cli (edge-fs-tools)
    • check-neutral = Test: astra-cli (edge-fs-tools)
    • check-skipped = Test: astra-cli (edge-fs-tools)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-cli (edge-git-gix)
    • check-neutral = Test: astra-cli (edge-git-gix)
    • check-skipped = Test: astra-cli (edge-git-gix)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-cli (edge-rest)
    • check-neutral = Test: astra-cli (edge-rest)
    • check-skipped = Test: astra-cli (edge-rest)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-cli (edge-shell)
    • check-neutral = Test: astra-cli (edge-shell)
    • check-skipped = Test: astra-cli (edge-shell)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: astra-cli (non-edge)
    • check-neutral = Test: astra-cli (non-edge)
    • check-skipped = Test: astra-cli (non-edge)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: online (core)
    • check-neutral = Test: online (core)
    • check-skipped = Test: online (core)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: online (integration)
    • check-neutral = Test: online (integration)
    • check-skipped = Test: online (integration)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: turn-core + services + plan
    • check-neutral = Test: turn-core + services + plan
    • check-skipped = Test: turn-core + services + plan
  • any of [🛡 GitHub branch protection]:
    • check-skipped = web (typecheck, test, build)
    • check-neutral = web (typecheck, test, build)
    • check-success = web (typecheck, test, build)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = Astra SDK (typecheck, test+coverage, build)
    • check-neutral = Astra SDK (typecheck, test+coverage, build)
    • check-success = Astra SDK (typecheck, test+coverage, build)
  • any of [🛡 GitHub branch protection]:
    • check-success = Test: macOS workspace coordination
    • check-neutral = Test: macOS workspace coordination
    • check-skipped = Test: macOS workspace coordination

@mergify
mergify Bot force-pushed the fix/moi-mcp-cancellation branch from 09caf96 to f3c08cf Compare October 16, 2026 10:07
@mergify
mergify Bot merged commit 17b3bc4 into matrixorigin:main Oct 16, 2026
@mergify mergify Bot removed the queued label Oct 16, 2026
XuPeng-SH added a commit that referenced this pull request Oct 17, 2026
#1031)

* fix(compaction): carry prior summaries across history rewrites

Preserve recognized historical evidence through summary input projection, canonical resume and artifact replacement without forwarding stable instructions or elevating runtime controls. Refs #1024.

* fix(mcp): correlate responses before accepting settlement

Reject stale or malformed Agent Binding replies without releasing workspace ownership. Preserve cancellation notification and cleanup behavior from #1017; document the external receiving/provider settlement boundary. Refs #1016.

* fix(compaction): keep repeated summary requests user-first

Precede historical assistant evidence with an auxiliary summary task. Exercise the production Bedrock request builder across three generations, marked and legacy resume, PTL retries and tool pairing. Refs #1024; addresses review comment 4301351399.
XuPeng-SH added a commit that referenced this pull request Oct 18, 2026
* fix(compaction): carry prior summaries across history rewrites

Preserve recognized historical evidence through summary input projection, canonical resume and artifact replacement without forwarding stable instructions or elevating runtime controls. Refs #1024.

* fix(mcp): correlate responses before accepting settlement

Reject stale or malformed Agent Binding replies without releasing workspace ownership. Preserve cancellation notification and cleanup behavior from #1017; document the external receiving/provider settlement boundary. Refs #1016.

* fix(compaction): keep repeated summary requests user-first

Precede historical assistant evidence with an auxiliary summary task. Exercise the production Bedrock request builder across three generations, marked and legacy resume, PTL retries and tool pairing. Refs #1024; addresses review comment 4301351399.

* perf(compaction): reuse accepted request summaries

Install validated request-time summaries through the canonical rewrite proof so later rounds and resume reuse the accepted working set. Reserve summary space only for actual history pressure and preserve tool pairing, active authority and failure/cancellation fallback. Refs #1023.

* fix(compaction): require valid authority before adopting summaries

Keep useful summaries request-local when admission has not granted a valid canonical rewrite permit. Preserve the provider WAL predecessor on first canonical turns and stale-proof paths instead of installing an unauthorized shorter history.

Cover missing and stale authority with and without an earlier provider WAL head through the real request compactor, WAL planner, and terminal commit owner. Refs #1023; addresses PR #1033 review comment 4301627550.

---------

Co-authored-by: Peng Xu <[email protected]>
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.

2 participants