[PR #1654] [MERGED] fix(javascript): preserve cleanup failures during preparation cancellation #4726

Closed
opened 2026-10-31 00:54:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/javascript-cleanup-cancellation-1563


📝 Commits (1)

  • ba88521 fix(javascript): preserve cleanup failures during preparation cancellation

📊 Changes

3 files changed (+78 additions, -13 deletions)

View changed files

📝 src/javascript/analysis/JavaScriptAnalysisWorker.ts (+3 -1)
📝 tests/boundary/javascript/javascriptApplicationCancellation.test.ts (+24 -12)
📝 tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts (+51 -0)

📄 Description

A failed retained JavaScript analyzer cleanup can coincide with cancellation of the next caller during preparation. Preserve ProviderCleanupError instead of replacing it with a completed cancelled result, so the owned resource and retry diagnostic remain visible. Builds on main's preparation-cancellation correction.

Verify the failure through a real owned Node worker with an injected cleanup callback failure, then allow verified cleanup and prove subsequent analysis recovers. Move the filesystem/process cancellation suite into boundary tests and assert its retained partial observation. The injected callback establishes this failure projection; an actual OS cleanup denial was not observed.

Validation: 16 real process/cancellation boundary cases; npm run check:ci; npm run verify:test-discovery (794 files). Packed final head ba885214 and independently installed production dependencies on native Windows in an isolated Windows verification directory, using existing Node 22.19.0. Actual CLI JSON and pinned-SDK MCP pass: 170 tools, startup cancellation with retained partial evidence, timeout/partial views, subsequent successful analysis, paging/item lookup, tracing, close and ping. Input digests are unchanged and no owned worker roots remain. All 19 final-head GitHub checks passed, including the full test/coverage gate, Windows capability/package lane and both native package baselines. Real Hopper/Ghidra verification was not performed for this Node lifecycle change.

Fixes #1653. Refs #1563 and #1065.


🔄 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/1654 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/javascript-cleanup-cancellation-1563` --- ### 📝 Commits (1) - [`ba88521`](https://github.com/morluto/rea/commit/ba88521441b17a8c227c40ec1e936c3373febd1c) fix(javascript): preserve cleanup failures during preparation cancellation ### 📊 Changes **3 files changed** (+78 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/javascript/analysis/JavaScriptAnalysisWorker.ts` (+3 -1) 📝 `tests/boundary/javascript/javascriptApplicationCancellation.test.ts` (+24 -12) 📝 `tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts` (+51 -0) </details> ### 📄 Description A failed retained JavaScript analyzer cleanup can coincide with cancellation of the next caller during preparation. Preserve `ProviderCleanupError` instead of replacing it with a completed `cancelled` result, so the owned resource and retry diagnostic remain visible. Builds on main's preparation-cancellation correction. Verify the failure through a real owned Node worker with an injected cleanup callback failure, then allow verified cleanup and prove subsequent analysis recovers. Move the filesystem/process cancellation suite into boundary tests and assert its retained partial observation. The injected callback establishes this failure projection; an actual OS cleanup denial was not observed. Validation: 16 real process/cancellation boundary cases; `npm run check:ci`; `npm run verify:test-discovery` (794 files). Packed final head `ba885214` and independently installed production dependencies on native Windows in an isolated Windows verification directory, using existing Node 22.19.0. Actual CLI JSON and pinned-SDK MCP pass: 170 tools, startup cancellation with retained partial evidence, timeout/partial views, subsequent successful analysis, paging/item lookup, tracing, close and ping. Input digests are unchanged and no owned worker roots remain. All 19 final-head GitHub checks passed, including the full test/coverage gate, Windows capability/package lane and both native package baselines. Real Hopper/Ghidra verification was not performed for this Node lifecycle change. Fixes #1653. Refs #1563 and #1065. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:54:25 +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#4726
No description provided.