GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: give tasks honest cancellation and error endings (#2499) by dezren39 · Pull Request #3699 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: e0c4363614
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| t.cancelTimer = time.AfterFunc(grace, func() { | ||
| s.expireCancellation(t, reason) | ||
| }) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve immediate cancellation for legacy MCP clients
For clients negotiated to 2025-11-25, mcpserver/tasks.go still handles tasks/cancel by calling this shared store method and returning its snapshot. Replacing the immediate terminal transition with a grace timer now returns working or input_required, and cooperative work can subsequently become completed or failed. That violates the legacy requirements recorded in internal/conformance/requirements.json (tasks-cancel-transition-before-response and tasks-cancelled-sticky): cancellation must transition to cancelled before replying and remain cancelled. Keep the cooperative behavior for the modern extension while preserving the legacy cancellation semantics.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f75de20: the legacy 2025-11-25 tasks/cancel handler now calls the new tasks.Store.CancelImmediate, which records Cancelled under the store lock before the reply (grace timer stopped, StatusMessage set) and returns the terminal snapshot; the work is still notified but its later finish cannot change the ending (finish() drops results for terminal tasks). The cooperative grace window remains only on CancelWithReason (modern extension + daemon paths). Regression test TestCancelImmediateIsTerminalAndSticky covers terminal-and-sticky with a grace window configured; internal/tasks, mcpserver Task|Cancel, and conformance Cancel|Stateful tests pass on the laptop.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked (task 5601, lane E resume)
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ment-honest-task-endings # Conflicts: # pkgs/mcpx/internal/settings/effect.go
|
Fix-forward for the Codex P1 (finding 4435807111), in f75de20 + merge 7f37ee0:
Verification on the laptop: @codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f37ee033b
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| sections: prototasks | ||
| kind: Added | ||
| summary: protoTasks.cancelGrace setting (5s) — cooperative task work may finish inside the cancel grace window instead of being recorded cancelled (#2499) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Register the new change fragment in the compendium manifest
This newly added Markdown file has no entry in docs/compendium.manifest.json. TestEveryDocumentHasAChapter in internal/settings/compendium_test.go scans all Markdown files, including docs/changes, and fails for each unregistered file. Although main already has unrelated manifest drift, this fragment introduces an additional failure that will remain after those baseline issues are fixed. Add a manifest entry, using the existing change fragment's not-compendium role if appropriate.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed: docs/changes/prototasks-cancel-grace.md is now registered in docs/compendium.manifest.json as a not-compendium docs-history fragment (same shape as the artifact-copy-semantics entry). Re-running TestEveryDocumentHasAChapter, our file no longer appears; the 3 remaining unregistered files (TESTING.md, docs/changes/docs-history-tool.md, docs/changes/research-and-findings-chapter.md) are pre-existing on clean main and tracked by #2846.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: d81a702983
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| if moved { | ||
| if transitioned { | ||
| s.changed(id) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cancel the worker before notifying terminal-state watchers
When a legacy client cancels an ownerless modern task with an active task subscription, this synchronous notification can deadlock before reaching cancel(). The production watcher in mcpserver/listen.go calls detailedNow, which calls Store.Result for terminal tasks and waits for t.done. If the worker is waiting on ctx.Done(), neither side can proceed: the watcher waits for the worker, while cancellation waits for the watcher. Previously, the worker context was cancelled before notifying watchers. Move this notification after the cancellation hooks and context cancellation so the cancellation request and subscribed stream can finish.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f847036: CancelImmediate now invokes the OnCancel hook, the store hook, and the worker context cancellation before s.changed(id) notifies watchers, so a watcher waiting on Store.Result/done cannot deadlock against the pending cancellation. internal/tasks tests pass.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@codex review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
mcpx: Phase 2 of #2497 — honest task endings: cooperative cancel grace window + isError statusMessage
There was an error while loading. Please reload this page.