Skip to content

fix(native): page every retained function dossier collection - #1507

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
fix/native-view-complete-facets
Oct 10, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
fix/native-view-complete-facets

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

Since a9ee236, inspect_analysis_view is the documented way to read an analyze_function dossier that exceeds the MCP response budget (#1247). Its native facets covered procedure, pseudocode, assembly, callers, callees, incoming_references, outgoing_references and the value-flow facets. The rest of functionDossierSchema could not be read from retained Evidence at all:

  • basic_blocks, which grows with function size just like assembly;
  • comments;
  • unresolved_calls;
  • referenced_strings and referenced_names;
  • native_api, the full API-boundary record. Views only folded its limitations and unknowns into the parent fields.

When one of these is what an agent needs from an oversized dossier, the only remaining route is to export the complete Evidence.

Change

  • New native facets: basic_blocks, comments, unresolved_calls, referenced_strings, referenced_names. They page by rows, with the same offset, limit and coverage rules as assembly.
  • New singleton facet native_api (offset must be 0). It returns the recorded boundary, or {available: false, reason: "not recorded"} when the dossier has none.
  • unresolved_calls is optional in the dossier schema. When it is absent the facet reports "not recorded". Only value-flow facets inherit the value-flow failure reason; otherwise the shared fallback would report a misleading reason here.
  • The tool description, docs/mcp-contracts.md and the skill's native reference list the new facets.

This is additive: existing facets and their results are unchanged.

Verification

  • A new test in src/domain/analysisView/analysisView.test.ts pages each new collection, checks the absent-unresolved_calls reason while value flow is unavailable, and checks the native_api singleton.
  • npx vitest run src/domain/analysisView src/application/analysisView passes (25 tests).
  • npm run test:focused -- tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/toolSchemaValidity.test.ts tests/boundary/mcp/contractPresentation.test.ts passes (20 tests).
  • npm run check:fast and npm run docs:check pass.
  • I did not run real Ghidra or Hopper. The change projects already-retained dossier fields and uses the existing Ghidra dossier fixture.

🤖 Generated with Claude Code

inspect_analysis_view is the recovery path when an analyze_function
dossier exceeds the MCP response budget, but its native facets covered
only procedure, pseudocode, assembly, callers/callees, references, and
value flow. Basic blocks, comments, unresolved calls, referenced strings
and names, and the native API record could not be read from retained
Evidence at all; basic blocks grow with the function just like assembly.

These are now facets: collections page by rows, and native_api is a
singleton. A dossier without an unresolved_calls record reports "not
recorded" rather than the value-flow failure reason.

Refs #1247 and #1065.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 911323c into main Oct 10, 2026
19 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the fix/native-view-complete-facets branch October 10, 2026 08:31
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…#1507)

inspect_analysis_view is the recovery path when an analyze_function
dossier exceeds the MCP response budget, but its native facets covered
only procedure, pseudocode, assembly, callers/callees, references, and
value flow. Basic blocks, comments, unresolved calls, referenced strings
and names, and the native API record could not be read from retained
Evidence at all; basic blocks grow with the function just like assembly.

These are now facets: collections page by rows, and native_api is a
singleton. A dossier without an unresolved_calls record reports "not
recorded" rather than the value-flow failure reason.

Refs morluto#1247 and morluto#1065.
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants