Repository navigation
feat(native): page retained procedure references - #8588
Conversation
[Medium impact] The PR appears safe to merge based on this review; no new blocking issue was found. SummaryAdds opt-in summaries and retained pages for procedure references and unresolved calls.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Procedure reference observation] --> B[Complete parent Evidence]
B --> C{Requested detail}
C -->|complete| D[Complete result]
C -->|summary| E[Retain parent and return summary]
E --> F[Inspect retained parent]
F --> G[Exact filters and matching-row offset]
G --> H[Byte-bounded page with shared endpoints]
B --> I[CLI bundle with linked source Evidence]
I --> F
Reviews (20) · Last reviewed commit: "Merge branch 'main' of https://github.co..." · Reviewed by Greptile |
Codex Review Summary: ✅ CompletedThis 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. |
Keep one-shot Evidence bundle capture and linked source closure together, including snapshot replay and immutable bundle publication.
…-stacked Update the stacked branch with the base that now contains origin/main. Keep procedure-reference pages together with the landed feature-trace, value-trace, and batch-decompile views.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
A trace keeps linked sources on the result. Use those records for the undelivered source closure as well as the bundle, so a refused output does not report them as not captured.
…reference-stacked
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The merge of origin/main did not start the CI workflow for this head.
Keep the native feature-trace view description and main's batch-decompile status example that includes unavailable rows.
…-stacked Keep the procedure-reference description with the updated feature-trace text and the batch-decompile unavailable status example from main.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Retarget onto main after the feature-trace squash. Keep procedure-reference pages with the landed feature-trace and batch-decompile view text.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Size the candidate before building one canonical identity, and reuse that key for the selected-procedure and shared-endpoint checks.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…zing it When the JSON size already exceeds every stored identity, skip the canonical string and keep the row out of the page.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Avoid execution wording in the tool description, and give the CLI direction option the help text the catalog requires.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Keep one running maximum of stored identity bytes. A multibyte selected procedure is recognized when its JSON no longer fits the page.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The MCP tool has a CLI command, so it is no longer an MCP-only exception.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Use a 200,000-character multibyte selected procedure and a shorter ASCII endpoint so the old JavaScript length check drops the selected row.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The required check failed because the toolchain install exceeded 15 minutes. The same job completed on the previous head, and this commit does not change the procedure-reference behavior.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
# Conflicts: # src/contracts/analysisViewToolContracts.ts # tests/acceptance/tools/historicalCaptureResources.test.ts
Summary
A Ghidra procedure with many incoming references can produce an MCP response too large to inspect. Add an opt-in summary and retained pages for the procedure's references and unresolved calls, plus a one-shot CLI handoff. Refs #8587.
#8585, which supplied the underlying retained feature-view work, has merged. This branch has been reconciled with main at
f8bb792f; its procedure-reference view remains the change under review.Problem and expected behavior
On an 8,000-pointer fixture, Ghidra's
procedure_referencescompleted with 8,001 rows but exceeded the default MCP response budget. Exact-record retrieval also exceeded it; the complete export remained available. A caller seeking a small number of rows can now requestdetail: "summary"and page the retained parent without rerunning analysis.Change and scope
native-procedure-referencesview pages references or unresolved calls. Exact source/target filters apply to references, andsource_indexpreserves original order and duplicates.byte_limitedandnext_offsetidentify a shortened page; a single oversized row or page context returns a resource error with parent recovery. Complete parent Evidence is not modified.rea procedure-references ... --detail summary --evidence_output PATHsaves the complete result and linked source Evidence for offlineinspect-analysis-view. A missing source refuses publication.Contract and boundary impact
procedureReferencesSchemaowns the existing provider result; a retained view projects it without reinterpreting provider kinds. Contribution scope: existing static read-only provider operations; no new target execution, mutation, injection, or protection recovery.Expected effects of the existing workflow:
Evidence and regression coverage
healthEvidence and supported offline paging. Its repeated snapshot invocation re-observed the provider rather than proving snapshot-cache replay. Real Kuna 1.988 returnedcapability_unavailableand created no output bundle.(source, target, type)triples matched the complete exportedinspect_native_instructionobservation at the entry on this fixture. The target was unchanged and unexecuted. This is a function-specific comparison, not general equivalence; the instruction tool itself has no bounded view for this collection ([Design] Page retained native instruction references #8593).A controlled final-close cancellation with a real Ghidra project returned the completed procedure observation but omitted its already-captured linked source from the one-shot result; cleanup succeeded. This shared #8585 delivery boundary is tracked in #8589. Public-process cancellation and cleanup-failure recovery have not been reproduced.
Validation performed
CI follow-up: shard 5 hit
stdout maxBufferin the real HAR exhaustion test because its fixture sat near the default decoder heap threshold and its CLI/MCP calls had different inputs. Both calls now use the same explicit 64 MiB limit and sensitive value, retaining real exhaustion and recovery checks; a small separate MCP control preserves default-heap coverage. Merged main1a0e2c77f2, preserving both retained-view contracts. Node 24: 39 focused HAR and MCP view tests passed, plus 36 decoder configuration/error tests before the merge;check:fastandformat:checkpassed. Windows and Bun were not rerun. Hosted CI is pending.Reconciled with main
a67525cdafter the documentation move. Node 24.22.1 targeted procedure-reference view, parent-view, MCP and CLI suites passed 54 tests; staged diff check passed. Real-provider evidence below predates this integration and was not rerun.CI follow-up:
Static checksfailed on main's pre-existing formatting incliHelpDefaultAnnotations.test.ts; merged mainac30fbd6(which fixes it) into this branch. On Node 24.22.1, the fullformat:check, staged diff check and 54 focused tests passed after the merge. Hosted CI was restarted on the new head.After reconciling with main
f8bb792f, Node 24.22.1 focused source-view suites passed 49 tests and production-boundary MCP/CLI suites passed 5 tests. Changed conflict files passedoxfmt --check;git diff --cached --checkpassed.Real Ghidra and Kuna results below predate this integration; they were not rerun on the reconciled head.
Focused CLI/MCP boundary suites: 5 tests passed, including missing-source refusal and oversized-row recovery.
npm run check:fast,npm run docs:check, changed-fileoxfmt --check, andgit diff --checkpassed.Real-provider and schema checks above were performed on this host only. No target was executed.
Representative delivery measurement
One compact-MCP task requested the first and last of 3,001 incoming Ghidra references. Complete delivery used one call and 1,902,437 tokenx-estimated tokens for serialized SDK requests/replies; summary plus two pages used three calls and 9,904 estimated tokens. Additional compact catalog estimates were 161,639 and 161,760 respectively. Both selected original rows reconstructed identically. SDK serialization includes text and structured forms and may double-count; estimates are not model usage or billing.
Cold/warm elapsed seconds were 4.302/0.330 versus 4.040/0.258; sampled process-family CPU seconds 7.29/0.76 versus 7.57/0.71; sampled peak RSS MiB 948.7/1023.5 versus 918.2/946.3. One run each, 100 ms samples; server startup, catalog transfer and short-lived peaks are excluded. This demonstrates a delivery-shape tradeoff, not general latency or memory improvement. Both paths construct and retain the complete result.
Compatibility, safety, and release
No breaking change for existing calls that omit detail; the new CLI command and retained views are additive. Snapshot and source-closure behavior depends on #8585. Other hosts and providers remain unverified for the new workflow.
Author readiness
Human owner:
Before merge
type(scope): outcome.