Skip to content

perf(rust): query selected dependency facts from retained Evidence - #5815

Merged
gensokyo-dev merged 2 commits into
mainfrom
perf/5802-rust-dependency-views
Oct 21, 2026
Merged

gensokyo-dev merged 2 commits into
mainfrom
perf/5802-rust-dependency-views

Conversation

@gensokyo-dev

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

Copy link
Copy Markdown
Collaborator

Summary

Fixes #5802. A question about two embedded Rust crates previously returned every package and edge. Add opt-in first-call package/edge selection, summary delivery and retained queries to the existing CLI/MCP workflows; complete delivery and original Evidence identity stay unchanged.

For shipped Alpine Zellij (422 packages/1,063 edges), selecting serde and serde_derive returns their exact versions/sources/direct references in one call. The complete MCP inspect response shrinks 185,833 → 9,261 bytes, with the full parent still exportable.

Change and scope

The Rust domain owns exact intersecting filters, fields and matching-row pagination; both adapters use the shared Evidence projection/application layer. Indices retain original identity within the parent. Dependency vectors require explicit field selection. The small pager is shared with Go. Successful immutable-Evidence interpretation is reused only for that object's lifetime; mutable imports revalidate and every view checks subject identity.

Existing read-only ELF/PE/thin-Mach-O scope; maintainer decision not applicable. Missing sections, inferred compiler facts and unknown runtime coverage remain explicit. CLI compact delivery requires an exclusive Evidence output bundle. Existing provider limits/admission, complete graph construction and full-file reads remain. No new provider/tool, target execution, installation or dependency change. Authored guide/skill/contracts updated; generated catalogs/skills stay ignored.

Expected effects:

  • Read existing files or captured data.
  • Change files: only caller-selected Evidence outputs through existing publication/export paths.

Evidence and regression coverage

Measured task, corpus, raw-receipt hashes and limitations: official Alpine ripgrep 14.1.1 and Zellij 0.40.0, independently checked with GNU section extraction and Python zlib/JSON. Every package/edge, root/cycle result, section range, digest and complete exported parent matches. Applications were not executed.

Both lanes use two actual stdio SDK calls: inspect and export. Three alternating pairs per binary, bounded to one CPU/4 GiB. Offline cl100k estimates including all 212 input definitions once and all calls: Zellij 223,755 → 199,584 (−10.8%); ripgrep 200,603 → 199,584 (−0.5%). Full transport/output-schema accounting makes the small case more expensive. These are estimates, not model usage or a measured agent-host prompt.

Whole-task Zellij wall/CPU medians rise 4.957/4.782 → 5.671/5.441 seconds; diagnostic complete/selected controls show startup variation and do not isolate persistent compact-projection overhead. Peak family memory 610.3 → 604.3 MiB; ripgrep 569.0 → 587.3 MiB. No stable speedup or memory improvement claimed. All measured runs qualify exit/cleanup with zero resource events. The speculative JSON-sizing change was reverted after inconsistent results.

Tests exercise duplicate versions, both endpoint filters, empty selection, field omission, pagination, portable/retained reads after source deletion, immutable-cache trust, subject mismatch, malformed imports, missing metadata and delivery validation. Real shipped PE/Mach-O, larger graphs, warm retained-query performance and actual AI inference remain unmeasured.

  • Observed, derived and inferred claims remain distinguishable.
  • Artifact identity, source provenance and failed attempts remain preserved.
  • Unsupported, incomplete and uncertain outcomes remain visible.

Validation performed

  • npm run build:cached and npm run check — passed on measured source and the final rebased integration branch (typecheck, lint, format, knip, module/architecture guards).
  • Final rebased focused cohort: 144 tests / 13 files passed, including actual CLI/stdio SDK. Initial single-CPU mixed Go/Rust timeout passed in a two-CPU/4-GiB rerun without changing its timeout.
  • 12 real SDK task samples plus six diagnostic controls — passed complete parent/answer/source equality and qualified cleanup.
  • npm run docs:check and npm run verify:test-discovery — passed on the integration branch.
  • Final rebased real-artifact verification: SDK selected inspection/export on both binaries, plus CLI compact publication and portable Evidence-file queries on both — all passed; complete parents/selected facts/digests match, with qualified cleanup and zero resource events.

GitHub CI: static, source tests, build, docs, tool quality, package baseline and six integration shards passed. Shard 4 fails the existing WASM CLI schema assertion below; shard 7 was cancelled. No full-CI-green claim. The same sole assertion reproduces on untouched base a5f982de8 and PR head; Rust changed paths are outside that producer/test. Codex reports no findings and Greptile scores 5/5. All Rust CLI/MCP/format and new view acceptance specifications passed in CI. Merge uses the owner-authorized admin bypass for the unrelated base failure.

inspect-wasm-artifact options: advertised [], parser rejects [commandTimeoutMs]

Author readiness

Human owner: @gensokyo-dev

The following owner declarations are transcribed at the human owner's explicit standing instruction in this session. This records that instruction, not an independently witnessed human review by the agent.

  • 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 21, 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-21T07:55:07.915234Z d8225c5 PR opened
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed paths.

Summary

Adds optional Rust package and edge selection, summaries, and retained queries through the existing CLI and MCP workflows.

  • Rust dependency queries can return selected package and edge rows.
  • CLI and MCP keep complete Rust Evidence behind compact responses.
  • Rust dependency-view experiments record task comparisons and cost estimates.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Inspect selected binary"] --> B["Complete Rust Evidence"]
  B --> C["Default: return complete Evidence"]
  B --> D["Compact delivery"]
  D --> E["MCP: retain complete parent"]
  D --> F["CLI: write exclusive Evidence bundle"]
  E --> G["Shared Rust view projector"]
  F --> G
  H["Later retained or portable Evidence"] --> G
  G --> I["Summary or selected package/edge page"]
Loading

Reviews (1) · Last reviewed commit: "docs(perf): record Rust dependency task ..." · Reviewed by Greptile

@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

Final-head CI triage (d8225c5f2d1fd28e04a8a369b76c17d726b19896):

  • The only test assertion failure in shard 4 is tests/boundary/cli/cliInputSchemaRequired.test.ts:104: inspect-wasm-artifact options: advertised [], parser rejects [commandTimeoutMs].
  • An isolated detached checkout of untouched base a5f982de8dbe4b092cc20ab89d492b7e7028b758, with the same locked dependencies/Node 24.18.0, reproduces exactly that sole failure (5 other assertions pass). The current PR head does too. Both runs use one CPU/4-GiB guards with verified expected exit 1/cleanup and zero limit events. This establishes a pre-existing base failure, not a passing check. No WASM code or this schema test is changed by this PR.
  • Base/candidate log SHA-256: 09ff1c73ce69046969920a6f6f626dadfdf855d67e2bcd34d46a8691391501ac / 09d91e80c0e0507e9b8bc6a52a60ee5baa746bbda3f4600f491c8069ef7085bf. Executed command in each checkout: node scripts/run-exact-tests.mjs run --no-file-parallelism tests/boundary/cli/cliInputSchemaRequired.test.ts under the pinned toolchain and resource observer.
  • Changed Rust coverage passed in CI: new retained-view acceptance (2 tests, shard 3), Rust stdio MCP (3, shard 4), Rust image boundary (19, shard 6), existing Rust CLI (7, shard 8), plus the green source-test job. The final local related cohort is 144/144. All real ripgrep/Zellij CLI/MCP/portable Evidence checks passed with identical complete parent facts.
  • Six integration shards passed; shard 7 was cancelled after shard 4 failed. Static/source/build/docs/tool-quality/package gates passed. Codex has no findings and Greptile is 5/5 with no actionable issue.

The human owner explicitly authorized merging verified PRs with admin bypass when necessary. This merge bypasses the unrelated base assertion and consequent incomplete aggregate checks; it does not claim full CI success or fix WASM in this Rust change.

@gensokyo-dev
gensokyo-dev merged commit 5241597 into main Oct 21, 2026
40 of 44 checks passed
@gensokyo-dev
gensokyo-dev deleted the perf/5802-rust-dependency-views branch October 21, 2026 08:12
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
3 tasks done
kangyishuai pushed a commit to kangyishuai/rea that referenced this pull request Oct 21, 2026
…ansition-view

Resolve the inspect_analysis_view description conflict with main's Rust
dependency view (morluto#5815). The description keeps main's text and adds this
branch's capture_browser_scenario additions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added area: build Build, CI, packaging, and publishing performance Performance regressions, scaling limits, and bounded-resource work provider: rust Analysis provider / engine: rust labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing performance Performance regressions, scaling limits, and bounded-resource work provider: rust Analysis provider / engine: rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(rust): query selected dependency facts from retained Evidence

2 participants