[PR #1289] [MERGED] fix(ghidra): stop dereferencing the removed error payload in address verification #2770

Closed
opened 2026-10-17 21:10:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1289
Author: @kaoru0822-kitauji
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: fix/ghidra-address-verifier-error-envelope


📝 Commits (1)

  • 59fbaa2 fix(ghidra): stop dereferencing the removed error payload in address verification

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 scripts/lib/real-ghidra-address-boundaries.mjs (+2 -1)

📄 Description

Summary

Since #1277, MCP tool errors are delivered without structuredContent. scripts/lib/real-ghidra-address-boundaries.mjs still asserted reply.structuredContent.evidence === undefined after each expected rejection. On main that line throws TypeError: Cannot read properties of undefined (reading 'evidence') on the first oversized address, so the real Ghidra verifier never checks the remaining address representations, the CLI path or the "rejected annotation did not alias the function" control.

The Codex review on #1277 flagged this (scripts/lib/real-ghidra-address-boundaries.mjs:44, "Stop dereferencing the stripped error payload") after the last revision, and it was merged unchanged.

Change

Assert that the rejected reply carries no structured payload at all (reply.structuredContent === undefined). The diagnostic is still read from the text through requireMcpToolError.

Verification

  • Against the built main MCP server, an error reply (read_bytes with an oversized address) has structuredContent: undefined, and the old expression throws the TypeError above.
  • node --check, oxfmt and oxlint on the script.

Real Ghidra verification was not performed (no Ghidra on this host). This only changes the verifier's assertion.

🤖 Generated with Claude Code


🔄 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/1289 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/ghidra-address-verifier-error-envelope` --- ### 📝 Commits (1) - [`59fbaa2`](https://github.com/morluto/rea/commit/59fbaa2d33359216534407f99f49705ac04a3426) fix(ghidra): stop dereferencing the removed error payload in address verification ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/real-ghidra-address-boundaries.mjs` (+2 -1) </details> ### 📄 Description ## Summary Since #1277, MCP tool errors are delivered without `structuredContent`. `scripts/lib/real-ghidra-address-boundaries.mjs` still asserted `reply.structuredContent.evidence === undefined` after each expected rejection. On `main` that line throws `TypeError: Cannot read properties of undefined (reading 'evidence')` on the first oversized address, so the real Ghidra verifier never checks the remaining address representations, the CLI path or the "rejected annotation did not alias the function" control. The Codex review on #1277 flagged this (`scripts/lib/real-ghidra-address-boundaries.mjs:44`, "Stop dereferencing the stripped error payload") after the last revision, and it was merged unchanged. ## Change Assert that the rejected reply carries no structured payload at all (`reply.structuredContent === undefined`). The diagnostic is still read from the text through `requireMcpToolError`. ## Verification - Against the built `main` MCP server, an error reply (`read_bytes` with an oversized address) has `structuredContent: undefined`, and the old expression throws the `TypeError` above. - `node --check`, oxfmt and oxlint on the script. **Real Ghidra verification was not performed** (no Ghidra on this host). This only changes the verifier's assertion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:03 +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#2770
No description provided.