[PR #950] [MERGED] fix(ida): share concurrent session cleanup #2527

Closed
opened 2026-10-17 21:07:11 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/950
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: fix/ida-concurrent-close


📝 Commits (1)

  • cfcc6e1 fix(ida): share concurrent session cleanup

📊 Changes

2 files changed (+41 additions, -0 deletions)

View changed files

📝 src/ida/IdaSessionClient.test.ts (+30 -0)
📝 src/ida/IdaSessionClient.ts (+11 -0)

📄 Description

Summary

Concurrent calls to IdaSessionClient.closeWithOutcome() could both pass the closed-state check and issue duplicate worker and connection closes. Share the in-flight cleanup promise so concurrent callers observe the same verified result; clear it after completion so a failed cleanup can still be retried.

Validation

  • npm run test:focused -- src/ida/IdaSessionClient.test.ts — 16 passed
  • npm run check:fast
  • npm run format:check
  • npm run build:cached

The regression uses the production IdaMcpConnection seam. No external IDA runtime was used. Attached GUI sessions remain outside database close authority.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/950 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/ida-concurrent-close` --- ### 📝 Commits (1) - [`cfcc6e1`](https://github.com/morluto/rea/commit/cfcc6e170b0ae205acadeb258912c11d79013f60) fix(ida): share concurrent session cleanup ### 📊 Changes **2 files changed** (+41 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/ida/IdaSessionClient.test.ts` (+30 -0) 📝 `src/ida/IdaSessionClient.ts` (+11 -0) </details> ### 📄 Description ## Summary Concurrent calls to `IdaSessionClient.closeWithOutcome()` could both pass the closed-state check and issue duplicate worker and connection closes. Share the in-flight cleanup promise so concurrent callers observe the same verified result; clear it after completion so a failed cleanup can still be retried. ## Validation - `npm run test:focused -- src/ida/IdaSessionClient.test.ts` — 16 passed - `npm run check:fast` - `npm run format:check` - `npm run build:cached` The regression uses the production `IdaMcpConnection` seam. No external IDA runtime was used. Attached GUI sessions remain outside database close authority. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2527
No description provided.