[PR #3565] [MERGED] test(electron): isolate active-hook fixtures from ancestor packages #5826

Closed
opened 2026-10-31 01:09:44 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/3473-electron-hook-fixture-resolution


📝 Commits (1)

  • cedded8 test(electron): isolate active-hook fixtures from ancestor packages

📊 Changes

1 file changed (+86 additions, -22 deletions)

View changed files

📝 tests/boundary/browser/electronActiveHook.test.ts (+86 -22)

📄 Description

Summary

Fixes #3473. The fixture's preload hook lived under the checkout while its exercise used a temporary NODE_PATH mock. A parent Electron package could therefore make them load different modules and fail two tests.

Stage the actual hook and its boundary helper beside a fixture-owned CommonJS Electron package. Both hook and exercise use ordinary nearest-package resolution; remove NODE_PATH reliance. A new real Node/CJS regression supplies a conflicting producer-ancestor package and verifies that the actual BrowserWindow patch is installed. Retain retention/capacity and preload assertions; make unavailable Electron explicit in the fatal-exit case instead of inheriting the host's module state.

One test file only; production scripts are copied unchanged. No product/runtime, CLI/MCP/catalog, authority, provider-support, package or release changes. Maintainer capability scope decision: not applicable to this ordinary fixture correction.

Validation

Latest integrated main: 569ef4159db73931717825302b323fae7aa91bbf; Node 24.18.0 / npm 11.16.0 / Vitest 5.0.3, Linux x64.

  • Actual baseline on main 0f623732b, isolated checkout: clean 3 passed; controlled ancestor Electron package 1 passed / 2 failed; parent removed 3 passed. No user/home/workspace packages were changed.
  • Fixed fixture in the same clean/ancestor/restored environments: 4/4 passed in all three controls.
  • Negative control: bypassing hook staging makes the new ancestor regression fail with an undefined window-open handler instead of the required function. Restore the isolation and it passes; actual Node resolution and actual hook code are used.
  • Latest-main hook plus related active-provider/action/projection suites: 4 files / 23 passed. Existing retention, preload classification, partial evidence and fatal-exit checks remain exercised.
  • check:ci: 8 tasks passed; architecture guards across 1,398 source files; all 1,285 portable test files discovered exactly once; normal diff/commit checks passed.

A fresh four-test hook task with prepared dependency/build/transform caches measured 1.75 s wall / 1.88 s user + 0.43 s system CPU / 412 MiB sampled summed process-group RSS (50 ms, 26 samples), on a shared Linux host. CPU covers waited descendants; RSS double-counts shared pages and may miss short/detached children. This is current verification cost, not an equivalent-workload speedup or CI-wide claim; token costs are unmeasured. Controlled Electron modules establish fixture isolation, not actual Electron-engine support or macOS/Windows runtime coverage.

Hosted CI on cedded82bc48f95ff45e15e7258727743b9f6aaa: run 38599199649 completed successfully, 11 selected jobs passed / 19 unselected jobs skipped. Downloaded current-head test-results: 1,285 unique files / 14,676 passed / 125 skipped / 0 failed / 0 duplicate files. Greptile reviewed this exact head at 5/5, with no inline findings; the Codex review service reported its usage limit, so no Codex review is claimed. The separate readiness declaration check remains red under the documented owner-authorized process exception; all four GitHub-enforced checks passed.

Author readiness

Human owner: @N0zoM1z0

The owner explicitly authorized autonomous implementation, agent review, ready PR creation and merge, and instructed that no further human authorization checkpoints be requested for this work. The agent reviews the diff and evidence; the two human-review factual declarations below remain unchecked because no human inspection of this future diff is being claimed. This owner-authorized process exception is recorded transparently; merge uses ordinary GitHub enforcement without fabricated statuses or administrative bypass.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 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/3565 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/3473-electron-hook-fixture-resolution` --- ### 📝 Commits (1) - [`cedded8`](https://github.com/morluto/rea/commit/cedded82bc48f95ff45e15e7258727743b9f6aaa) test(electron): isolate active-hook fixtures from ancestor packages ### 📊 Changes **1 file changed** (+86 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/browser/electronActiveHook.test.ts` (+86 -22) </details> ### 📄 Description ## Summary Fixes #3473. The fixture's preload hook lived under the checkout while its exercise used a temporary NODE_PATH mock. A parent Electron package could therefore make them load different modules and fail two tests. Stage the actual hook and its boundary helper beside a fixture-owned CommonJS Electron package. Both hook and exercise use ordinary nearest-package resolution; remove NODE_PATH reliance. A new real Node/CJS regression supplies a conflicting producer-ancestor package and verifies that the actual BrowserWindow patch is installed. Retain retention/capacity and preload assertions; make unavailable Electron explicit in the fatal-exit case instead of inheriting the host's module state. One test file only; production scripts are copied unchanged. No product/runtime, CLI/MCP/catalog, authority, provider-support, package or release changes. Maintainer capability scope decision: not applicable to this ordinary fixture correction. ## Validation Latest integrated main: `569ef4159db73931717825302b323fae7aa91bbf`; Node 24.18.0 / npm 11.16.0 / Vitest 5.0.3, Linux x64. - Actual baseline on main `0f623732b`, isolated checkout: clean **3 passed**; controlled ancestor Electron package **1 passed / 2 failed**; parent removed **3 passed**. No user/home/workspace packages were changed. - Fixed fixture in the same clean/ancestor/restored environments: **4/4 passed in all three controls**. - Negative control: bypassing hook staging makes the new ancestor regression fail with an undefined window-open handler instead of the required function. Restore the isolation and it passes; actual Node resolution and actual hook code are used. - Latest-main hook plus related active-provider/action/projection suites: **4 files / 23 passed**. Existing retention, preload classification, partial evidence and fatal-exit checks remain exercised. - `check:ci`: **8 tasks passed**; architecture guards across **1,398 source files**; all **1,285 portable test files discovered exactly once**; normal diff/commit checks passed. A fresh four-test hook task with prepared dependency/build/transform caches measured **1.75 s wall / 1.88 s user + 0.43 s system CPU / 412 MiB sampled summed process-group RSS** (50 ms, 26 samples), on a shared Linux host. CPU covers waited descendants; RSS double-counts shared pages and may miss short/detached children. This is current verification cost, not an equivalent-workload speedup or CI-wide claim; token costs are unmeasured. Controlled Electron modules establish fixture isolation, not actual Electron-engine support or macOS/Windows runtime coverage. Hosted CI on `cedded82bc48f95ff45e15e7258727743b9f6aaa`: [run 38599199649](https://github.com/morluto/rea/actions/runs/38599199649) completed successfully, **11 selected jobs passed / 19 unselected jobs skipped**. Downloaded current-head `test-results`: **1,285 unique files / 14,676 passed / 125 skipped / 0 failed / 0 duplicate files**. Greptile reviewed this exact head at **5/5**, with no inline findings; the Codex review service reported its usage limit, so no Codex review is claimed. The separate readiness declaration check remains red under the documented owner-authorized process exception; all four GitHub-enforced checks passed. ## Author readiness Human owner: @N0zoM1z0 The owner explicitly authorized autonomous implementation, agent review, ready PR creation and merge, and instructed that no further human authorization checkpoints be requested for this work. The agent reviews the diff and evidence; the two human-review factual declarations below remain unchecked because no human inspection of this future diff is being claimed. This owner-authorized process exception is recorded transparently; merge uses ordinary GitHub enforcement without fabricated statuses or administrative bypass. - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:44 +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#5826
No description provided.