[PR #221] [MERGED] fix(session): reopen replaced targets #1871

Closed
opened 2026-10-16 21:12:01 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: agent/session-reopen-target


📝 Commits (2)

  • 5c55999 fix(session): reopen replaced targets
  • 1c32880 test(session): reopen replaced target through MCP

📊 Changes

3 files changed (+114 additions, -2 deletions)

View changed files

📝 src/application/BinarySession.ts (+8 -2)
📝 tests/binarySession.test.ts (+58 -0)
📝 tests/sessionMcp.test.ts (+48 -0)

📄 Description

Summary

  • reuse an active same-path target only when its immutable identity still matches
  • recreate and health-check the provider client after a binary is replaced in place
  • keep the returned target, active session target, and subsequent dispatch state synchronized

The root cause was treating canonical path equality as target identity. A rewritten binary could therefore return a new digest from open() while analysis continued through the old client.

Verification

  • tests/binarySession.test.ts: 16/16 passed
  • npm run typecheck
  • touched-file oxlint (existing file-size warning only)
  • touched-file Prettier check

🔄 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/221 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `agent/session-reopen-target` --- ### 📝 Commits (2) - [`5c55999`](https://github.com/morluto/rea/commit/5c559998e14bcb9be1e589a1266e31296a8f2af8) fix(session): reopen replaced targets - [`1c32880`](https://github.com/morluto/rea/commit/1c32880e56450b610d766c5a6c1bee6873ee6323) test(session): reopen replaced target through MCP ### 📊 Changes **3 files changed** (+114 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/application/BinarySession.ts` (+8 -2) 📝 `tests/binarySession.test.ts` (+58 -0) 📝 `tests/sessionMcp.test.ts` (+48 -0) </details> ### 📄 Description ## Summary - reuse an active same-path target only when its immutable identity still matches - recreate and health-check the provider client after a binary is replaced in place - keep the returned target, active session target, and subsequent dispatch state synchronized The root cause was treating canonical path equality as target identity. A rewritten binary could therefore return a new digest from `open()` while analysis continued through the old client. ## Verification - `tests/binarySession.test.ts`: 16/16 passed - `npm run typecheck` - touched-file oxlint (existing file-size warning only) - touched-file Prettier check --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:01 +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#1871
No description provided.