Skip to content

fix: retain MCP workspaces after failed deletion - #170

Closed
anycodes wants to merge 1 commit into
mainfrom
fix/mcp-keep-failed-deletion-20261124
Closed

anycodes wants to merge 1 commit into
mainfrom
fix/mcp-keep-failed-deletion-20261124

Conversation

@anycodes

Copy link
Copy Markdown
Contributor

Description

An explicit Python MCP deletion used to drop the owning record and default before the Provider acknowledged success. Keep the exact bound workspace available for explicit retry on failure. Fixes #169 when merged.

Changes

  • Clear the owning entry, TTL, task retention and default only after successful deletion.
  • Preserve the Provider connection for this MCP operation on failure. Direct SDK kill keeps its existing behavior.
  • Serialize explicit deletion with the shutdown snapshot and preserve a concurrently created default.
  • Use the existing sanitized lifecycle error path. Add bilingual guidance and a decision and verification record.

Testing

  • Three red regressions reproduced on the original implementation.
  • 287 MCP unit tests passed, including bare/default/qualified IDs and overlapping create.
  • Real Express MCP lifecycle test passed. A pre-request failure was injected once. The retry used the original bound connection and a separate read confirmed typed not-found.
  • Ruff, formatting, mypy and repository health.
  • Required remote CI and review.

The controlled failure does not represent a request accepted by the Provider followed by a lost response. HTTP session termination and other providers are outside the test scope. See .agents verification.

@anycodes

Copy link
Copy Markdown
Contributor Author

Completed by #185 (retryable cleanup and owned/borrowed handle lifecycle), with the remaining kill_sandbox error-classification gap now merged in #189 at 96acac6ba5b3b99f60ec81a360c566c27b976e29. PR #189 passed all current-head CI jobs and documentation checks, including explicit/default-target failure and retry regressions. The public paired SDK 0.5.0a1 publication is recorded in #188; the additional #189 error-format correction is merged source and is not included in that immutable published version. Closing this earlier proposal as superseded, without claiming its branch was merged or all draft provider work was delivered.

@anycodes anycodes closed this Nov 25, 2026
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.

Keep a Python MCP workspace available for explicit deletion retry

1 participant