[PR #1111] [MERGED] fix(hopper): verify lease cleanup and repair the macOS test lane #2659

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

📋 Pull Request Information

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

Base: main ← Head: fix/hopper-verifier-cleanup-ownership


📝 Commits (3)

  • f3c4ae9 fix(hopper): distinguish shared lease roots from leaked sessions
  • 4a0dc59 chore: integrate the current Hopper boundary verification
  • 0e0df74 fix(ci): follow the moved process CLI regression tests

📊 Changes

7 files changed (+254 additions, -47 deletions)

View changed files

📝 .github/workflows/ci.yml (+1 -1)
➕ scripts/lib/real-hopper-cleanup.d.mts (+6 -0)
➕ scripts/lib/real-hopper-cleanup.mjs (+52 -0)
📝 scripts/verify-real-hopper.mjs (+38 -30)
📝 src/hopper/HopperTargetLease.ts (+6 -2)
➕ tests/boundary/providers/hopper/hopperVerificationCleanup.test.ts (+103 -0)
📝 tests/process-global/curatedWindowsLane.test.ts (+48 -14)

📄 Description

Verify real Hopper cleanup against owned session roots and individual target-lease resources. The old prefix-only check falsely rejected an empty shared lease parent; the current main ownership check also overlooked sockets inside that parent. Keep an empty shared parent, reject retained leases and invalid lease roots, and preserve completed observations plus exact retained paths on a cleanup failure.

Reuse the production lease-parent constant and retain main's process ownership and lineage checks. This does not change Hopper launch, document retention, or cleanup authority.

The integrated CI run also exposed a stale macOS test path after processCli.test.ts moved. Point that lane at the current file and validate every focused CI test path so a rename cannot silently leave the lane stale.

Validation:

  • Native macOS before-fix artifacts contain only an empty /tmp/rea-hopper-501 shared parent after actual Hopper analysis. Two deterministic resource-classification regressions fail before the fix.
  • 21 focused Hopper, lease, contract, and conformance tests pass after integration with main. The CI path check fails on the old reference and passes after correction (2 tests).
  • npm run build:cached, npm run check:fast, and npm run docs:check pass.
  • Installed-package real Linux Hopper 6.4.2 verification passes: 138 schemas, 52 successful/18 negative cases, foreign-document binding, 1,205 procedures/strings, cancellation recovery, CLI/MCP byte parity, unrelated-process survival, and clean shutdown. A separate installed CLI inspection passes.
  • Installed-package real macOS Hopper 6.6.0 Demo verification passes: 138 schemas, 51 successful/17 negative cases, target switching and explicit-close disposal, cancellation recovery, CLI/MCP byte parity, 1,205 procedures/strings, unrelated-process survival, and clean shutdown. A separate installed CLI inspection passes. The macOS foreign-document case is unavailable and is not claimed.
  • The final commit changes CI/tests only; provider production code is identical to both real-package proofs. The exact-head native macOS concurrent-session probe also passes: the second same-target session is rejected with the owning run ID, while the first session retains its selected document. All 23 exact-head CI checks pass, including 42 native Darwin process lifecycle regressions.

Found during investigation of #494 and #479. The original older-database GUI overlay and cross-session document reuse reports remain open; this PR does not establish those behaviors. No Ghidra/IDA behavior or caller-visible schemas change.

Real Ghidra/IDA verification was not run because those providers are unaffected.

Merge timing: morluto merged while the final macOS x64 CI job was pending. Its success and all other exact-head results were subsequently verified.


🔄 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/1111 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/8/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/hopper-verifier-cleanup-ownership` --- ### 📝 Commits (3) - [`f3c4ae9`](https://github.com/morluto/rea/commit/f3c4ae91ab2d197dd3109d8bde4950c5108c3ea3) fix(hopper): distinguish shared lease roots from leaked sessions - [`4a0dc59`](https://github.com/morluto/rea/commit/4a0dc5908343b0fb09d1b6b080b0d4e31161c561) chore: integrate the current Hopper boundary verification - [`0e0df74`](https://github.com/morluto/rea/commit/0e0df741850c2c5ebe2e2a7341bf0044db9d7fc0) fix(ci): follow the moved process CLI regression tests ### 📊 Changes **7 files changed** (+254 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+1 -1) ➕ `scripts/lib/real-hopper-cleanup.d.mts` (+6 -0) ➕ `scripts/lib/real-hopper-cleanup.mjs` (+52 -0) 📝 `scripts/verify-real-hopper.mjs` (+38 -30) 📝 `src/hopper/HopperTargetLease.ts` (+6 -2) ➕ `tests/boundary/providers/hopper/hopperVerificationCleanup.test.ts` (+103 -0) 📝 `tests/process-global/curatedWindowsLane.test.ts` (+48 -14) </details> ### 📄 Description Verify real Hopper cleanup against owned session roots and individual target-lease resources. The old prefix-only check falsely rejected an empty shared lease parent; the current main ownership check also overlooked sockets inside that parent. Keep an empty shared parent, reject retained leases and invalid lease roots, and preserve completed observations plus exact retained paths on a cleanup failure. Reuse the production lease-parent constant and retain main's process ownership and lineage checks. This does not change Hopper launch, document retention, or cleanup authority. The integrated CI run also exposed a stale macOS test path after `processCli.test.ts` moved. Point that lane at the current file and validate every focused CI test path so a rename cannot silently leave the lane stale. Validation: - Native macOS before-fix artifacts contain only an empty `/tmp/rea-hopper-501` shared parent after actual Hopper analysis. Two deterministic resource-classification regressions fail before the fix. - 21 focused Hopper, lease, contract, and conformance tests pass after integration with main. The CI path check fails on the old reference and passes after correction (2 tests). - `npm run build:cached`, `npm run check:fast`, and `npm run docs:check` pass. - Installed-package real Linux Hopper 6.4.2 verification passes: 138 schemas, 52 successful/18 negative cases, foreign-document binding, 1,205 procedures/strings, cancellation recovery, CLI/MCP byte parity, unrelated-process survival, and clean shutdown. A separate installed CLI inspection passes. - Installed-package real macOS Hopper 6.6.0 Demo verification passes: 138 schemas, 51 successful/17 negative cases, target switching and explicit-close disposal, cancellation recovery, CLI/MCP byte parity, 1,205 procedures/strings, unrelated-process survival, and clean shutdown. A separate installed CLI inspection passes. The macOS foreign-document case is unavailable and is not claimed. - The final commit changes CI/tests only; provider production code is identical to both real-package proofs. The exact-head native macOS concurrent-session probe also passes: the second same-target session is rejected with the owning run ID, while the first session retains its selected document. All 23 exact-head CI checks pass, including 42 native Darwin process lifecycle regressions. Found during investigation of #494 and #479. The original older-database GUI overlay and cross-session document reuse reports remain open; this PR does not establish those behaviors. No Ghidra/IDA behavior or caller-visible schemas change. Real Ghidra/IDA verification was not run because those providers are unaffected. Merge timing: morluto merged while the final macOS x64 CI job was pending. Its success and all other exact-head results were subsequently verified. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:08:43 +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#2659
No description provided.