Files
reverse-engineering-anything/tests/composition
morlutoandCursor Agent aad296795c fix(session): settle snapshot, shutdown, and cleanup-retry races (#14757)
* fix(session): settle snapshot, shutdown, and cleanup-retry races

- Invalidate the analysis snapshot only when an external mutation retires a
  bound engine. Without a target there is no analysis to retire, and the
  lingering flag made the next open discard a snapshot staged meanwhile.
- Let a deferred MCP server's close cancel in-flight runtime startup instead
  of waiting for it to finish before cleanup can run.
- Keep a concurrently confirmed command cleanup owner confirmed when a peer
  retry's stale stop reports it incomplete.
- Re-check provider registry closing after every wait so a selection is never
  admitted while a newer close is in progress.

* fix(session): stop cleanup owners registered while a retry is in flight

retryCleanup visits owners that appear during a stop await and returns
success only when none remain pending. An incomplete stop still cannot
replace an owner a concurrent retry has already confirmed.

* fix(mcp): keep a failed deferred startup failed when close aborts cleanup

The eager result classifies cancellation before its cleanup await. A close
that aborts during that await no longer treats a nonzero startup result as
a cancelled success.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-26 16:46:08 +00:00
..