Skip to content

feat(analysis-view): add native inventory summaries and pages - #5378

Merged
gensokyo-dev merged 1 commit into
mainfrom
perf/4249-native-inventory-views-20261020
Oct 20, 2026
Merged

gensokyo-dev merged 1 commit into
mainfrom
perf/4249-native-inventory-views-20261020

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4249. Native procedure/name/string inventories can exceed the MCP response budget or flood context when only counts and a few rows are needed. Five existing tools now accept opt-in summaries; inspect_analysis_view returns selected fields and stable pages while preserving complete source Evidence.

Change and scope

  • Canonical native row semantics live in domain; CLI/MCP share the projector and existing Evidence registration/retention layer.
  • Default complete responses and original Evidence identities are preserved. Row identity uses parent ID plus source index, including duplicate addresses. String value selection retains decoding qualifications; source/provider/profile/query and unknown discovery coverage remain explicit.
  • Validated immutable sources reuse format validation without a second retained graph. Oversized complete responses provide a working retained-page continuation.
  • Existing read-only analysis scope; no new provider, target-execution, injection, mutation or protection-recovery capability. Additional maintainer scope decision is not applicable.

Evidence and validation

Real Ghidra 12.1.4 on Debian true and official jq 1.8.2 completed the count/first-four-row question through production stdio MCP. Actual old Evidence was imported, every row reconstructed, original records reexported unchanged, and 20 actual CLI file-source/MCP comparisons returned identical Evidence. Source artifacts stayed unchanged.

In the frozen 58d-based pairs, including discovery, arguments, replies, retries and export recovery, the cl100k serialization proxy changes 306,496→208,002 (true) and 590,032→208,302 (jq). These are estimates, not actual model usage. The catalog grows ~30 KB and selected delivery adds RPCs. jq warm task time regresses 2.521→6.916 s; both family peaks increase. No general latency/CPU/memory improvement is claimed.

The small pair's complete original Evidence matches exactly. Independent jq analyses vary alias-primary/generated-label observations, so the large pair compares requested facts; old-source full-page equivalence is verified separately. Failed/guard-stopped attempts and resource/coverage limits remain in the measurement record.

  • npm run test:focused -- … — 24 files / 305 tests passed; exact executed paths are in the receipt.
  • npm run check — passed, including module/architecture guards.
  • npm run docs:check — passed.
  • Post-rebase: 28 files / 325 tests passed, final field-selection rerun 2 files / 9 tests passed; final npm run check and npm run docs:check passed. Both actual old-source CLI/MCP full-page verifiers passed again against the final build.

Final main adds Protobuf schemas: its observed complete 209-tool catalog is 3,317,414 bytes. Earlier fixed-runtime performance samples retain their original pins; final-main timing/token pairs were not rerun.

Linux x86-64 Ghidra metadata workflows are qualified here. Other providers/platforms, actual model-host gains and complete application reconstruction remain unverified. Complete source/export access and unknown-artifact semantics are preserved. Source contracts and authored packaged-skill guidance are updated; ignored generated catalogs/build outputs are not committed.

Latest main synchronization: preserved 4eaf3a117 oversized-error protocol framing. Three affected files/11 tests, real old-source CLI/MCP verification and npm run docs:check passed again. Latest-head pre-push typecheck/lint passed (two tasks).

Author readiness

Human owner: @gensokyo-dev

The owner explicitly dictated these readiness declarations and authorized publication and merge in the working session; they are not inferred from CI or automated review.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T07:45:20.871573Z 59bd2d2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Retain complete native inventories while projecting selected rows through the shared CLI/MCP analysis-view layer. Preserve source identity, string qualifications, provenance and unknown discovery coverage; provide actionable overflow recovery.

Verify real Ghidra true/jq workflows, old Evidence full-page reconstruction and actual CLI/MCP parity. Record tokenizer proxies, added call/catalog costs, slower large warm queries and higher family memory peaks.

Co-authored-by: Kaoru0822 <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge; no blocking issue was found.

Summary

Adds opt-in summaries and selected pages for native procedure, name, and string inventories while retaining the complete source Evidence.

  • Native inventory tools can return summaries and selected pages of retained rows.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Native inventory call] --> B[Complete provider result]
  B --> C[Create original Evidence]
  C --> D{Requested detail}
  D -->|complete| E[Deliver complete Evidence]
  D -->|summary| F[Retain complete Evidence]
  F --> G[Return summary with parent ID]
  G --> H[inspect_analysis_view]
  E -->|oversized and retained| H
  H --> I[Page retained rows and selected fields]
Loading

Reviews (2) · Last reviewed commit: "feat(analysis-view): add native inventor..." · Reviewed by Greptile

@gensokyo-dev
gensokyo-dev force-pushed the perf/4249-native-inventory-views-20261020 branch from a165fc6 to 59bd2d2 Compare October 20, 2026 07:39
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review latest head 59bd2d2 after resolving the main protocol-framing documentation conflict; affected boundary tests, actual CLI/MCP verification, docs and pre-push checks passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 59bd2d2eef

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev merged commit 2538214 into main Oct 20, 2026
47 checks passed
@gensokyo-dev
gensokyo-dev deleted the perf/4249-native-inventory-views-20261020 branch October 20, 2026 07:59
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
3 tasks done
kangyishuai pushed a commit to kangyishuai/rea that referenced this pull request Oct 20, 2026
…ansition-view

Resolve conflicts with main's native inventory view (morluto#5378). Main now
gives each parent operation its own summary result schema, joined by a
union on parent_operation. Add browserScenarioSummaryViewResultSchema in
that style for this branch's summary instead of keeping the old shared
summary-body union. The inspect_analysis_view and CLI descriptions and
the generic unsupported-parent message are main's text plus this
branch's browser scenario additions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit to L13an/rea that referenced this pull request Oct 21, 2026
main (morluto#5378) moved official tools onto shared Evidence registration with native-inventory summaries, and morluto#5355 stopped repeating raw results that equal the normalized observation. Resolve by:
- adding procedure_pseudo_code to main's official summary operations;
- registering the pseudocode summary schema in main's per-operation summary union and view projector table;
- continuing pseudocode overflow to the native pseudocode page beside main's native-inventory continuation;
- applying this branch's description wording to main's inspect_analysis_view text;
- treating main's nullable view artifact when filtering scalar pseudocode locations;
- dropping a duplicate analysisDetailSchema import;
- expecting no raw_result copy and sizing the overflow fixture above the 10 MiB stdio budget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Opt-in summary delivery and retained pages for list_strings, list_procedures, list_names, and their search tools

2 participants