Repository navigation
Conversation
[Medium impact] The reviewed changes appear safe to merge. SummaryUpdates
The previous unnumbered wording finding is addressed by the shared constants and separate behavior checks. No security issues were identified in the changed code. Tests were not run during this review. Whether another PR supersedes this one could not be checked because GitHub access was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Facet read fails] --> B{Non-retryable capability refusal?}
B -->|No| C[Keep existing failure guidance]
B -->|Yes| D{Provider supplies recovery?}
D -->|Yes| E[Return provider recovery]
D -->|No| F{Comment with known containing function?}
F -->|Yes| G[Suggest same-document summary and retained comments view]
F -->|No| H[Point to binary_session; facet remains unknown]
Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
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. |
…-recovery # Conflicts: # src/application/AnalysisContextQueries.ts # tests/boundary/mcp/addressContextBookmarks.test.ts
…-recovery # Conflicts: # src/application/AnalysisContextQueries.ts
Summary
inspect_address_contexttells agents to callcommentorinline_commenteven after the active provider has reported those operations unavailable. When a containing function is known, guide them to the existing function-dossier comments view; otherwise preserve the facet as unknown and point to session availability.Addresses #8363. The aggregate result and its Evidence handoff remain separate design questions in #8364. Structured invalid-address/document diagnostics and incomplete facet cleanup were merged separately; this branch incorporates main and retains both behaviors.
Both this PR and #8766 address #8363 and overlap in
AnalysisContextQueries.ts; #8766 adds a catalog description and further recovery controls. Review them together and reconcile the final implementation and validation before merging either.Change and scope
The context workflow selects recovery from the actual error and containment result. A non-retryable capability refusal uses provider-supplied recovery when present. For comments with known containment, it conditionally explains the summary-to-comments-view route, same-document requirement, address/kind matching, paging and coverage. Other capability refusals no longer recommend repeating an operation already known to be unavailable. Retryable and other failure guidance remains unchanged.
This changes guidance only: it adds no provider operation, automatic dossier query, cross-document selection, new mutation, or claim that unknown comments are absent. The existing context result shape, facet observations and reasons are retained. Ordinary usability fix within existing scope; no new-capability maintainer decision is required.
Evidence and regression coverage
On base
6e9ee97a, real Ghidra 12.1.4 returned a containing function but told the caller to invoke unavailable direct comment operations. Real Kuna 1.986 did not expose containment on the same Mach-O and its function dossier explicitly reported analyst comments unavailable. The candidate preserved these observations and reasons, offered the conditional dossier route for Ghidra's known function, and left Kuna and Ghidra addresses outside a function unknown.The maintained real-Ghidra COM verifier now writes a regular and an inline session annotation, calls
inspect_address_contextwith the TypeScript MCP SDK using fetched tool definitions, follows the returned summary-to-retained-comments path, verifies both exact comment kinds and address, and checks an outside-function control. The fixture bytes remain unchanged and owned processes clean up. The in-memory MCP boundary cases compare delivered recovery with its owning constants and additionally cover containment unavailable, retryable capability errors and provider-owned recovery. These are not autonomous-agent behavior measurements.Validation performed
npm run verify:ghidra:com— passed with real Ghidra 12.1.4 / JDK 21 on macOS arm64; unexecuted DOS COM fixture, SDK MCP and CLI, original bytes unchanged and process cleanup verified.8b715f255candidate controls on an unexecuted source-owned arm64 Mach-O (the later follow-up extracts identical guidance into named constants) — Ghidra 12.1.4 with full and Kuna 1.986 with compact advertised output schemas; source digest unchanged. Ghidra and Kuna covered function, non-function and unmapped addresses.npm run test:focused -- tests/boundary/mcp/addressContextBookmarks.test.ts— 15 passed after integrating main, including generic versus provider-specific recovery precedence.npm run test:local -- src/application/AnalysisContextQueries.test.ts— 28 passed after integrating main.npm run check:fast,git diff --check, and changed-fileoxfmt --check— passed.Compatibility, safety, and release
No schema or migration change. Comments remain unavailable in the context result; this change exposes a conditional route to separately retained function Evidence. Other providers, Windows, cross-document applicability and autonomous agent decisions were not tested. A complete page does not by itself establish complete provider coverage.
Author readiness
Human owner:
Before merge
type(scope): outcome.