Skip to content

fix(verifiers): align WABT operation timeout - #4117

Merged
N0zoM1z0 merged 5 commits into
mainfrom
fix/windows-wabt-mcp-timeout-4109
Oct 15, 2026
Merged

N0zoM1z0 merged 5 commits into
mainfrom
fix/windows-wabt-mcp-timeout-4109

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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 ([Bug] Windows package verifiers cannot spawn npm command scripts #4125), CRLF tar-member parsing ([Bug] Windows package verifier retains CR in tar member names #4128), child extraction into a leased private root ([Bug] Windows packed-bridge verifier extracts into its leased private root #4134), and transient installed-tree cleanup ([Bug] Windows packaged verifier loses its result on transient install-root cleanup failure #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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T14:13:31.931803Z 8ca19d1 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3318d802e2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/verify-wasm-artifact.mjs Resolved
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no new actionable issue was found.

Summary

This PR puts WABT verifier deadlines in one shared module.

  • WABT CLI and MCP operations share a four-minute limit.
  • The packaged WABT verification run gets a 15-minute limit.

The merge bases differ, so this review treated the full PR diff as changes since the last review. Tests were not run. GitHub access was blocked, so whether another PR supersedes this one could not be confirmed.

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

Comment thread scripts/verify-wasm-artifact.mjs Resolved
@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ecd04eea84

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: fbc268555a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 8ca19d1511

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0
N0zoM1z0 merged commit cd64e24 into main Oct 15, 2026
70 of 72 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/windows-wabt-mcp-timeout-4109 branch October 15, 2026 14:29
@morluto morluto added area: tests Test suite and verification bug Something isn't working provider: wabt Analysis provider / engine: wabt labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification bug Something isn't working provider: wabt Analysis provider / engine: wabt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Windows WABT verifier MCP calls expire before its CLI budget

2 participants