[PR #5274] [MERGED] fix(wasm): refuse unretained summary delivery before provider work #6851

Closed
opened 2026-11-01 21:43:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5274
Author: @Y0UW1SH
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @morluto

Base: main ← Head: fix/5100-wasm-summary-retention-preflight


📝 Commits (9)

  • 418a66d fix(wasm): refuse unretained summary delivery before provider work
  • 1b29fa6 fix(wasm): validate caller paths before the summary retention preflight
  • f6f74b2 refactor(wasm): inspect validated artifact input without reparsing it
  • e7bc07c fix(wasm): keep cancellation ahead of raw artifact input validation
  • 362796e Merge upstream main into fix/5100-wasm-summary-retention-preflight
  • d413b5b Merge upstream main into fix/5100-wasm-summary-retention-preflight
  • 86e4e70 Merge remote-tracking branch 'origin/main' into codex/blockers-5274
  • ce78a9b Merge upstream main into fix/5100-wasm-summary-retention-preflight
  • 374e321 Merge upstream main into fix/5100-wasm-summary-retention-preflight

📊 Changes

4 files changed (+91 additions, -15 deletions)

View changed files

📝 docs/mcp-contracts.md (+3 -1)
📝 src/application/wasm/WasmArtifactService.test.ts (+22 -0)
📝 src/server/registerWasmTools.ts (+10 -5)
📝 tests/boundary/mcp/wasmArtifactMcp.test.ts (+56 -9)

📄 Description

Summary

inspect_wasm_artifact with detail: "summary" ran the WASM provider before checking whether the server can retain Evidence. On a fixed MCP server without session retention (the embedder/test seam createServer({ kind: "fixed", ... })), a successful provider run was followed by capability_unavailable, and a failing provider run replaced that diagnostic with the provider's own error, so the caller never learned that selecting detail: "complete" is the fix. The handler now checks retention before entering the provider, as the EVM, pcap and network-capture handlers already do. Fixes #5100.

Problem and expected behavior

Trigger: a server created without a session (no recordEvidence/evidenceById), then inspect_wasm_artifact with detail: "summary".

Observed on main (0e62094b6): the provider was invoked once per summary request. With a succeeding provider the response was capability_unavailable ("This server does not retain Evidence. Select detail complete …"); with a failing provider the response was the provider's error instead (invalid_request in the issue's probe), hiding the retention diagnostic.

Expected: requireAnalysisViewRetention documents itself as "Fail before analysis when selected delivery cannot keep its complete source", docs/managed-code-analysis.md promises that summary is rejected before analysis, and registerEvmTools, registerPcapTools, registerWebNetworkCaptureTool and the shared retainedSummaryDelivery.preflight all refuse before provider work. The WASM handler should refuse with the same capability_unavailable diagnostic and zero provider calls, and complete delivery (omitted or explicit detail: "complete") should keep working on the same server.

Change and scope

  • src/server/registerWasmTools.ts: after the contract parse (which, since upstream cdd718ffb, rejects relative paths through the shared absoluteLocalPathStringSchema, so malformed input keeps its field-specific invalid_request), a detail: "summary" request runs requireAnalysisViewRetention(contract.name, retention) and returns its error when the server retains no Evidence; only then does service.inspect run. The summary projection after a successful inspection reuses the same retention object. Complete delivery and the retained-session summary path are unchanged.
  • src/application/wasm/WasmArtifactService.ts, src/composition/wasm.ts, src/server/createServer.ts: unchanged from upstream main. Earlier revisions of this PR added validate() and inspectValidated() so the handler could validate paths before the preflight without reparsing (commits 1b29fa631, f6f74b201, e7bc07c3c); after upstream cdd718ffb moved absolute-path validation into the shared contract schemas, that split became redundant and was dropped in the merge ce78a9bf1.
  • docs/mcp-contracts.md: the shared detail paragraph keeps the general capability_unavailable refusal for all six tools and states the before-analysis ordering only for inspect_artifact, inspect_wasm_artifact, inspect_macho and decode_interface_builder, which enforce it (inspect_artifact, inspect_macho and decode_interface_builder through retainedSummaryDelivery.preflight in registerEvidenceTools, WASM through this PR); inspect_binary_layout and analyze_javascript_application are excluded from that claim until their handlers gain the preflight.
  • tests/boundary/mcp/wasmArtifactMcp.test.ts: the existing fixed-server test gains a vi.fn provider and asserts it stays idle (see below).

Intentionally not included: registerBinaryDiagnosticsTools (inspect_binary_layout) and registerElectronTools (analyze_javascript_application) have the same ordering on a fixed server; they are separate contracts with their own tests and are left for a follow-up so this PR stays one outcome.

Maintainer scope decision: not applicable (ordinary fix within an existing offline inspection; no new provider, execution, injection or mutation).

Contract and boundary impact

  • Semantic owner and earliest changed stage: the inspect_wasm_artifact MCP handler, after schema validation and inside the admitted operation, before the provider call.
  • Contribution scope fit and linked maintainer decision: existing offline WASM inspection; none required.
  • CLI and MCP/tool-catalog contract: input and output schemas unchanged; the summary refusal keeps its existing code and text and now precedes provider work. CLI is unaffected (CLI output is always complete).
  • Provider, bridge, target-format, or platform compatibility: none; the WABT provider is reached only when the request can be fulfilled.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged; no Evidence is produced for a refused summary, as before.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none (metadata:check passed inside npm run check).

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/mcp/wasmArtifactMcp.test.ts, test "rejects malformed paths, refuses WASM summary delivery before provider work when retention is unavailable, and keeps fixed-server complete delivery" (replaces "requires retention for WASM summary delivery while keeping fixed-server complete delivery"). Against a fixed server with an injected vi.fn WASM provider it asserts: summary returns capability_unavailable containing "does not retain Evidence" with the provider never called; a summary request with relative path and glue_paths returns invalid_request listing both issue paths, still with no provider call; omitted and explicit detail: "complete" both return the complete fixture Evidence (two provider calls); after switching the provider to return an AnalysisInputError, a further summary request still returns capability_unavailable with "Select detail complete" and the call count stays at two.

  • Base reproduction or other evidence: executed. On main (0e62094b6) the new test fails at the first provider assertion:

    AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times
      1st vi.fn() call: [ { candidate_paths: [], glue_paths: [], path: "/artifacts/module.wasm" }, { signal: AbortSignal {…} } ]
    

    With the fix, all 11 tests in the file pass. The malformed-path assertion added in the review follow-up was run against the first commit of this PR (418a66d7d) and failed with expected capability_unavailable to be invalid_request; it passes on 1b29fa631.

  • User-visible CLI/MCP output: unchanged text. A fixed server now answers a summary request with the existing typed error before any provider work: code: "capability_unavailable", message "This server does not retain Evidence. Select detail complete to receive the complete analysis inline." Complete delivery on the same server returns the complete inspect_wasm_artifact Evidence as before.

  • Remaining proof gaps: mocked provider only; no real WABT run (the change does not touch provider code). The ordinary session-backed stdio server retains Evidence and is not affected by the reordering beyond the shared summary path, which tests/boundary/mcp/wasmArtifactMcp.test.ts and tests/boundary/mcp/analysisViewMcp.test.ts keep covering.

For evidence-bearing changes:

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

Validation performed

Windows 11 x64, Node 24.21.0, locked dependencies (npm ci), base main at 0e62094b6.

  • node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/wasmArtifactMcp.test.ts before the fix — 1 failed (the new provider-idle assertion, output above), 10 passed.
  • Same command after the fix — 11 passed.
  • Review follow-up (1b29fa631): the same WASM mcp-boundary file — 11 passed; node node_modules/vitest/vitest.mjs run tests/composition/evmModuleContract.test.ts — 2 passed; the new malformed-path assertion against the previous handler — failed as quoted above; npm run check:fast — passed; npx oxfmt --check on all six changed files — formatted; node scripts/check-doc-facts.mjs — passed.
  • Follow-up (f6f74b201, no reparse): the WASM mcp-boundary file — 11 passed (the cancellation test now spies inspectValidated); WasmArtifactService.test.ts — 12 passed; tests/composition/evmModuleContract.test.ts — 2 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed; npx oxfmt — formatted.
  • Follow-up (e7bc07c3c, cancellation precedence): src/application/wasm/WasmArtifactService.test.ts gains "gives cancellation precedence over malformed raw input" (aborted signal plus path: "relative.wasm" returns AnalysisCancelledError with no provider call; it failed against the f6f74b201 service with AnalysisInputError) — 13 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed; npx oxfmt — formatted.
  • Merge of upstream main 01788bac8 (362796e4c): one conflict in WasmArtifactService.ts, where #5798 added a tool_profile.timeout_ms check that now reads the validated input; after npm ci, WasmArtifactService.test.ts — 21 passed; the WASM mcp-boundary file — 11 passed; tests/composition/evmModuleContract.test.ts — 2 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed.
  • Merge of upstream main 4e2816662 (d413b5bdf): one conflict in WasmArtifactService.ts, where #6144 passes the caller abort reason into AnalysisCancelledError; both abort guards on this branch (raw inspect() and inspectValidated()) now carry options.signal.reason; WasmArtifactService.test.ts — 21 passed (including the upstream abort-reason assertion); the WASM mcp-boundary file — 11 passed; tests/composition/evmModuleContract.test.ts — 2 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed.
  • Merge of upstream main 957bcfa14 (ce78a9bf1), on top of the maintainer's own merge 86e4e70f6: conflicts in WasmArtifactService.ts and createServer.ts resolved by returning the service, composition and server typing to upstream and keeping only the preflight in the handler; after npm ci, WasmArtifactService.test.ts — 22 passed; the WASM mcp-boundary file — 11 passed (the malformed-path assertion now expects the shared issue shape, expected: "regex" with message "must be an absolute local filesystem path"); tests/composition/evmModuleContract.test.ts — 2 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed.
  • Merge of upstream main 7501911f1 (374e3213f), no conflicts: the CI failure on ce78a9bf1 (javascriptArtifactReconstruction.test.ts > "reports file progress and honors cancellation before the next source", in Portable tests and the test shards) was inherited from main, where the same test failed at 304c97836; upstream a6b931257 rewrites that assertion and is included here. WasmArtifactService.test.ts — 22 passed; the WASM mcp-boundary file — 11 passed; tests/composition/evmModuleContract.test.ts — 2 passed; tests/boundary/cli/wasmLateCancellationCli.test.ts — 1 passed; npm run check:fast — passed.
  • node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/evmInterfaceMcp.test.ts tests/boundary/mcp/analysisViewMcp.test.ts — 2 files, 31 passed.
  • npm run check:fast — passed.
  • npm run check (typecheck, lint:built, format:check, knip, metadata:check, architecture guards) — passed.
  • npx turbo run compile --force and npx turbo run artifacts:skills — passed (npm run build:cached restored no dist/ into this fresh worktree, so the tasks were run directly).
  • node scripts/check-doc-facts.mjs (against that build) — passed.
  • npx oxfmt --check src/server/registerWasmTools.ts tests/boundary/mcp/wasmArtifactMcp.test.ts docs/mcp-contracts.md — formatted.
  • npx jscpd over the five register*Tools handler files that share this pattern, before and after — 4 clones became 3 (the WASM handler now matches the EVM handler as one larger clone instead of two smaller ones); no new duplicated region.
  • Not run: Linux/macOS, real WABT provider (REA_WABT_BIN_DIRECTORY), npm run check:pr.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Callers that already selected detail: "complete" on a fixed server are unaffected; callers that selected summary there receive the same error, earlier and regardless of provider outcome.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable; no external provider is involved in the changed path.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: the WABT subprocess is no longer launched for a request that cannot be delivered; no new file, process or network access.

Author readiness

Human owner: @Y0UW1SH

  • 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.

🤖 Generated with Claude Code

Maintainer blocker verification

Merged main 3dbe314ada9f6dcc994ca4655dc0faf082503847 without conflicts. On the resulting head, Node 24.18.0/npm 11.16.0, the focused WasmArtifactService and wasmArtifactMcp suites passed 32/32, check:fast and docs:check passed. Cases preserve cancellation/path-validation precedence, refuse unretained summaries before provider work, and retain complete-delivery controls. Hosted checks on the new head are separate and were still queued/running after push.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5274 **Author:** [@Y0UW1SH](https://github.com/Y0UW1SH) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/5100-wasm-summary-retention-preflight` --- ### 📝 Commits (9) - [`418a66d`](https://github.com/morluto/rea/commit/418a66d7d77827bb3f26d1543b21801c7ee5b56e) fix(wasm): refuse unretained summary delivery before provider work - [`1b29fa6`](https://github.com/morluto/rea/commit/1b29fa6318caa2c2bd94703cb3ab09e6a0c65265) fix(wasm): validate caller paths before the summary retention preflight - [`f6f74b2`](https://github.com/morluto/rea/commit/f6f74b201e629d455340d75269ab9dc1b71e4afb) refactor(wasm): inspect validated artifact input without reparsing it - [`e7bc07c`](https://github.com/morluto/rea/commit/e7bc07c3ca301c343e7cba1b49cf6ff10dc032ce) fix(wasm): keep cancellation ahead of raw artifact input validation - [`362796e`](https://github.com/morluto/rea/commit/362796e4c9680441bc788fe74c2c6bee0ec9e4d5) Merge upstream main into fix/5100-wasm-summary-retention-preflight - [`d413b5b`](https://github.com/morluto/rea/commit/d413b5bdfa419cb8ef9303fc81f68ce65ff1abae) Merge upstream main into fix/5100-wasm-summary-retention-preflight - [`86e4e70`](https://github.com/morluto/rea/commit/86e4e70f6623b93768ca6c3f506f7cbd91c4bd40) Merge remote-tracking branch 'origin/main' into codex/blockers-5274 - [`ce78a9b`](https://github.com/morluto/rea/commit/ce78a9bf1efa4a212196b7cf27de193480fe4422) Merge upstream main into fix/5100-wasm-summary-retention-preflight - [`374e321`](https://github.com/morluto/rea/commit/374e3213fc38b769e9bea4ec1e5c9513b60e1eca) Merge upstream main into fix/5100-wasm-summary-retention-preflight ### 📊 Changes **4 files changed** (+91 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/mcp-contracts.md` (+3 -1) 📝 `src/application/wasm/WasmArtifactService.test.ts` (+22 -0) 📝 `src/server/registerWasmTools.ts` (+10 -5) 📝 `tests/boundary/mcp/wasmArtifactMcp.test.ts` (+56 -9) </details> ### 📄 Description ## Summary `inspect_wasm_artifact` with `detail: "summary"` ran the WASM provider before checking whether the server can retain Evidence. On a fixed MCP server without session retention (the embedder/test seam `createServer({ kind: "fixed", ... })`), a successful provider run was followed by `capability_unavailable`, and a failing provider run replaced that diagnostic with the provider's own error, so the caller never learned that selecting `detail: "complete"` is the fix. The handler now checks retention before entering the provider, as the EVM, pcap and network-capture handlers already do. Fixes #5100. ## Problem and expected behavior Trigger: a server created without a session (no `recordEvidence`/`evidenceById`), then `inspect_wasm_artifact` with `detail: "summary"`. Observed on `main` (`0e62094b6`): the provider was invoked once per summary request. With a succeeding provider the response was `capability_unavailable` ("This server does not retain Evidence. Select detail complete …"); with a failing provider the response was the provider's error instead (`invalid_request` in the issue's probe), hiding the retention diagnostic. Expected: `requireAnalysisViewRetention` documents itself as "Fail before analysis when selected delivery cannot keep its complete source", `docs/managed-code-analysis.md` promises that summary is rejected before analysis, and `registerEvmTools`, `registerPcapTools`, `registerWebNetworkCaptureTool` and the shared `retainedSummaryDelivery.preflight` all refuse before provider work. The WASM handler should refuse with the same `capability_unavailable` diagnostic and zero provider calls, and complete delivery (omitted or explicit `detail: "complete"`) should keep working on the same server. ## Change and scope - `src/server/registerWasmTools.ts`: after the contract parse (which, since upstream `cdd718ffb`, rejects relative paths through the shared `absoluteLocalPathStringSchema`, so malformed input keeps its field-specific `invalid_request`), a `detail: "summary"` request runs `requireAnalysisViewRetention(contract.name, retention)` and returns its error when the server retains no Evidence; only then does `service.inspect` run. The summary projection after a successful inspection reuses the same `retention` object. Complete delivery and the retained-session summary path are unchanged. - `src/application/wasm/WasmArtifactService.ts`, `src/composition/wasm.ts`, `src/server/createServer.ts`: unchanged from upstream `main`. Earlier revisions of this PR added `validate()` and `inspectValidated()` so the handler could validate paths before the preflight without reparsing (commits `1b29fa631`, `f6f74b201`, `e7bc07c3c`); after upstream `cdd718ffb` moved absolute-path validation into the shared contract schemas, that split became redundant and was dropped in the merge `ce78a9bf1`. - `docs/mcp-contracts.md`: the shared `detail` paragraph keeps the general `capability_unavailable` refusal for all six tools and states the before-analysis ordering only for `inspect_artifact`, `inspect_wasm_artifact`, `inspect_macho` and `decode_interface_builder`, which enforce it (`inspect_artifact`, `inspect_macho` and `decode_interface_builder` through `retainedSummaryDelivery.preflight` in `registerEvidenceTools`, WASM through this PR); `inspect_binary_layout` and `analyze_javascript_application` are excluded from that claim until their handlers gain the preflight. - `tests/boundary/mcp/wasmArtifactMcp.test.ts`: the existing fixed-server test gains a `vi.fn` provider and asserts it stays idle (see below). Intentionally not included: `registerBinaryDiagnosticsTools` (`inspect_binary_layout`) and `registerElectronTools` (`analyze_javascript_application`) have the same ordering on a fixed server; they are separate contracts with their own tests and are left for a follow-up so this PR stays one outcome. Maintainer scope decision: not applicable (ordinary fix within an existing offline inspection; no new provider, execution, injection or mutation). ## Contract and boundary impact - Semantic owner and earliest changed stage: the `inspect_wasm_artifact` MCP handler, after schema validation and inside the admitted operation, before the provider call. - Contribution scope fit and linked maintainer decision: existing offline WASM inspection; none required. - CLI and MCP/tool-catalog contract: input and output schemas unchanged; the summary refusal keeps its existing code and text and now precedes provider work. CLI is unaffected (CLI output is always complete). - Provider, bridge, target-format, or platform compatibility: none; the WABT provider is reached only when the request can be fulfilled. - Evidence, artifact, provenance, or reconstruction contract: unchanged; no Evidence is produced for a refused summary, as before. - Target selection, authority, upstream behavior, and cleanup details: not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none (`metadata:check` passed inside `npm run check`). Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: `tests/boundary/mcp/wasmArtifactMcp.test.ts`, test "rejects malformed paths, refuses WASM summary delivery before provider work when retention is unavailable, and keeps fixed-server complete delivery" (replaces "requires retention for WASM summary delivery while keeping fixed-server complete delivery"). Against a fixed server with an injected `vi.fn` WASM provider it asserts: summary returns `capability_unavailable` containing "does not retain Evidence" with the provider never called; a summary request with relative `path` and `glue_paths` returns `invalid_request` listing both issue paths, still with no provider call; omitted and explicit `detail: "complete"` both return the complete fixture Evidence (two provider calls); after switching the provider to return an `AnalysisInputError`, a further summary request still returns `capability_unavailable` with "Select detail complete" and the call count stays at two. - Base reproduction or other evidence: executed. On `main` (`0e62094b6`) the new test fails at the first provider assertion: ```text AssertionError: expected "vi.fn()" to not be called at all, but actually been called 1 times 1st vi.fn() call: [ { candidate_paths: [], glue_paths: [], path: "/artifacts/module.wasm" }, { signal: AbortSignal {…} } ] ``` With the fix, all 11 tests in the file pass. The malformed-path assertion added in the review follow-up was run against the first commit of this PR (`418a66d7d`) and failed with `expected capability_unavailable to be invalid_request`; it passes on `1b29fa631`. - User-visible CLI/MCP output: unchanged text. A fixed server now answers a summary request with the existing typed error before any provider work: `code: "capability_unavailable"`, message "This server does not retain Evidence. Select detail complete to receive the complete analysis inline." Complete delivery on the same server returns the complete `inspect_wasm_artifact` Evidence as before. - Remaining proof gaps: mocked provider only; no real WABT run (the change does not touch provider code). The ordinary session-backed stdio server retains Evidence and is not affected by the reordering beyond the shared summary path, which `tests/boundary/mcp/wasmArtifactMcp.test.ts` and `tests/boundary/mcp/analysisViewMcp.test.ts` keep covering. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Windows 11 x64, Node 24.21.0, locked dependencies (`npm ci`), base `main` at `0e62094b6`. - `node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/wasmArtifactMcp.test.ts` before the fix — 1 failed (the new provider-idle assertion, output above), 10 passed. - Same command after the fix — 11 passed. - Review follow-up (`1b29fa631`): the same WASM mcp-boundary file — 11 passed; `node node_modules/vitest/vitest.mjs run tests/composition/evmModuleContract.test.ts` — 2 passed; the new malformed-path assertion against the previous handler — failed as quoted above; `npm run check:fast` — passed; `npx oxfmt --check` on all six changed files — formatted; `node scripts/check-doc-facts.mjs` — passed. - Follow-up (`f6f74b201`, no reparse): the WASM mcp-boundary file — 11 passed (the cancellation test now spies `inspectValidated`); `WasmArtifactService.test.ts` — 12 passed; `tests/composition/evmModuleContract.test.ts` — 2 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed; `npx oxfmt` — formatted. - Follow-up (`e7bc07c3c`, cancellation precedence): `src/application/wasm/WasmArtifactService.test.ts` gains "gives cancellation precedence over malformed raw input" (aborted signal plus `path: "relative.wasm"` returns `AnalysisCancelledError` with no provider call; it failed against the `f6f74b201` service with `AnalysisInputError`) — 13 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed; `npx oxfmt` — formatted. - Merge of upstream `main` `01788bac8` (`362796e4c`): one conflict in `WasmArtifactService.ts`, where #5798 added a `tool_profile.timeout_ms` check that now reads the validated input; after `npm ci`, `WasmArtifactService.test.ts` — 21 passed; the WASM mcp-boundary file — 11 passed; `tests/composition/evmModuleContract.test.ts` — 2 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed. - Merge of upstream `main` `4e2816662` (`d413b5bdf`): one conflict in `WasmArtifactService.ts`, where #6144 passes the caller abort reason into `AnalysisCancelledError`; both abort guards on this branch (raw `inspect()` and `inspectValidated()`) now carry `options.signal.reason`; `WasmArtifactService.test.ts` — 21 passed (including the upstream abort-reason assertion); the WASM mcp-boundary file — 11 passed; `tests/composition/evmModuleContract.test.ts` — 2 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed. - Merge of upstream `main` `957bcfa14` (`ce78a9bf1`), on top of the maintainer's own merge `86e4e70f6`: conflicts in `WasmArtifactService.ts` and `createServer.ts` resolved by returning the service, composition and server typing to upstream and keeping only the preflight in the handler; after `npm ci`, `WasmArtifactService.test.ts` — 22 passed; the WASM mcp-boundary file — 11 passed (the malformed-path assertion now expects the shared issue shape, `expected: "regex"` with message "must be an absolute local filesystem path"); `tests/composition/evmModuleContract.test.ts` — 2 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed. - Merge of upstream `main` `7501911f1` (`374e3213f`), no conflicts: the CI failure on `ce78a9bf1` (`javascriptArtifactReconstruction.test.ts` > "reports file progress and honors cancellation before the next source", in Portable tests and the test shards) was inherited from `main`, where the same test failed at `304c97836`; upstream `a6b931257` rewrites that assertion and is included here. `WasmArtifactService.test.ts` — 22 passed; the WASM mcp-boundary file — 11 passed; `tests/composition/evmModuleContract.test.ts` — 2 passed; `tests/boundary/cli/wasmLateCancellationCli.test.ts` — 1 passed; `npm run check:fast` — passed. - `node node_modules/vitest/vitest.mjs run --project mcp-boundary tests/boundary/mcp/evmInterfaceMcp.test.ts tests/boundary/mcp/analysisViewMcp.test.ts` — 2 files, 31 passed. - `npm run check:fast` — passed. - `npm run check` (typecheck, lint:built, format:check, knip, metadata:check, architecture guards) — passed. - `npx turbo run compile --force` and `npx turbo run artifacts:skills` — passed (`npm run build:cached` restored no `dist/` into this fresh worktree, so the tasks were run directly). - `node scripts/check-doc-facts.mjs` (against that build) — passed. - `npx oxfmt --check src/server/registerWasmTools.ts tests/boundary/mcp/wasmArtifactMcp.test.ts docs/mcp-contracts.md` — formatted. - `npx jscpd` over the five `register*Tools` handler files that share this pattern, before and after — 4 clones became 3 (the WASM handler now matches the EVM handler as one larger clone instead of two smaller ones); no new duplicated region. - Not run: Linux/macOS, real WABT provider (`REA_WABT_BIN_DIRECTORY`), `npm run check:pr`. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Callers that already selected `detail: "complete"` on a fixed server are unaffected; callers that selected `summary` there receive the same error, earlier and regardless of provider outcome. - Real Hopper/Ghidra, browser, or OS coverage: not applicable; no external provider is involved in the changed path. - Package or release metadata impact: none. - Security, privacy, process, or containment review: the WABT subprocess is no longer launched for a request that cannot be delivered; no new file, process or network access. ## Author readiness Human owner: @Y0UW1SH - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- maintainer-blocker-review --> ### Maintainer blocker verification Merged main `3dbe314ada9f6dcc994ca4655dc0faf082503847` without conflicts. On the resulting head, Node 24.18.0/npm 11.16.0, the focused WasmArtifactService and wasmArtifactMcp suites passed 32/32, check:fast and docs:check passed. Cases preserve cancellation/path-validation precedence, refuse unretained summaries before provider work, and retain complete-delivery controls. Hosted checks on the new head are separate and were still queued/running after push. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:43:31 +00:00
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#6851
No description provided.