[PR #1158] [MERGED] fix(hopper): reserve Linux demo application before launch #2692

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

📋 Pull Request Information

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

Base: main ← Head: fix/hopper-stack-local-fixture


📝 Commits (3)

  • cbf47e8 test(hopper): give locals oracle explicit stack storage
  • f9cfd72 fix(hopper): reserve Linux demo application before launch
  • 52c82ab fix(hopper): serialize stale lease recovery

📊 Changes

9 files changed (+531 additions, -104 deletions)

View changed files

📝 docs/installation.md (+13 -0)
📝 docs/testing.md (+6 -1)
📝 scripts/lib/real-hopper-boundaries.mjs (+12 -0)
➕ scripts/lib/real-hopper-session-isolation.mjs (+53 -0)
📝 src/hopper/BridgeLauncher.ts (+33 -17)
📝 src/hopper/HopperTargetLease.test.ts (+148 -2)
📝 src/hopper/HopperTargetLease.ts (+143 -54)
📝 tests/boundary/providers/hopper/bridgeTargetLease.integration.test.ts (+120 -29)
📝 tests/conformance/c/fixture.c (+3 -1)

📄 Description

Linux Hopper 6.4.2 forwards a second native launch into the first application, even across private displays. A competing CLI/MCP request can fail startup while still adding its document to another REA session.

Reserve the Linux demo application with the existing private, per-user lease before bootstrap, display selection, or launch. Competing same-target and different-target requests now return provider_unavailable with the owning session and requested target; they leave the owner's documents unchanged. Keep the macOS target/profile lease identity unchanged. Unresponsive or malformed live lease endpoints are preserved, while genuinely stale sockets remain recoverable. Serialize stale-socket recovery through the replacement bind so competing recoverers cannot unlink a newly acquired lease. Release uses Node's Unix-socket close cleanup without a second unlink; failed permission setup closes its listener.

Add endpoint and launcher regressions, a real-provider concurrent CLI isolation check, and explicit stack storage in the C locals fixture. Document the Linux concurrency boundary and recovery workflow.

Validation:

  • npm run build:cached; 70 focused Hopper tests across nine files; npm run check:fast; duplication check; npm run docs:check.
  • 24 rounds of 12 concurrent stale-socket recoveries: one reachable owner per round, typed competing failures, and no retained listeners.
  • Final installed package (52c82ab0) with official Linux Hopper 6.4.2: repeated MCP opens, reconnect after disconnect, same/different competing CLI and MCP launches, target switching, cancellation/recovery, CLI/MCP parity, and complete owned-process cleanup passed. Two standalone CLI inspections and four fixture checks also passed.
  • Full Linux semantic verification remains incomplete: this demo does not expose the long-literal inventory required by that separate oracle. The oracle was retained. No new native macOS or GUI Cancel/overlay verification was performed.

Related to #479. The original macOS GUI report and #494 remain outside this verified CLI/MCP fix.


🔄 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/1158 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/hopper-stack-local-fixture` --- ### 📝 Commits (3) - [`cbf47e8`](https://github.com/morluto/rea/commit/cbf47e85b25c96b5eb9878a2789023209cfea2f9) test(hopper): give locals oracle explicit stack storage - [`f9cfd72`](https://github.com/morluto/rea/commit/f9cfd72f1331617738f032890d7d9a38ea81bea6) fix(hopper): reserve Linux demo application before launch - [`52c82ab`](https://github.com/morluto/rea/commit/52c82ab0f40ba22a413338e17fb1231564593e4c) fix(hopper): serialize stale lease recovery ### 📊 Changes **9 files changed** (+531 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+13 -0) 📝 `docs/testing.md` (+6 -1) 📝 `scripts/lib/real-hopper-boundaries.mjs` (+12 -0) ➕ `scripts/lib/real-hopper-session-isolation.mjs` (+53 -0) 📝 `src/hopper/BridgeLauncher.ts` (+33 -17) 📝 `src/hopper/HopperTargetLease.test.ts` (+148 -2) 📝 `src/hopper/HopperTargetLease.ts` (+143 -54) 📝 `tests/boundary/providers/hopper/bridgeTargetLease.integration.test.ts` (+120 -29) 📝 `tests/conformance/c/fixture.c` (+3 -1) </details> ### 📄 Description Linux Hopper 6.4.2 forwards a second native launch into the first application, even across private displays. A competing CLI/MCP request can fail startup while still adding its document to another REA session. Reserve the Linux demo application with the existing private, per-user lease before bootstrap, display selection, or launch. Competing same-target and different-target requests now return `provider_unavailable` with the owning session and requested target; they leave the owner's documents unchanged. Keep the macOS target/profile lease identity unchanged. Unresponsive or malformed live lease endpoints are preserved, while genuinely stale sockets remain recoverable. Serialize stale-socket recovery through the replacement bind so competing recoverers cannot unlink a newly acquired lease. Release uses Node's Unix-socket close cleanup without a second unlink; failed permission setup closes its listener. Add endpoint and launcher regressions, a real-provider concurrent CLI isolation check, and explicit stack storage in the C locals fixture. Document the Linux concurrency boundary and recovery workflow. Validation: - `npm run build:cached`; 70 focused Hopper tests across nine files; `npm run check:fast`; duplication check; `npm run docs:check`. - 24 rounds of 12 concurrent stale-socket recoveries: one reachable owner per round, typed competing failures, and no retained listeners. - Final installed package (`52c82ab0`) with official Linux Hopper 6.4.2: repeated MCP opens, reconnect after disconnect, same/different competing CLI and MCP launches, target switching, cancellation/recovery, CLI/MCP parity, and complete owned-process cleanup passed. Two standalone CLI inspections and four fixture checks also passed. - Full Linux semantic verification remains incomplete: this demo does not expose the long-literal inventory required by that separate oracle. The oracle was retained. No new native macOS or GUI Cancel/overlay verification was performed. Related to #479. The original macOS GUI report and #494 remain outside this verified CLI/MCP fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:09:08 +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#2692
No description provided.