Repository navigation
feat(mcp): page retained incoming reference addresses - #8591
Conversation
[Medium impact] The code changes appear safe to merge; no blocking issue was found. SummaryAdds retained
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["xrefs completes"] --> B["Record complete Evidence"]
B --> C{"MCP reply fits?"}
C -->|Yes| D["Return complete Evidence"]
C -->|No| E["Return error with continuation"]
E --> F["inspect_analysis_view reads retained parent"]
F --> G["native-observation: address pages"]
F --> H["native-context: source caveats"]
Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
|
Current-base control: in a temporary, uncommitted merge of this PR head This checks a temporary integration, not a push or a new PR head. It does not repeat the earlier 24,000-row overflow/offline controls, verify Hopper or other hosts, or resolve the outstanding CI and author-readiness checks. |
|
Additional current-base handoff control: the same temporary merge imported the previously captured 24,000-address xrefs Evidence bundle from the unmerged pointer prototype into fresh target-free servers. In both full and compact MCP profiles, 24 schema-validated pages reconstructed all 24,000 addresses in source order with their original indices and the same parent ID; the limitations context remained accessible. This fixture has 24,000 distinct addresses, so it does not exercise duplicate values. The focused view regression separately covers duplicate addresses and source identity. This offline control does not establish that current REA produces those pointer rows, and it is not a repeat of the live overflow recovery test. |
Current-base real overflow handoffA separate temporary integration combined main On macOS arm64, real Kuna 1.989 analyzed a newly built, unexecuted 48,000-pointer Mach-O. In both compact and full stdio MCP profiles, the experimental For comparison, the same experimental integration returned the existing 24,000-pointer case inline at approximately 6.97 MB in each profile, so that case no longer triggers overflow after the prototype removed its duplicate representation. These are scripted controls on one host and two constructed fixtures, not autonomous-agent selection or a performance benchmark. Current REA still omits the pointers (#8510); no general provider coverage is implied. |
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. |
Summary
A retained
xrefsresult can exceed MCP's response budget, and previously its retained parent could not be paged. Extend the existing native-observation view to page its address list and expose source caveats. Related: #8510.Problem and expected behavior
An oversized completed
xrefsreturns a retained Evidence ID, butinspect_analysis_viewrejects that parent. The caller can export the complete bundle, but cannot follow the result in bounded MCP pages. Return aninspect_analysis_viewcontinuation for the retained parent and preserve source order, duplicates, original indices, and caveats.Change and scope
Reuse the existing provider-neutral native-observation and native-context contracts; do not add another tool or change
xrefsinput. Existing source Evidence stays the owner. Pages contain untyped normalized addresses and do not assert reference kind or completeness. The separate Kuna pointer-omission and typed provenance problem in #8510 remains open.Contract and boundary impact
xrefsresult; response-budget recovery supplies its first page.inspect_analysis_viewschemas acceptxrefsparents; oversizedxrefserrors include a page continuation.xrefsitself has no newdetailinput and continues returning complete Evidence by default. CLI view consumers share the projector.native-contextexposes limitations. Full raw Evidence remains accessible by bundle export. Page exhaustion applies to retained rows, not discovery coverage.Expected effects of the existing workflow:
Evidence and regression coverage
xrefsmatched that provider's complete result, including Ghidra's two addresses and Kuna's empty result; source caveats remained accessible. The target digest stayed unchanged. Kuna's empty result reflects the known omission in [Bug] Kuna 1.988 stored-pointer references disappear from xrefs and feature traces #8510.Validation performed
npm run test:focused -- tests/boundary/mcp/nativeObservationViewsMcp.test.ts src/application/analysisView/NativeObservationViews.test.ts— 16 passed.npm run check:fast— passed.npm run docs:check— passed.git diff --check— passed.format:checkon 16 files outside this PR. The same 16 untouched base files fail the pinned formatter locally; contributor PR fix(test): restore the two checks #8573 left red on main #8592 addresses those files. CI typecheck/lint did not complete after that failure. Test shard 4 also failed four Frida verifier fixture cases: the copied verifier cannot importdist/domain/fridaRemoteAddress.js. The same four failures reproduce withnpm run test:focused -- tests/boundary/process/providerVerifierCleanup.test.tson exact based3ab0faf5(macOS arm64, Node 24.22.1); the other four cases pass. Draft fix(test): load real Frida verifier address dependency #8596 corrects the fixture and passes all eight cases locally. Portable tests report the same four failures, and the required aggregate check failed.After merging main
75c3cab54into head8d38ee3cc, the branch tree exactly matches the temporary integration used for the 16 focused tests.check:fast,docs:check, andgit diff --checkpassed on the merged branch. On that matching tree, real Kuna 1.989 and Ghidra 12.1.4 compact/full MCP controls paged their retained address results; a previously exported 24,000-address prototype bundle also reconstructed in fresh target-free sessions in both profiles. A separate unmerged pointer prototype plus current main recovered a real 48,000-pointer overflow through the continuation; see the PR comments for scope and caveats. New CI results are pending.Compatibility, safety, and release
No existing input or complete-result shape changes. The view output schema gains an
xrefsparent variant and overflow errors gain an actionable continuation; clients caching strict schemas should refresh the catalog. No package, installer, or target authority change. Paged addresses do not contain provider-specific pointer kinds; a complete export remains the tested way to recover those raw rows.Author readiness
Human owner: