[PR #4117] [MERGED] fix(verifiers): align WABT operation timeout #6067

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4117
Author: @N0zoM1z0
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/windows-wabt-mcp-timeout-4109


📝 Commits (5)

  • 5423ae0 fix(verifiers): align WABT MCP request timeout
  • 3318d80 Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109
  • ecd04ee fix(verifiers): bound packaged WABT workflow
  • fbc2685 Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109
  • 8ca19d1 Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109

📊 Changes

3 files changed (+18 additions, -6 deletions)

View changed files

➕ scripts/lib/wabt-verifier-timeouts.mjs (+4 -0)
📝 scripts/verify-packaged-wasm-artifact.mjs (+6 -1)
📝 scripts/verify-wasm-artifact.mjs (+8 -5)

📄 Description

Summary

The real Windows WABT verifier gave equivalent CLI and MCP inspections different fixed deadlines, so MCP expired at the SDK default 60 seconds and a later malformed CLI case could expire at 120 seconds. This change gives every WABT inspection one 240-second operation budget across both transports and gives the complete packaged workflow a shared 15-minute aggregate budget, preserving all parity, malformed-input, retained Evidence, residue, and cleanup checks.

Fixes #4109.

Problem and expected behavior

On an ordinary two-core Windows run, the verifier reached the production MCP inspection and failed with typed REQUEST_TIMEOUT at 60 seconds. Enabling the existing Node compile cache reproduced it. A 120-second MCP-only candidate passed that boundary, then the equivalent malformed CLI path reached its separate 120-second deadline and retained a workspace residue. Equivalent verifier operations need one budget large enough for the measured bounded workload.

Change and scope

  • Define one 240-second WABT verifier operation budget and one 15-minute aggregate workflow budget in a single verifier-owned module.
  • Apply the operation budget to public CLI artifact inspection and every MCP tool call, including bundle and malformed-input paths.
  • Apply the aggregate budget to the packaged wrapper so it cannot terminate one valid operation or skip child cleanup. The 15-minute limit covers the measured 647-second completed Windows workflow with about 39% margin.
  • Keep tool preflight, provider limits, fixtures, retries, cleanup, output, and product contracts unchanged.

Contribution scope: verifier-only correction for existing read-only WASM artifact analysis. No provider capability or authority changes; no maintainer scope decision is required.

Contract and boundary impact

  • Semantic owner and earliest changed stage: real WABT verification request supervision.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: unchanged; only verifier operation and aggregate wait policy changes.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • 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

  • Base reproductions: default and compile-cache Windows runs both failed at the SDK's 60-second MCP timeout and cleaned to Job0.

  • Intermediate 120-second candidate passed the original MCP failure, then retained a later malformed CLI timeout and workspace residue instead of hiding either fact.

  • Final real run passed all 42 WABT 1.0.42 cases: seven normal CLI/MCP schema, Evidence, identity, hash/bytes, WAT, section, glue/candidate, and retained-bundle comparisons plus both malformed inputs and their retained failed Evidence for every fixture.

  • Review follow-up on exact head ecd04eea840385caeb7b595c827845b6ff8c6c88: an ordinary-user Windows continuation from the extracted-package entrypoint passed the same 42 cases through the packaged wrapper in 363.28 seconds, exceeding the old 180-second cap, with empty stderr and Job0.

  • Full pack/install verification exposed four independent existing Windows verifier defects: npm command-script launching (#4125), CRLF tar-member parsing (#4128), child extraction into a leased private root (#4134), and transient installed-tree cleanup (#4136). Each is recorded separately. The continuation used explicit test-only bypasses for those prerequisites; it directly verifies this PR's nested timeout and cleanup path, but does not claim the full pack/install lane passed.

  • 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

  • npm run check:fast — passed on final head fbc268555adbf00c68c4cb38aaed16a8ff78abf3.
  • npm run test:focused -- tests/boundary/mcp/wasmArtifactMcp.test.ts src/wasm/WabtArtifactProvider.test.ts src/wasm/WabtOutput.test.ts — 42/42 passed on the final head.
  • Exact-head CI on fbc268555adbf00c68c4cb38aaed16a8ff78abf3 — all required checks passed, including five test shards, source/static/build/package, Windows capability/package, native package baselines, Portable tests, the required aggregator, and Greptile review. The latest-main merge changed only JavaScript tool-effect contracts/docs/tests; a machine diff confirms every WABT and package-verifier input used by the Windows run is unchanged.
  • Ordinary-user Windows candidate 5423ae0734c89c825cf06603187db45cbf9e55e7 — 42/42 real verifier cases passed; 647.28 s Job wall, 667.84 s observer wall, 148.91 sampled CPU seconds, 1,145,798,656-byte Job peak, 1,175,539,712-byte sampled working-set peak, 2 LP, BelowNormal, 2 GiB, 631 output bytes, empty stderr, and Job0.
  • Exact-head Windows packaged-timeout continuation — 42/42 passed; 363.28 s Job wall / 366.17 s observer wall / 98.30 sampled CPU seconds / 942,870,528-byte Job peak / 968,450,048-byte sampled working-set peak / 9,761,697,792-byte minimum host free memory, with 2 LP, BelowNormal, 2 GiB, 631 output bytes, empty stderr, and Job0.

The completed final workload is broader than the failing reproductions, and the compile-cache reproduction was slower than the default failure. No speedup or cache benefit is claimed. Agent-token cost was not measured; the verifier's output shape and size are unchanged.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: real WABT on Windows; no Hopper, Ghidra, or browser path is affected.
  • Security, privacy, process, or containment review: no new authority; existing private input staging, child temp ownership, residue checks, and Job cleanup remain intact.

Author readiness

Human owner: @N0zoM1z0

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

🔄 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/4117 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/windows-wabt-mcp-timeout-4109` --- ### 📝 Commits (5) - [`5423ae0`](https://github.com/morluto/rea/commit/5423ae073cb3ad68df7a3a2246aa2824abad9556) fix(verifiers): align WABT MCP request timeout - [`3318d80`](https://github.com/morluto/rea/commit/3318d802e2494dfdf8fa01976d716a811591bdc2) Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109 - [`ecd04ee`](https://github.com/morluto/rea/commit/ecd04eea840385caeb7b595c827845b6ff8c6c88) fix(verifiers): bound packaged WABT workflow - [`fbc2685`](https://github.com/morluto/rea/commit/fbc268555adbf00c68c4cb38aaed16a8ff78abf3) Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109 - [`8ca19d1`](https://github.com/morluto/rea/commit/8ca19d1511c8f90dc4238068915aaecc75e4ae60) Merge remote-tracking branch 'origin/main' into fix/windows-wabt-mcp-timeout-4109 ### 📊 Changes **3 files changed** (+18 additions, -6 deletions) <details> <summary>View changed files</summary> ➕ `scripts/lib/wabt-verifier-timeouts.mjs` (+4 -0) 📝 `scripts/verify-packaged-wasm-artifact.mjs` (+6 -1) 📝 `scripts/verify-wasm-artifact.mjs` (+8 -5) </details> ### 📄 Description ## Summary The real Windows WABT verifier gave equivalent CLI and MCP inspections different fixed deadlines, so MCP expired at the SDK default 60 seconds and a later malformed CLI case could expire at 120 seconds. This change gives every WABT inspection one 240-second operation budget across both transports and gives the complete packaged workflow a shared 15-minute aggregate budget, preserving all parity, malformed-input, retained Evidence, residue, and cleanup checks. Fixes #4109. ## Problem and expected behavior On an ordinary two-core Windows run, the verifier reached the production MCP inspection and failed with typed `REQUEST_TIMEOUT` at 60 seconds. Enabling the existing Node compile cache reproduced it. A 120-second MCP-only candidate passed that boundary, then the equivalent malformed CLI path reached its separate 120-second deadline and retained a workspace residue. Equivalent verifier operations need one budget large enough for the measured bounded workload. ## Change and scope - Define one 240-second WABT verifier operation budget and one 15-minute aggregate workflow budget in a single verifier-owned module. - Apply the operation budget to public CLI artifact inspection and every MCP tool call, including bundle and malformed-input paths. - Apply the aggregate budget to the packaged wrapper so it cannot terminate one valid operation or skip child cleanup. The 15-minute limit covers the measured 647-second completed Windows workflow with about 39% margin. - Keep tool preflight, provider limits, fixtures, retries, cleanup, output, and product contracts unchanged. Contribution scope: verifier-only correction for existing read-only WASM artifact analysis. No provider capability or authority changes; no maintainer scope decision is required. ## Contract and boundary impact - Semantic owner and earliest changed stage: real WABT verification request supervision. - CLI and MCP/tool-catalog contract: unchanged. - Provider, bridge, target-format, or platform compatibility: unchanged; only verifier operation and aggregate wait policy changes. - Evidence, artifact, provenance, or reconstruction contract: unchanged. - Generated metadata, package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [x] 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 - Base reproductions: default and compile-cache Windows runs both failed at the SDK's 60-second MCP timeout and cleaned to Job0. - Intermediate 120-second candidate passed the original MCP failure, then retained a later malformed CLI timeout and workspace residue instead of hiding either fact. - Final real run passed all 42 WABT 1.0.42 cases: seven normal CLI/MCP schema, Evidence, identity, hash/bytes, WAT, section, glue/candidate, and retained-bundle comparisons plus both malformed inputs and their retained failed Evidence for every fixture. - Review follow-up on exact head `ecd04eea840385caeb7b595c827845b6ff8c6c88`: an ordinary-user Windows continuation from the extracted-package entrypoint passed the same 42 cases through the packaged wrapper in 363.28 seconds, exceeding the old 180-second cap, with empty stderr and Job0. - Full pack/install verification exposed four independent existing Windows verifier defects: npm command-script launching (#4125), CRLF tar-member parsing (#4128), child extraction into a leased private root (#4134), and transient installed-tree cleanup (#4136). Each is recorded separately. The continuation used explicit test-only bypasses for those prerequisites; it directly verifies this PR's nested timeout and cleanup path, but does not claim the full pack/install lane passed. - [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 - `npm run check:fast` — passed on final head `fbc268555adbf00c68c4cb38aaed16a8ff78abf3`. - `npm run test:focused -- tests/boundary/mcp/wasmArtifactMcp.test.ts src/wasm/WabtArtifactProvider.test.ts src/wasm/WabtOutput.test.ts` — 42/42 passed on the final head. - Exact-head CI on `fbc268555adbf00c68c4cb38aaed16a8ff78abf3` — all required checks passed, including five test shards, source/static/build/package, Windows capability/package, native package baselines, Portable tests, the required aggregator, and Greptile review. The latest-main merge changed only JavaScript tool-effect contracts/docs/tests; a machine diff confirms every WABT and package-verifier input used by the Windows run is unchanged. - Ordinary-user Windows candidate `5423ae0734c89c825cf06603187db45cbf9e55e7` — 42/42 real verifier cases passed; 647.28 s Job wall, 667.84 s observer wall, 148.91 sampled CPU seconds, 1,145,798,656-byte Job peak, 1,175,539,712-byte sampled working-set peak, 2 LP, BelowNormal, 2 GiB, 631 output bytes, empty stderr, and Job0. - Exact-head Windows packaged-timeout continuation — 42/42 passed; 363.28 s Job wall / 366.17 s observer wall / 98.30 sampled CPU seconds / 942,870,528-byte Job peak / 968,450,048-byte sampled working-set peak / 9,761,697,792-byte minimum host free memory, with 2 LP, BelowNormal, 2 GiB, 631 output bytes, empty stderr, and Job0. The completed final workload is broader than the failing reproductions, and the compile-cache reproduction was slower than the default failure. No speedup or cache benefit is claimed. Agent-token cost was not measured; the verifier's output shape and size are unchanged. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: real WABT on Windows; no Hopper, Ghidra, or browser path is affected. - Security, privacy, process, or containment review: no new authority; existing private input staging, child temp ownership, residue checks, and Job cleanup remain intact. ## Author readiness Human owner: @N0zoM1z0 - [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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:36 +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#6067
No description provided.