[PR #226] [MERGED] fix(session): isolate availability observers #1875

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

📋 Pull Request Information

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

Base: main ← Head: agent/observer-isolation


📝 Commits (1)

  • e5a80d4 fix(session): isolate availability observers

📊 Changes

3 files changed (+62 additions, -4 deletions)

View changed files

📝 src/application/BinarySession.ts (+12 -3)
📝 src/application/BinarySessionPort.ts (+1 -1)
📝 tests/binarySession.test.ts (+49 -0)

📄 Description

Summary

  • contain synchronous exceptions from external availability observers
  • attach rejection handling to asynchronous observer notifications
  • continue notifying peer listeners after one observer fails
  • preserve the typed provider result, availability recovery, session state, and snapshot caching

The root cause was executing arbitrary notification callbacks inline with the provider result path. A listener failure could therefore reject an otherwise successful execute() call; promise-returning listeners could also escape as unhandled rejections.

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/226 **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/observer-isolation` --- ### 📝 Commits (1) - [`e5a80d4`](https://github.com/morluto/rea/commit/e5a80d4f06cd0d4bf64e6b94b50f7430829c336a) fix(session): isolate availability observers ### 📊 Changes **3 files changed** (+62 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/application/BinarySession.ts` (+12 -3) 📝 `src/application/BinarySessionPort.ts` (+1 -1) 📝 `tests/binarySession.test.ts` (+49 -0) </details> ### 📄 Description ## Summary - contain synchronous exceptions from external availability observers - attach rejection handling to asynchronous observer notifications - continue notifying peer listeners after one observer fails - preserve the typed provider result, availability recovery, session state, and snapshot caching The root cause was executing arbitrary notification callbacks inline with the provider result path. A listener failure could therefore reject an otherwise successful `execute()` call; promise-returning listeners could also escape as unhandled rejections. ## 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:05 +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#1875
No description provided.