Skip to content

feat(wasm): add opt-in first-call summary delivery - #2193

Merged
N0zoM1z0 merged 5 commits into
mainfrom
feat/wasm-summary-delivery-20261012
Oct 12, 2026
Merged

N0zoM1z0 merged 5 commits into
mainfrom
feat/wasm-summary-delivery-20261012

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Let a WASM interface/count question request inspect_wasm_artifact detail: summary on its first MCP call. Keep omitted/complete requests and CLI output complete, retain the original Evidence, and read selected exports through the existing parent-linked views. Refs #2016.

Prerequisite #2122 is merged at 58fb372071e56da9c5df0e37593ee3f0da6b64bc. This branch is rebased onto latest fetched main and targets main directly. This PR contains the bounded first-call delivery increment, not the whole analysis-efficiency roadmap.

Problem and expected behavior

The existing SQLite/CSS workflow first completes analysis, hits the MCP response ceiling, then reads retained summary and export views. A fitting Tree-sitter runtime reply can still deliver 6.43 MB when the question needs counts and four exports. Explicit summary delivery should return those metadata first without changing provider inputs or original source identity.

Nine real paired SDK comparisons preserve selected facts and complete source IDs. For the published VS Code Tree-sitter runtime, summary plus exact exports returns 18,891 bytes versus 6,433,872 bytes (about 99.7% less). These are result JSON bytes, not model tokens.

Ten actual Codex CLI trials preserve the 12 requested producer facts, real source references and profile cleanup. Three SQLite pairs report median total input 96,832 → 79,264 and answer time 61.521 → 55.656 seconds; median uncached input increases. The two VS Code single pairs reduce total input but take longer. These observations support optional smaller delivery, not uniform speedup or a statistically established causal effect.

Change and scope

  • Add optional MCP delivery selection and its exact existing WASM summary carrier; strip delivery before the service call.
  • Reuse shared retained-analysis summarization and original Evidence lookup. Existing registration arguments remain valid; the optional lookup is appended.
  • Add meaningful default/explicit-complete, oversized continuation, exact parent identity, invalid WAT and unavailable-retention coverage.
  • Add two digest-verified published component inputs, one fixed interface question, actual advertised-schema capability validation, and concise measurements. Detailed JSON/transcripts/binaries stay outside Git.

Contract and boundary impact

  • Semantic owner and earliest changed stage: existing domain summary schema and shared application projection; MCP adapter owns optional delivery after complete production.
  • CLI/MCP catalog: optional detail: complete|summary; omitted and explicit complete preserve original behavior. CLI stays complete. Complete catalog grows 3,369 JSON bytes (about 0.14%). Clients discover actual schemas, including SDK-generated references.
  • Provider/format/platform: existing caller-supplied WABT 1.0.42, exact local artifact/glue/candidate choices and static WASM scope. No provider input/default change.
  • Evidence/provenance: same complete source record/ID, derived summary parent link, exact export forms and coverage/limitations. Fixed servers lacking retention reject summary while complete remains usable.
  • Process/authorization/cleanup: existing admission and service/process owners; target execution/fetch authority stays unchanged. Existing cleanup behavior is preserved.
  • Generated/package/install: authored contract/docs/skill changes; ignored outputs regenerated by existing build/CI. No package/version/installer change relative to the base.

Representative request:

{"name":"inspect_wasm_artifact","arguments":{"path":"/artifacts/module.wasm","detail":"summary"}}

Use the returned normalized_result.parent_evidence_id for inspect_analysis_view with view: {"kind":"wasm","facet":"exports","offset":0,"limit":4}. The complete source remains retained.

Evidence and regression coverage

  • Executed: three alternating paired public-SDK trials per shipped module; three SQLite model pairs and one pair for each VS Code component, requested gpt-5.6-terra high through Codex CLI 0.161.0. Requested alias does not prove resolved server-side model identity.

  • Tests: exact SDK-converted 2020-12 schemas; old/default/complete requests; delivery stripped before production; same source identity; summary/export continuation without provider rerun; invalid WAT digest; fixed-server missing retention.

  • Proof gaps: small stochastic model sample, uncontrolled remote/cache latency and Linux-only WABT scope. This does not prove whole application/runtime behavior or other provider/OS domains.

  • Resource qualification: cohorts used last-sampled counters. Regrading all ten existing answers after feat(analysis): add opt-in retained inventory and WASM views #2122's counter-closeout correction preserves facts/IDs/cleanup but marks final resource conditions unverified. Active controls were one CPU, 4 GiB hard/3 GiB early-stop, no swap; observed model peaks 656–944 MiB. No absent-late-event or fully resource-qualified performance claim is made. Review-only corrections do not rerun unrelated model/provider/build tests.

  • 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

  • Prototype full static/docs gates and 54 focused assertions passed.
  • Rebased build:cached, check:fast, docs:check, 29 focused assertions across WASM MCP/service/schema files, and verify:wasm:package passed (42 actual WABT CLI/MCP cases after private-prefix installation).
  • Final pinned runtime: build:cached, check:fast, seven WASM MCP workflows passed again after carrying the substantive source-identity fixes.
  • measure.mjs / compare.mjs: 9/9 paired fact/settings/source-ID comparisons pass; actual agent-trial.py / factual review: 10/10 selected answers pass, with final resource conditions separately unverified.
  • Related resource parser/short-command and existing-answer regrading probes pass. Latest changes are documentation/research-driver-only; production/bridge/bootstrap/package/skill sources are byte-unchanged from the measured candidate.
  • After the prerequisite merge and latest-main rebase: seven relevant WASM MCP workflows and one fresh real-WABT SQLite SDK workflow pass; selected facts and original source ID match the pinned candidate. Intervening main logging/CLI/CI changes remain preserved. No unrelated provider/model/package cohort is repeated.
  • Formatting, diff and required pre-push type/lint checks passed. The latest-main gate was a cache miss; it is the mandatory gate, not a repeated full local matrix.

Complete pinned methods, failures, usage, timing and scope.

Compatibility, safety, and release

  • Migration: explicit opt-in; old requests keep complete output and source identity. This covers recorded workflows, not every historical client.
  • Real providers: actual Linux WABT on SQLite and two published VS Code WASM components. Other domains retain feat(analysis): add opt-in retained inventory and WASM views #2122's separately qualified verification scope; they are not rerun for this WASM-only change.
  • Package/release: version and dependencies unchanged; no publication or deployment.
  • Containment/privacy: existing provider authority; original caller values preserved, no ambient environment dump. Binaries, raw results, auth/profile state and generated JSON are excluded from Git.

Review checklist

  • Concrete agreed enhancement with one focused outcome and Conventional Commit title.
  • Related issue and prerequisite PR linked.
  • Changed behavior and meaningful failures covered.
  • Owning contracts, docs and authored skill updated.
  • Representative MCP flow included.
  • Final diff checked for secrets, unrelated cleanup and unsupported claims.

@N0zoM1z0 N0zoM1z0 self-assigned this Oct 12, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T13:33:11.435343Z 030899a New commits
ℹ️ 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.

Base automatically changed from feat/compatibility-first-analysis-20261012 to main October 12, 2026 13:17
N0zoM1z0 and others added 5 commits October 12, 2026 13:19
Retain complete original WASM Evidence and return its exact typed summary on explicit MCP detail selection. Preserve omitted/complete requests, provider parameters, source IDs, existing CLI output and cleanup authority. Reuse retained views for selected exports without intentionally overflowing transport first.

Add two digest-verified published VS Code Tree-sitter inputs, a shared interface question and a schema-discovered measurement path. Full static/docs checks and 54 focused assertions pass; repeated real-artifact/model performance remains to be measured.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Resolve SDK-generated JSON Schema references through the declared 2020-12 validator before selecting summary delivery. Archived live catalogs reject summary on the control runtime and accept it on the candidate. Earlier repeated runs did not select the new delivery path and are excluded from benefit claims.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Pin the reviewed control and candidate runtime fingerprints, all nine successful paired SDK fact/source-ID comparisons, complete call/error accounting, and delivery/time/CPU/memory observations. Preserve slower and variable outcomes, schema-detection false starts, static memory-high events and the distinction between bytes and model tokens. Detailed generated receipts stay outside Git; real-model verification is pending.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Record all ten selected-fact/source/profile checks, reported cached and uncached token usage, call/error accounting and descriptive answer times. Preserve increased VS Code latency and SQLite uncached input instead of claiming universal speedups. Regrade existing answers after the resource-counter correction and mark final resource conditions unverified without repeating analyzer/model runs.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Rebase onto latest main after #2122 merges. Seven relevant WASM MCP workflows and one fresh real-WABT SQLite SDK request pass, preserving selected facts and original source identity. Keep original cohort fingerprints and counter qualifications; do not repeat unrelated provider/model/package tests for this integration.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@N0zoM1z0
N0zoM1z0 force-pushed the feat/wasm-summary-delivery-20261012 branch from bf64e90 to 030899a Compare October 12, 2026 13:30
@N0zoM1z0
N0zoM1z0 merged commit 0b71453 into main Oct 12, 2026
32 checks passed
@N0zoM1z0
N0zoM1z0 deleted the feat/wasm-summary-delivery-20261012 branch October 12, 2026 14:01
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added enhancement New feature or request 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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants