Skip to content

feat(evm): add retained interface summary delivery - #2308

Merged
N0zoM1z0 merged 4 commits into
mainfrom
feat/evm-interface-view-20261012
Oct 12, 2026
Merged

N0zoM1z0 merged 4 commits into
mainfrom
feat/evm-interface-view-20261012

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part of #2016. Add opt-in EVM interface summary delivery while keeping existing complete CLI/MCP calls usable. Questions about inferred selectors and identities no longer need full hex and duplicate producer stdout inline; unchanged complete Evidence remains retained and accessible.

Repeated SDK replies are 43–87% smaller for three public inputs. Twelve real Codex trials show mixed token/time results, so this PR does not claim a stable model speedup or uniform token saving.

Problem and expected behavior

inspect_evm_interface({path, encoding}) continues returning its complete Evidence. Selecting detail: "summary" returns a distinct linked inspect_analysis_view summary with all inferred candidates, offsets, arguments/mutability including null, identities, limitations and explicit unknowns. Bytecode hex and duplicate stdout remain accessible from the original parent. No interpreter work or provider selection is silently reduced.

{"name":"inspect_evm_interface","arguments":{"path":"/artifacts/runtime.hex","encoding":"hex","detail":"summary"}}

The returned normalized_result.parent_evidence_id selects retained functions, bytecode_hex, stdout or stderr pages through inspect_analysis_view. Summary coverage covers the returned candidate set; global discovery completeness remains unknown.

Change and scope

  • Reuse the existing view/retention owner and exact named EVM contract. Strip delivery selection before calling the unchanged provider.
  • Require retention before starting a selected-summary analysis. Fixed servers still support complete delivery.
  • Add pure EVM projection and preserve historical carrier identity, function order, original text and explicit unknowns through retained/inline views.
  • Add a public SDK/CLI migration verifier and curated repeated measurements. Generated replies, model transcripts, binaries and toolchains remain outside Git.

Contract and boundary impact

  • Semantic owner and earliest changed stage: MCP delivery selection; pure domain EVM view projection. Shared retention owner checks the prerequisite.
  • Contribution scope fit and linked maintainer decision: agreed additive, read-only continuation in feat: compatibility-first analysis efficiency and domain-module pilot #2016 of the existing EVM pilot from refactor(evm): bind offline analysis through a static descriptor #2261. New target execution/provider authority requiring a separate scope decision is not applicable.
  • CLI and MCP/tool-catalog contract: existing command/tool names, complete defaults and provider arguments preserved; optional EVM detail and EVM view kind added. Actual converted input/output schemas are checked. Only the EVM and generic-view definitions change against the pinned control; old schemas accept new default replies.
  • Provider/format/platform compatibility: unchanged bundled EVMole 0.9.3 and raw/hex inputs. Real-provider scope is Linux x64. No new host prerequisites or dependency changes.
  • Evidence/provenance contract: original complete record/parameters/raw result/ID preserved; distinct view ID links its parent; existing retention/close semantics unchanged. Inferred candidates and unknowns do not become verified ABI/deployment/runtime facts.
  • Target selection, authority and cleanup: same explicit local carrier/encoding, same owned bounded worker and service lifetime; retained views invoke no producer. Existing cancellation and cleanup retry boundaries remain covered.
  • Generated/package/installation impact: authored guide/skill updated; generated catalogs and packaged skills stay ignored. No version, release or installation/configuration change.

Expected effects:

  • Read explicit existing bytecode files or retained/portable Evidence.
  • Launch the existing bounded local analysis worker for an inspection.
  • Run existing analysis worker code; no target code or injected instrumentation.
  • Explicit migration verifier writes new caller-selected Evidence/output files using existing ledger workflows.
  • Contact network services.
  • Recover protected code or work around protections.
  • Unresolved scope or authority.

Evidence and regression coverage

  • 64 focused checks before rebase cover exact SDK schemas, old omitted/complete behavior, original retained records, inferred/null/diagnostic fields, paging without another producer call, historical identity failures, missing-retention preflight, healthy peers, cancellation and cleanup retry. Injected provider seams are boundary evidence, not real EVMole claims.
  • 21 actual SDK measurements include six paired fact/settings comparisons, old-client output-schema compatibility, new default parity, old-server fallback and separate retained proofs.
  • Three actual old-runtime EVM bundles pass new MCP import/view/export and CLI inline use; the source verifier additionally checks exact function/hex pages with the analysis limiter unavailable. Original records, IDs and source bytes remain unchanged.
  • All 59 existing real EVM CLI/MCP verifier cases pass with privately supplied solc 0.8.30/strace 6.1. Actual traces verify absent target exec/network sockets; owned descendants are cleaned up.
  • Six shared-domain public MCP regressions pass: SQLite WASM, ShareX, Obsidian inventory, NewPipe, OpenWrt region and jq/Ghidra entry analysis.

For evidence-bearing changes:

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

Validation performed

  • npm run test:focused -- tests/boundary/mcp/evmInterfaceMcp.test.ts tests/boundary/mcp/wasmArtifactMcp.test.ts tests/boundary/mcp/analysisViewMcp.test.ts src/application/analysisView/AnalysisViewService.test.ts src/domain/analysisView/analysisView.test.ts — 64 pass on the production feature.
  • npm run check and npm run docs:check — pass before rebase; one guarded static-check attempt was stopped at the unchanged early-stop threshold and retained, then the bounded retry passed.
  • After rebasing onto main 0043d9b134c0a353e8bf85c0bde4492275f1f720, the three affected MCP suites pass (30 tests), full static/docs gates pass, and real current-runtime Factory retained/Pool old-bundle SDK and CLI workflows pass. The guarded integrated static-check attempt is preserved; running the same single Turbo typecheck with less launcher overhead passes, then the full gate passes using that valid cache. Memory thresholds and required checks remain unchanged.

Compatibility, safety and release

  • Existing users can keep complete requests and existing Evidence; no migration step is required. Clients selecting the new option against older servers must discover schema support and use supported complete delivery when needed. The explicit experimental fallback is not a universal server guarantee.
  • Real-provider/platform proof is limited to recorded Linux workflows; Windows native/PE/DOS evidence remains at the prior checkpoint. Obsidian inventory is not full AST analysis; OpenWrt region inspection is not full firmware reconstruction. Browser and other provider lanes are not newly claimed.
  • Every real model answer matches exact core fields and observed Evidence IDs, but only three pass the existing verbatim ordered limitation-list check. Four others preserve every source string with extra statements/reordering; five paraphrase or omit source caveats. Strict reports remain unchanged. These are descriptive cost observations, not twelve fully qualified successes.
  • Cached/uncached usage varies. Five of six candidate model calls choose summary; one requests complete. Keep all trials. Final cgroup counters are unavailable after teardown and remain unverified. One CPU, 4 GiB hard memory, 3 GiB early-stop, no swap and bounded tasks remain enforced; no OOM-free performance guarantee is inferred from sampled counters.
  • No publication, deployment or version change. Existing unrelated REA defects remain in the requested private /tmp record.

Detailed pins, sizes, all pair costs, failed attempts, grading qualifications and reproduction: EVM interface summary checkpoint.

Before merge

  • Agreed concrete enhancement, scoped to feat: compatibility-first analysis efficiency and domain-module pilot #2016.
  • Material scope and authority questions resolved within existing static analysis.
  • One focused outcome; Conventional Commit title.
  • Changed behavior and meaningful failure paths covered.
  • Owning contracts, guide and authored skill updated.
  • Representative caller request and returned view/parent semantics documented.
  • Diff reviewed for secrets, unrelated changes and unsupported claims.
  • Current-head CI and manual final review completed at c575fb5390833d7d1b2957247bffc64755b43124; all 37 checks succeed. CI receipt. Bot review quota is exhausted, so automated approval is not claimed.

N0zoM1z0 and others added 4 commits October 12, 2026 18:41
Keep complete EVM output and provider inputs unchanged. Opt-in MCP summary retains original full Evidence and returns all inferred interface facts without hex or duplicate stdout; retained/portable reads preserve identity, uncertainty and original text. Reject unsupported retention before analysis. Verify exact SDK schemas, old defaults, portable sources, identity failures and peer views; record whole-question comparison and explicit old-server fallback.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Unwrap the named get_evidence_bundle result before locating original source records. Real SDK retained reads now verify full bytecode and original parameters without reanalysis; legacy complete calls and old-server summary fallback also pass. Preserve the initial failed harness receipt without attributing it to REA.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Record repeated real SDK/model comparisons including mixed token/time outcomes and strict limitation failures. Verify historical complete Evidence through public MCP and CLI with the producer limiter unavailable; preserve original records and input bytes. Keep generated receipts and artifacts outside Git.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Keep paired costs pinned to the original frozen runtimes. Record the clean latest-main rebase, 30 affected MCP tests, full static/docs gates and real retained/old-bundle SDK and CLI checks. Preserve the guarded static failure and lower-overhead successful retry without changing memory bounds.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@N0zoM1z0 N0zoM1z0 self-assigned this Oct 12, 2026
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants