From 1dd24825ca9c81bb1b64fdc6a84ef1f8ac51fe95 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 15 Jul 2026 19:14:52 +0800 Subject: [PATCH] Document task cancellation latency in CLOUD_DEPLOYMENT.md (task-cancellation 8.1) --- docs/CLOUD_DEPLOYMENT.md | 8 ++++++++ openspec/changes/task-cancellation/tasks.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/CLOUD_DEPLOYMENT.md b/docs/CLOUD_DEPLOYMENT.md index 72eac2e..8e395b2 100644 --- a/docs/CLOUD_DEPLOYMENT.md +++ b/docs/CLOUD_DEPLOYMENT.md @@ -540,6 +540,14 @@ device workflows to tolerate repeated actions when the target operation allows it. Do not use this release for operations that require a transactional exactly-once guarantee across the cloud database and an external device. +Task cancellation is collaborative, not instantaneous, for tasks that have +already left the queue. Cancelling a `queued` task takes effect immediately. +Cancelling an `assigned`/`dispatched` task only records the request; the +owning Host Agent learns about it at its next lease renewal (at most roughly +one third of `lease_duration_seconds`, the same interval used for lease-loss +detection) and then stops at the next cooperative checkpoint. As with lease +loss, an action already sent to a device cannot be rolled back mid-flight. + ## Shutdown And Rollback For a normal shutdown, stop Host Agents first so they stop polling, interrupt diff --git a/openspec/changes/task-cancellation/tasks.md b/openspec/changes/task-cancellation/tasks.md index d9a31d4..e47a218 100644 --- a/openspec/changes/task-cancellation/tasks.md +++ b/openspec/changes/task-cancellation/tasks.md @@ -59,7 +59,7 @@ ## 8. Docs -- [ ] 8.1 Add a short section to `docs/CLOUD_DEPLOYMENT.md` documenting that cancellation is collaborative (not instantaneous) for `assigned`/`dispatched` tasks, bounded by roughly one third of the configured lease duration, with immediate effect for `queued` tasks. +- [x] 8.1 Add a short section to `docs/CLOUD_DEPLOYMENT.md` documenting that cancellation is collaborative (not instantaneous) for `assigned`/`dispatched` tasks, bounded by roughly one third of the configured lease duration, with immediate effect for `queued` tasks. ## 9. End-to-end verification