[PR #1877] [MERGED] fix(ghidra): report progress while startup is pending #4873

Closed
opened 2026-10-31 00:56:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/ghidra-startup-wait-progress


📝 Commits (2)

  • 4c6b63e fix(ghidra): report progress while startup is pending
  • 0aa8b25 test(mcp): align derived progress assertions with status counts

📊 Changes

8 files changed (+204 additions, -34 deletions)

View changed files

📝 docs/mcp-contracts.md (+23 -8)
📝 src/ghidra/GhidraClient.ts (+47 -3)
📝 src/ghidra/GhidraProviderClient.ts (+12 -8)
📝 src/server/mcpProgress.ts (+4 -2)
📝 src/server/runDerivedOperation.test.ts (+4 -2)
📝 tests/boundary/mcp/electronMcp.test.ts (+5 -2)
📝 tests/boundary/mcp/progressMcp.test.ts (+33 -9)
📝 tests/boundary/providers/ghidra/ghidraClient.test.ts (+76 -0)

📄 Description

Ghidra startup now reports elapsed waiting every ten seconds through the caller's existing progress token. Previously the adapter dropped the progress reporter, leaving clients with only operation-start and completion markers. Waiting messages stop on cancellation or startup settlement and do not estimate import or analysis completion.

MCP progress now counts emitted status observations and omits total, so repeated waiting phases satisfy the protocol's requirement that each notification increase. The docs explain the pinned SDK's optional progress timeout reset and total request bound.

Validation: 78 focused provider/process/MCP/Electron tests and five derived-operation regressions, check:fast (including the pre-push gate), docs:check and npm pack. An actual installed Windows Node 24.18 / SDK 2.3.1 / Ghidra 12.1.4 / JDK 21 run received five waiting notifications, then the unchanged default 60-second request timed out. Ping and close recovered, input bytes stayed unchanged, and no owned runtime or observed process remained. The full 172-tool catalog digest matches the pinned baseline. With resetTimeoutOnProgress: true and maxTotalTimeout: 360000, a second unprofiled Windows run received 33 waiting notifications and remained connected until the unchanged provider startup deadline returned provider_timeout after 331 seconds. Ping, close and owned cleanup passed again. Native analysis still did not complete; this change reports waiting and supports the caller's chosen deadline policy, without claiming native speed or large-target memory improvements.

The follow-up commit updates the derived-operation test to the notification-count contract; production files are identical to the Windows-tested commit.

Refs #1065, #1048


🔄 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/1877 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/ghidra-startup-wait-progress` --- ### 📝 Commits (2) - [`4c6b63e`](https://github.com/morluto/rea/commit/4c6b63e950f45625e10f0392b111fe45b36b21bf) fix(ghidra): report progress while startup is pending - [`0aa8b25`](https://github.com/morluto/rea/commit/0aa8b2585c466989842e9aad071755829b931956) test(mcp): align derived progress assertions with status counts ### 📊 Changes **8 files changed** (+204 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `docs/mcp-contracts.md` (+23 -8) 📝 `src/ghidra/GhidraClient.ts` (+47 -3) 📝 `src/ghidra/GhidraProviderClient.ts` (+12 -8) 📝 `src/server/mcpProgress.ts` (+4 -2) 📝 `src/server/runDerivedOperation.test.ts` (+4 -2) 📝 `tests/boundary/mcp/electronMcp.test.ts` (+5 -2) 📝 `tests/boundary/mcp/progressMcp.test.ts` (+33 -9) 📝 `tests/boundary/providers/ghidra/ghidraClient.test.ts` (+76 -0) </details> ### 📄 Description Ghidra startup now reports elapsed waiting every ten seconds through the caller's existing progress token. Previously the adapter dropped the progress reporter, leaving clients with only operation-start and completion markers. Waiting messages stop on cancellation or startup settlement and do not estimate import or analysis completion. MCP progress now counts emitted status observations and omits `total`, so repeated waiting phases satisfy the protocol's requirement that each notification increase. The docs explain the pinned SDK's optional progress timeout reset and total request bound. Validation: 78 focused provider/process/MCP/Electron tests and five derived-operation regressions, check:fast (including the pre-push gate), docs:check and npm pack. An actual installed Windows Node 24.18 / SDK 2.3.1 / Ghidra 12.1.4 / JDK 21 run received five waiting notifications, then the unchanged default 60-second request timed out. Ping and close recovered, input bytes stayed unchanged, and no owned runtime or observed process remained. The full 172-tool catalog digest matches the pinned baseline. With `resetTimeoutOnProgress: true` and `maxTotalTimeout: 360000`, a second unprofiled Windows run received 33 waiting notifications and remained connected until the unchanged provider startup deadline returned `provider_timeout` after 331 seconds. Ping, close and owned cleanup passed again. Native analysis still did not complete; this change reports waiting and supports the caller's chosen deadline policy, without claiming native speed or large-target memory improvements. The follow-up commit updates the derived-operation test to the notification-count contract; production files are identical to the Windows-tested commit. Refs #1065, #1048 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:56:15 +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#4873
No description provided.