[PR #4552] [CLOSED] fix(ghidra): keep launcher failures primary when cancellation arrives later #6304

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4552
Author: @Nitin13-git
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: fix/ghidra-launch-primary-failure


📝 Commits (2)

  • 4d1f054 fix(ghidra): keep launcher failures primary when cancellation arrives later
  • 7ede335 fix(ghidra): classify a cancelled LaunchSupport probe as cancellation

📊 Changes

3 files changed (+80 additions, -8 deletions)

View changed files

📝 src/ghidra/GhidraClient.ts (+13 -5)
📝 src/ghidra/GhidraLaunchFailure.test.ts (+48 -0)
📝 src/ghidra/GhidraLauncher.ts (+19 -3)

📄 Description

Summary

Fixes part of #4517: GhidraHeadlessLauncher.launch() and GhidraClient replaced a real startup failure with cancellation whenever the signal had aborted by the time the error was handled.

Problem and expected behavior

A launcher command failure (e.g. a failing LaunchSupport probe) that occurs before the caller aborts was reported as AnalysisCancelledError / a cancelled session failure, because classification used the latest signal.aborted instead of the error's producer. Expected: the physical failure stays primary; cancellation is reported only when the launcher itself stopped at a cancellation checkpoint.

Change and scope

  • GhidraLauncher.ts: cancellation is derived from cause instanceof AnalysisCancelledError (the launcher's own checkpoints), not isAborted(signal). GhidraLaunchError gains a cancelled fact so a cancelled launch whose rollback is incomplete is still recognised as cancellation.
  • GhidraClient.ts: converts a failed launch into an interruption only when the launcher reported cancellation.
  • Not included: the "exact cancellation reason" part of #4517 for launcher-side checkpoints (the client already records deadline.signal.reason); left for follow-up. Scope decision: not applicable (existing provider boundary, no new capability).

Contract and boundary impact

  • Semantic owner and earliest changed stage: Ghidra launcher, provider startup

  • CLI and MCP/tool-catalog contract: none

  • Provider/platform compatibility: Ghidra; POSIX test only

  • Evidence/provenance contract: improves failure provenance

  • Launch or attach to a process (existing behavior, unchanged)

Evidence and regression coverage

Executed on macOS arm64, Node 24.18.0:

  • New test keeps a launcher command failure primary when cancellation arrives later in src/ghidra/GhidraLaunchFailure.test.ts fails on the base (stashed fix) and passes with the fix.
  • ghidraLaunchRollback, ghidraLauncher, ghidraClient suites: 87 passed, 3 skipped. npm run check:fast passed.
  • Not run: real Ghidra, Windows, full check:pr.

🔄 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/4552 **Author:** [@Nitin13-git](https://github.com/Nitin13-git) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ghidra-launch-primary-failure` --- ### 📝 Commits (2) - [`4d1f054`](https://github.com/morluto/rea/commit/4d1f0544234fdfdac430fbf5cb8214080448bf13) fix(ghidra): keep launcher failures primary when cancellation arrives later - [`7ede335`](https://github.com/morluto/rea/commit/7ede335abfc429b25cd5106270503b05275d5f34) fix(ghidra): classify a cancelled LaunchSupport probe as cancellation ### 📊 Changes **3 files changed** (+80 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/ghidra/GhidraClient.ts` (+13 -5) 📝 `src/ghidra/GhidraLaunchFailure.test.ts` (+48 -0) 📝 `src/ghidra/GhidraLauncher.ts` (+19 -3) </details> ### 📄 Description ## Summary Fixes part of #4517: `GhidraHeadlessLauncher.launch()` and `GhidraClient` replaced a real startup failure with cancellation whenever the signal had aborted by the time the error was handled. ## Problem and expected behavior A launcher command failure (e.g. a failing LaunchSupport probe) that occurs before the caller aborts was reported as `AnalysisCancelledError` / a `cancelled` session failure, because classification used the latest `signal.aborted` instead of the error's producer. Expected: the physical failure stays primary; cancellation is reported only when the launcher itself stopped at a cancellation checkpoint. ## Change and scope - `GhidraLauncher.ts`: cancellation is derived from `cause instanceof AnalysisCancelledError` (the launcher's own checkpoints), not `isAborted(signal)`. `GhidraLaunchError` gains a `cancelled` fact so a cancelled launch whose rollback is incomplete is still recognised as cancellation. - `GhidraClient.ts`: converts a failed launch into an interruption only when the launcher reported cancellation. - Not included: the "exact cancellation reason" part of #4517 for launcher-side checkpoints (the client already records `deadline.signal.reason`); left for follow-up. Scope decision: not applicable (existing provider boundary, no new capability). ## Contract and boundary impact - Semantic owner and earliest changed stage: Ghidra launcher, provider startup - CLI and MCP/tool-catalog contract: none - Provider/platform compatibility: Ghidra; POSIX test only - Evidence/provenance contract: improves failure provenance - [x] Launch or attach to a process (existing behavior, unchanged) ## Evidence and regression coverage Executed on macOS arm64, Node 24.18.0: - New test `keeps a launcher command failure primary when cancellation arrives later` in `src/ghidra/GhidraLaunchFailure.test.ts` fails on the base (stashed fix) and passes with the fix. - `ghidraLaunchRollback`, `ghidraLauncher`, `ghidraClient` suites: 87 passed, 3 skipped. `npm run check:fast` passed. - Not run: real Ghidra, Windows, full `check:pr`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:25 +00:00
bsakaguchi changed title from [PR #4552] [CLOSED] fix(ghidra): keep launcher failures primary when cancellation arrives later to [PR #4552] fix(ghidra): keep launcher failures primary when cancellation arrives later 2026-11-03 07:22:14 +00:00
bsakaguchi changed title from [PR #4552] fix(ghidra): keep launcher failures primary when cancellation arrives later to [PR #4552] [CLOSED] fix(ghidra): keep launcher failures primary when cancellation arrives later 2026-11-03 08:24:50 +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#6304
No description provided.