[GH-ISSUE #5802] perf(rust): query selected dependency facts from retained Evidence #3513

Closed
opened 2026-10-31 00:41:20 +00:00 by bsakaguchi · 0 comments
Owner

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

Problem and observations

At main d672cc23998b, inspect_rust_binary accepts only path and returns the complete embedded dependency graph. A question about exact crate versions and a few dependency edges requires receiving all package/edge rows. Unlike existing Go/model workflows, Rust has no summary or retained selected-query path. Provider admission also serializes the entire report just to count bytes; later service validation and repeated source inspections add work.

Executed baseline, pinned Alpine v3.21 x86_64 packages:

  • ripgrep14.1.1-r0:42 packages /88 edges; complete CLI reply10,605 bytes.
  • Zellij0.40.0-r0:422 packages /1,063 edges; complete CLI reply86,805 bytes.
    GNU objcopy section extraction plus independent Python zlib/JSON matches every normalized package and edge, source section bytes and full artifact SHA-256. Applications were not executed. One-CPU4-GiB hard /3-GiB early-stop public CLI controls qualify with verified exit/cleanup and no limit events. These are observed reply sizes/correctness, not token or speedup claims. The completed equivalent SDK cohorts, token estimates, negative timing results and controls are now recorded in PR #5815 and experiments/analysis-efficiency/rust-dependency-views.md.

Intended task and scope

Answer an exact embedded crate/version/source question, retrieve the associated direct dependency relationships in batches, and export complete Evidence. Keep original package/edge identity and all matching versions, source provenance, null/missing-section distinctions, cycles, inferred compiler facts and uncertainty about actual runtime dependencies.

Extend the existing inspect and inspect_analysis_view workflows, not a new tool:

  • opt-in summary/direct selected delivery while preserving omitted/explicit complete behavior;
  • original-index package facts and edge pages, exact batch filters, selected fields and matching-row paging;
  • shared domain/application projection for CLI and MCP, retained reads without reopening the source;
  • reuse validation only for authenticated immutable Evidence within its lifetime; no live-file result cache;
  • evaluate temporary JSON sizing copies; the prototype replacement was reverted after inconsistent results, leaving producer admission unchanged.

This remains existing read-only ELF/PE/thin-Mach-O scope. No target execution, injection, mutation, installer/dependency change or new maintainer authority is involved. Avoid overlap with Rust WASM support #5069 and existing correctness fixes.

Acceptance / verification

  • Independent real-artifact facts and complete original Evidence identities agree before/after, including after removing an owned input copy.
  • Exact selection intersects filters; duplicates/variants, unknowns, missing metadata, explicit detail and source/subject mismatch remain meaningful.
  • Real CLI and production stdio SDK verify converted named schemas, selected answers, retained export and cleanup. Keep malformed, capacity, cancellation and cleanup regressions.
  • Compare equivalent completed tasks and a small control; include catalog/schemas, extra calls/retries, first/repeat timings, CPU and peak process-family memory. Label token estimates versus actual model usage and preserve negative results.
  • Refresh main before integration, use this issue's branch, run relevant checks, ready PR, automated review/CI and merge. No claim that every Rust workflow is qualified.

Related: coverage continuation #3135 and original Rust feature #2456.

Originally created by @gensokyo-dev on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5802 ## Problem and observations At main `d672cc23998b`, `inspect_rust_binary` accepts only `path` and returns the complete embedded dependency graph. A question about exact crate versions and a few dependency edges requires receiving all package/edge rows. Unlike existing Go/model workflows, Rust has no summary or retained selected-query path. Provider admission also serializes the entire report just to count bytes; later service validation and repeated source inspections add work. Executed baseline, pinned Alpine v3.21 x86_64 packages: - ripgrep14.1.1-r0:42 packages /88 edges; complete CLI reply10,605 bytes. - Zellij0.40.0-r0:422 packages /1,063 edges; complete CLI reply86,805 bytes. GNU objcopy section extraction plus independent Python zlib/JSON matches every normalized package and edge, source section bytes and full artifact SHA-256. Applications were not executed. One-CPU4-GiB hard /3-GiB early-stop public CLI controls qualify with verified exit/cleanup and no limit events. These are observed reply sizes/correctness, not token or speedup claims. The completed equivalent SDK cohorts, token estimates, negative timing results and controls are now recorded in PR #5815 and experiments/analysis-efficiency/rust-dependency-views.md. ## Intended task and scope Answer an exact embedded crate/version/source question, retrieve the associated direct dependency relationships in batches, and export complete Evidence. Keep original package/edge identity and all matching versions, source provenance, null/missing-section distinctions, cycles, inferred compiler facts and uncertainty about actual runtime dependencies. Extend the existing inspect and inspect_analysis_view workflows, not a new tool: - opt-in summary/direct selected delivery while preserving omitted/explicit complete behavior; - original-index package facts and edge pages, exact batch filters, selected fields and matching-row paging; - shared domain/application projection for CLI and MCP, retained reads without reopening the source; - reuse validation only for authenticated immutable Evidence within its lifetime; no live-file result cache; - evaluate temporary JSON sizing copies; the prototype replacement was reverted after inconsistent results, leaving producer admission unchanged. This remains existing read-only ELF/PE/thin-Mach-O scope. No target execution, injection, mutation, installer/dependency change or new maintainer authority is involved. Avoid overlap with Rust WASM support #5069 and existing correctness fixes. ## Acceptance / verification - Independent real-artifact facts and complete original Evidence identities agree before/after, including after removing an owned input copy. - Exact selection intersects filters; duplicates/variants, unknowns, missing metadata, explicit detail and source/subject mismatch remain meaningful. - Real CLI and production stdio SDK verify converted named schemas, selected answers, retained export and cleanup. Keep malformed, capacity, cancellation and cleanup regressions. - Compare equivalent completed tasks and a small control; include catalog/schemas, extra calls/retries, first/repeat timings, CPU and peak process-family memory. Label token estimates versus actual model usage and preserve negative results. - Refresh main before integration, use this issue's branch, run relevant checks, ready PR, automated review/CI and merge. No claim that every Rust workflow is qualified. Related: coverage continuation #3135 and original Rust feature #2456.
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#3513
No description provided.