Repository navigation
Conversation
This was referenced Nov 1, 2026
Contributor
[Medium impact] The PR appears safe to merge; the earlier test gap is fixed and no new blocking issue was found. SummaryGhidra's read-only refusal now explains how to start a separate editable import without the saved project's annotations. The shared session layer preserves provider-owned recovery guidance.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Ghidra read-only capability] --> B[Session refuses operation]
B --> C[Typed error preserves reason and recovery]
C --> D[CLI or MCP caller]
Reviews (2) · Last reviewed commit: "test(ghidra): exercise read-only capabil..." · Reviewed by Greptile |
morluto
marked this pull request as ready for review
November 1, 2026 18:23
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #8580. Annotating a selected read-only Ghidra project correctly fails, but the error previously advised only choosing another analysis or target. It now states the read-only policy and explains that a fresh editable import is a separate ephemeral analysis without the saved project's annotations.
Change and scope
The Ghidra capability owner supplies the policy and recovery for unavailable mutation operations. The shared session execution boundary preserves an unavailable descriptor's explicit reason and remediation in the typed error. Declared capabilities without remediation retain their existing projection. No provider is switched and the existing project remains read-only.
Contract and boundary impact
capability_unavailableand structured reason are retained; message and action are now specific when an unavailable descriptor provides remediation. No request or result shape changes.Evidence and regression coverage
Validation performed
npm run test:focused -- tests/boundary/mcp/sessionAvailabilityRecovery.test.ts tests/boundary/mcp/providerSelectionMcp.test.ts— 20 passed; the changed session file was rerun after the final generic-provider regression, 10 passed.npm run check:fast— passed.npm run docs:check— passed.git diff --check— passed.A temporary merge of this head
41472c933and #856796ba4225required resolving their shared session-execution hunk. With undeclared-operation guidance used only for absent descriptors and explicit descriptor remediation taking precedence, the two MCP boundary suites passed 20 tests and the real Ghidra existing/fresh handoff passed in both schema profiles. This validates that specific local resolution, not an automatic merge or either PR alone.An additional real Ghidra control omitted
REA_GHIDRA_PROGRAM_NAME, letting the name default from the target. Both MCP profiles returned the same read-only recovery and preserved source hashes.binary_sessioncomplete detail also exposed the same remediation for the unavailable annotation tools; this is a catalog observation, not a controlled agent-selection study.A further real Ghidra control exercised seven annotation-related operations on the read-only root project in both MCP profiles.
set_address_name,set_addresses_namesandannotate_native_functionreceived the read-only recovery;set_comment,set_inline_comment,set_bookmarkandunset_bookmarkremained undeclared and received the generic unavailable error. In a fresh Ghidra import, directset_commentwas still unavailable, whileannotate_native_functionsuccessfully wrote a function-entry comment. This PR does not claim that every annotation operation becomes available after reopening; arbitrary-address comments are tracked separately in #6404. The selected project, target and session state stayed unchanged during the refusal control.Compatibility, safety, and release
Existing successful calls and result shapes are unchanged. Unavailable capability descriptors with explicit remediation now expose it to callers. Real-provider coverage is limited to the stated host and fixtures; no model-choice or other-platform claim is made.
A temporary conflict-resolved combination of #8567
757f2646and #8581d1f5b3eapassed 23 MCP boundary tests and real Ghidra 12.1.4 controls in both schema profiles. Fresh sessions offered and successfully followed the regular/inline function-entry handoff; existing-project sessions did not suggest that unavailable edit and retained their specific read-only recovery. The target and original project hashes were unchanged. This validates the stated local resolution, not an automatic merge.Author readiness
Human owner: