[GH-ISSUE #6900] perf(native): select retained PE and ELF export facts #4233

Closed
opened 2026-10-31 00:47:55 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @gensokyo-dev on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6900

inspect_native_exports currently exposes only the complete PE/ELF export table. A caller asking for a few names cannot select rows or consume a retained export page.

Observed on main 5d2c8c2b78d2552da0e13a11d3e2678efb69810d, Linux x64, Node 24.22.1/npm 11.16.0, through the built public CLI and production stdio MCP:

  • /usr/lib/x86_64-linux-gnu/libLLVM-14.so.1 (109,967,296 bytes, SHA-256 436887791de0478d72c8323be99df69d6d0cf82745e5abec79d5e0374f4df560) yields 44,459 exports, complete table coverage, and 13,648,070 bytes of CLI JSON.
  • The same default MCP request completes analysis but returns resource_constraint at the default 10 MiB response budget. Complete Evidence remains retained; the existing analysis-view projector has no export-table view.
  • The baseline contains one completed CLI observation and one refused MCP delivery, not repeated comparative performance evidence. Model tokens are unmeasured.

Proposed bounded correction: reuse detail: summary and inspect_analysis_view for retained exports/issues, exact names/original indices, selected fields and stable paging. CLI and MCP use the same projector. Keep complete delivery as the default, the complete parent retrievable, all same-name versions/aliases, original order, exact encoding facts, source coverage and partial/unknown semantics. Do not add an engine, execution authority, or a filesystem-result cache.

Verify real libLLVM plus a small shared-library control with independent readelf checks, equivalent completed workflows, catalog/arguments/replies token estimates, elapsed/CPU/family peak memory, resource guards and cleanup. Boundary tests cover PE ordinals/forwarders, ELF versions/bytes, partial/unsupported parents, historical omissions, invalid selections, Evidence links, and actual SDK-converted schemas.

Related: #6426 reports other native delivery bottlenecks; this issue covers only the portable export-table workflow. #6792 owns ELF dynamic-segment discovery correctness separately; selected views must preserve its current source coverage and do not fix that parser limitation.

Originally created by @gensokyo-dev on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6900 `inspect_native_exports` currently exposes only the complete PE/ELF export table. A caller asking for a few names cannot select rows or consume a retained export page. Observed on main `5d2c8c2b78d2552da0e13a11d3e2678efb69810d`, Linux x64, Node 24.22.1/npm 11.16.0, through the built public CLI and production stdio MCP: - `/usr/lib/x86_64-linux-gnu/libLLVM-14.so.1` (109,967,296 bytes, SHA-256 `436887791de0478d72c8323be99df69d6d0cf82745e5abec79d5e0374f4df560`) yields 44,459 exports, complete table coverage, and 13,648,070 bytes of CLI JSON. - The same default MCP request completes analysis but returns `resource_constraint` at the default 10 MiB response budget. Complete Evidence remains retained; the existing analysis-view projector has no export-table view. - The baseline contains one completed CLI observation and one refused MCP delivery, not repeated comparative performance evidence. Model tokens are unmeasured. Proposed bounded correction: reuse `detail: summary` and `inspect_analysis_view` for retained exports/issues, exact names/original indices, selected fields and stable paging. CLI and MCP use the same projector. Keep complete delivery as the default, the complete parent retrievable, all same-name versions/aliases, original order, exact encoding facts, source coverage and partial/unknown semantics. Do not add an engine, execution authority, or a filesystem-result cache. Verify real libLLVM plus a small shared-library control with independent `readelf` checks, equivalent completed workflows, catalog/arguments/replies token estimates, elapsed/CPU/family peak memory, resource guards and cleanup. Boundary tests cover PE ordinals/forwarders, ELF versions/bytes, partial/unsupported parents, historical omissions, invalid selections, Evidence links, and actual SDK-converted schemas. Related: #6426 reports other native delivery bottlenecks; this issue covers only the portable export-table workflow. #6792 owns ELF dynamic-segment discovery correctness separately; selected views must preserve its current source coverage and do not fix that parser limitation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4233
No description provided.