[PR #2108] [CLOSED] fix(windows): classify native readiness failures by stage #5034

Closed
opened 2026-10-31 00:59:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2108
Author: @AICodeLion
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: codex/windows-native-diagnostics


📝 Commits (10+)

  • 9552a02 fix(windows): classify native readiness failures by stage
  • 7088df0 fix(windows): preserve staged native readiness diagnostics
  • 4f2f183 fix(windows): snapshot provider readiness once per status
  • 5c3ff89 fix(windows): reconcile captured main Ghidra changes
  • 69b87c4 fix(windows): retain readiness stages across JADX and IDA
  • 8963c24 fix(diagnostics): preserve Windows runtime readiness causes
  • b492ed8 fix(ci): isolate Linux Hopper process fixture inventory
  • 2ee4500 fix(comparison): recheck historical calls-only changes (#2223)
  • 40a9dc3 fix(android): narrow Windows readiness diagnostics
  • 824f318 chore: merge pinned main into Windows readiness branch

📊 Changes

22 files changed (+623 additions, -282 deletions)

View changed files

📝 docs/windows-ghidra-p0.md (+13 -0)
📝 src/android/JadxConfiguration.ts (+35 -14)
📝 src/application/AnalysisProvider.ts (+7 -0)
📝 src/application/CapabilityInventory.test.ts (+15 -0)
📝 src/application/CapabilityInventory.ts (+4 -1)
📝 src/application/Doctor.ts (+1 -0)
📝 src/application/WindowsCapabilities.ts (+20 -18)
📝 src/application/binary/AnalysisProviderRegistry.ts (+23 -17)
📝 src/contracts/providerSelection.ts (+1 -0)
📝 src/ghidra/GhidraDoctor.test.ts (+111 -11)
📝 src/ghidra/GhidraDoctor.ts (+17 -16)
📝 src/ghidra/GhidraProvider.behavior.test.ts (+109 -82)
📝 src/ghidra/GhidraProvider.ts (+32 -10)
📝 src/ghidra/GhidraProviderCapabilities.ts (+8 -7)
📝 src/ghidra/GhidraProviderClient.ts (+7 -9)
📝 src/ida/IdaDoctor.ts (+8 -5)
📝 src/ida/IdaProvider.ts (+5 -1)
📝 src/process/WindowsAuthority.ts (+86 -51)
📝 src/windows/WindowsNativeLoader.test.ts (+64 -29)
📝 src/windows/WindowsNativeLoader.ts (+19 -4)

...and 2 more files

📄 Description

When a valid Windows x64 installation fails native inspection—for example cleanup reports ERROR_DIR_NOT_EMPTY (145)—Ghidra currently reports unsupported_host and suggests replacing the package. Classify the loader failure at its producing boundary: host incompatibility remains unsupported_host; native artifact admission uses runtime_missing; self-test or inspection failure uses the additive runtime_unavailable provider rejection code and runtime_failure doctor classification. Preserve the original native error and provide stage-specific remediation.

Doctor, provider availability, advertised capabilities and client prerequisites now consume one readiness observation per query. Windows capability reports reuse one security snapshot. This avoids retrying a transient self-test inside a report and combining availability from one observation with a reason from another. Valid Ghidra/Java registration settings remain preserved, and failed security controls still prevent provider admission.

Validation:

  • 124 tests pass across loader admission, Ghidra doctor/provider behavior, Windows capability reports, doctor and provider registry. Includes Win32 145/permission error retention, all failure stages, stable artifact failures, provider-scoped diagnostics, health failure and single-observation checks.
  • npm run check:fast, npm run check (including architecture guards), npm run build:cached, npm run docs:check and git diff --check pass.
  • Real Windows x64 smoke with the integrity-verified published REA 6.4.0 native addon: an intentionally nonexistent TMP causes a native Win32 2 self-test failure; compiled doctor projection reports runtime_unavailable/runtime_failure and preserves the operation/path/error. Restoring TMP allows the same process to recover on a later query. Ghidra installation was a fixture; no real Ghidra engine or newly built C++ artifact is claimed.

Scope: diagnostics only. Native directory deletion, cleanup ownership, cache retry policy and fail-closed security behavior are unchanged. Refs #1701; the underlying delete-by-handle design remains a separate issue.


🔄 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/2108 **Author:** [@AICodeLion](https://github.com/AICodeLion) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/windows-native-diagnostics` --- ### 📝 Commits (10+) - [`9552a02`](https://github.com/morluto/rea/commit/9552a027ec897025a77a68da121a5e9e905e45b4) fix(windows): classify native readiness failures by stage - [`7088df0`](https://github.com/morluto/rea/commit/7088df06f54d5b7202403a7eb66ebec989a2b5c5) fix(windows): preserve staged native readiness diagnostics - [`4f2f183`](https://github.com/morluto/rea/commit/4f2f1834a87bbfb94e934d556ae9202ac405b28d) fix(windows): snapshot provider readiness once per status - [`5c3ff89`](https://github.com/morluto/rea/commit/5c3ff89a9b226341662b91ad6993eca80eade6ec) fix(windows): reconcile captured main Ghidra changes - [`69b87c4`](https://github.com/morluto/rea/commit/69b87c47535eab318adfdff8dfe92f578c5e635b) fix(windows): retain readiness stages across JADX and IDA - [`8963c24`](https://github.com/morluto/rea/commit/8963c24ae7caf12baa4e017a0d3f56d2c6c56c17) fix(diagnostics): preserve Windows runtime readiness causes - [`b492ed8`](https://github.com/morluto/rea/commit/b492ed8a728caf447772e5597eb537b8e90b52e1) fix(ci): isolate Linux Hopper process fixture inventory - [`2ee4500`](https://github.com/morluto/rea/commit/2ee450087657f7b9be0d3aeae88b294f2cfde4f1) fix(comparison): recheck historical calls-only changes (#2223) - [`40a9dc3`](https://github.com/morluto/rea/commit/40a9dc31457db943efbf6f45f3d6f226af4fef6b) fix(android): narrow Windows readiness diagnostics - [`824f318`](https://github.com/morluto/rea/commit/824f31889116a4f94e9feeca25bdff2d372f3bd6) chore: merge pinned main into Windows readiness branch ### 📊 Changes **22 files changed** (+623 additions, -282 deletions) <details> <summary>View changed files</summary> 📝 `docs/windows-ghidra-p0.md` (+13 -0) 📝 `src/android/JadxConfiguration.ts` (+35 -14) 📝 `src/application/AnalysisProvider.ts` (+7 -0) 📝 `src/application/CapabilityInventory.test.ts` (+15 -0) 📝 `src/application/CapabilityInventory.ts` (+4 -1) 📝 `src/application/Doctor.ts` (+1 -0) 📝 `src/application/WindowsCapabilities.ts` (+20 -18) 📝 `src/application/binary/AnalysisProviderRegistry.ts` (+23 -17) 📝 `src/contracts/providerSelection.ts` (+1 -0) 📝 `src/ghidra/GhidraDoctor.test.ts` (+111 -11) 📝 `src/ghidra/GhidraDoctor.ts` (+17 -16) 📝 `src/ghidra/GhidraProvider.behavior.test.ts` (+109 -82) 📝 `src/ghidra/GhidraProvider.ts` (+32 -10) 📝 `src/ghidra/GhidraProviderCapabilities.ts` (+8 -7) 📝 `src/ghidra/GhidraProviderClient.ts` (+7 -9) 📝 `src/ida/IdaDoctor.ts` (+8 -5) 📝 `src/ida/IdaProvider.ts` (+5 -1) 📝 `src/process/WindowsAuthority.ts` (+86 -51) 📝 `src/windows/WindowsNativeLoader.test.ts` (+64 -29) 📝 `src/windows/WindowsNativeLoader.ts` (+19 -4) _...and 2 more files_ </details> ### 📄 Description When a valid Windows x64 installation fails native inspection—for example cleanup reports ERROR_DIR_NOT_EMPTY (145)—Ghidra currently reports unsupported_host and suggests replacing the package. Classify the loader failure at its producing boundary: host incompatibility remains unsupported_host; native artifact admission uses runtime_missing; self-test or inspection failure uses the additive runtime_unavailable provider rejection code and runtime_failure doctor classification. Preserve the original native error and provide stage-specific remediation. Doctor, provider availability, advertised capabilities and client prerequisites now consume one readiness observation per query. Windows capability reports reuse one security snapshot. This avoids retrying a transient self-test inside a report and combining availability from one observation with a reason from another. Valid Ghidra/Java registration settings remain preserved, and failed security controls still prevent provider admission. Validation: - 124 tests pass across loader admission, Ghidra doctor/provider behavior, Windows capability reports, doctor and provider registry. Includes Win32 145/permission error retention, all failure stages, stable artifact failures, provider-scoped diagnostics, health failure and single-observation checks. - npm run check:fast, npm run check (including architecture guards), npm run build:cached, npm run docs:check and git diff --check pass. - Real Windows x64 smoke with the integrity-verified published REA 6.4.0 native addon: an intentionally nonexistent TMP causes a native Win32 2 self-test failure; compiled doctor projection reports runtime_unavailable/runtime_failure and preserves the operation/path/error. Restoring TMP allows the same process to recover on a later query. Ghidra installation was a fixture; no real Ghidra engine or newly built C++ artifact is claimed. Scope: diagnostics only. Native directory deletion, cleanup ownership, cache retry policy and fail-closed security behavior are unchanged. Refs #1701; the underlying delete-by-handle design remains a separate issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:59:30 +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#5034
No description provided.