[PR #2404] [MERGED] test(evm): verify real worker cancellation and cleanup recovery #5204

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

📋 Pull Request Information

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

Base: main ← Head: test/evm-descriptor-acceptance-20261012


📝 Commits (3)

  • b3eadf1 test(evm): verify real worker cancellation and cleanup recovery
  • 7988ec8 docs(evm): pin lifecycle measurements and corrected-main verification
  • cf558a0 test(evm): observe launcher starts before retained-cleanup retry

📊 Changes

3 files changed (+667 additions, -0 deletions)

View changed files

📝 experiments/analysis-efficiency/README.md (+4 -0)
➕ experiments/analysis-efficiency/evm-lifecycle.md (+159 -0)
➕ experiments/analysis-efficiency/verify-evm-lifecycle.mjs (+504 -0)

📄 Description

Continues #2016 with real EVM descriptor lifecycle acceptance. An unchanged EVMole 0.9.3 worker produces the actual reply before a private fixture briefly holds command completion. Public CLI/stdio MCP workflows verify late SDK cancellation, permission-induced cleanup failure, retained-resource retry, preservation of original malformed-input diagnostics, and a healthy real SQLite WASM peer. Production code and existing API/default behavior are unchanged.

The verifier records source/runtime/input fingerprints, validates token/native process ownership before fault injection, restores permissions, preserves verification/cleanup errors together, and checks final point-in-time lineage after shutdown. Raw JSON, runtime copies, downloaded artifacts and fixtures remain outside Git.

Validation:

  • Three pinned public carriers (WETH, official Uniswap Factory/Pool templates), each with all three scenarios passing through actual compiled CLI/MCP. Complete CLI normalized facts, parameters and subject match MCP. Real WABT 1.0.42 inspects shipped SQLite WASM during failed EVM cleanup.
  • Initial three-carrier verifier source SHA-256 2fec069b53324ef82070d323b26dd613b6da0caa7f18100adbeb39b045cf98dc; frozen runtime source 67f817e3653efad35f7044e68fbd6f163b86864b, runtime file table cf03167870ac9def929cfaab536d6bd791089031660d1b35bff20672ac07cbbf. Input/runtime/source bytes unchanged; provider token sweeps and final verifier lineage pass.
  • Source syntax, owning-file formatting/lint, installed dependency check, resolved module-boundary check and pre-commit checks pass.
  • Serial one-CPU measurements: Factory 23.979 s / 1,132,994,560 peak sampled family bytes / 23.419 s last-observed CPU; WETH 25.595 s / 1,116,884,992 bytes / 23.926 s CPU; Pool 24.589 s / 1,141,415,936 bytes / 24.043 s CPU. No guard abort. Final cgroup counters remain unknown; no final no-OOM proof or performance/model-token improvement is claimed.

Limits and baseline issue:

  • Cancellation is after actual worker analysis, not inside synchronous WASM computation. Server-shutdown owner retry retains the separately labeled injected-provider SDK coverage from #2261.
  • The existing real malformed/unavailable/capacity matrix is referenced, not rerun for a verifier-only change. Dynamic module ABI preflight remains deferred with the plugin SDK.
  • Historical main 81cca2e0e3ebd98c21f41d7ad63d6a00e4cbc3f9 failed build with contractToolHandler.ts(69,38): TS2554 (expected 4 arguments, got 3). Independent main fdd8f826023c568937d237c2f97d855de283a9b8 CI 38309578208, Build package job 115011872852, reports the identical failure. This PR changes only experiment verifier/docs; the unrelated regression is recorded in the maintainer-requested private /tmp bug handoff and is not repaired here. The maintainer independently fixed the producing caller in main 8fc2043eb8bcedbf34dce064f977e455438635d6; this branch is rebased onto that correction. A fresh build and all 10 related EVM MCP boundary tests pass. The same verifier also passes real Factory CLI/MCP cancellation/cleanup/healthy-peer workflows on built runtime b3eadf147221a2fa997ac26667a183ca5bccb1f4: 24.285 s / 1,146,167,296 sampled peak bytes / 23.662 s last-observed CPU. Earlier frozen receipts remain pinned to their original source. The corrected main CI 38310533698 completed successfully.

Local full typecheck passes with the installed compiler's supported --singleThreaded scheduling option: all project files/checks retained, 51.868 s / 2,016,690,176 sampled peak bytes. Default-mode local attempts stopped at the unchanged 3 GiB safeguard and are not passes. For the branch push only, a private command-scoped pre-push hook performs the dependency check, this complete typecheck and unchanged lint; repository hooks/configuration remain unchanged and no check is omitted. Remote CI uses the repository's default mode. Other static gates (lint, format, knip, metadata) pass; architecture guards and generated documentation checks pass (including the two onboarding example checks).

No release publication or deployment. Final head cf558a0661eb29bda932242abc3687b1860428e7 passes all 36 checks, including completed CI 38313631216. Final manual review is complete. The meaningful launcher-observation correction below is included and verified; automated review approval is not claimed.

Final manual-review correction: checking for an absent marker while the gate is off does not prove no worker launch. The fixture now appends a launcher receipt before the actual worker starts; both failed cleanup retries must preserve that log byte-for-byte. All three related real Factory scenarios, CLI parity, healthy WABT peer and final cleanup pass again with final verifier source fc9a50e2e54e4c8eede4b8a19283e11ddaa1faadea52eebc390b55b5a1902668: 23.579 s / 1,163,685,888 sampled peak family bytes / 23.110 s last-observed CPU. Only the related workflow and source/docs/static checks are repeated; wider domains/models are not rerun. Final pushed head is cf558a0661eb29bda932242abc3687b1860428e7.


🔄 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/2404 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `test/evm-descriptor-acceptance-20261012` --- ### 📝 Commits (3) - [`b3eadf1`](https://github.com/morluto/rea/commit/b3eadf147221a2fa997ac26667a183ca5bccb1f4) test(evm): verify real worker cancellation and cleanup recovery - [`7988ec8`](https://github.com/morluto/rea/commit/7988ec8f1e5de968ca3a0f44b4f552f77754f0f2) docs(evm): pin lifecycle measurements and corrected-main verification - [`cf558a0`](https://github.com/morluto/rea/commit/cf558a0661eb29bda932242abc3687b1860428e7) test(evm): observe launcher starts before retained-cleanup retry ### 📊 Changes **3 files changed** (+667 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `experiments/analysis-efficiency/README.md` (+4 -0) ➕ `experiments/analysis-efficiency/evm-lifecycle.md` (+159 -0) ➕ `experiments/analysis-efficiency/verify-evm-lifecycle.mjs` (+504 -0) </details> ### 📄 Description Continues #2016 with real EVM descriptor lifecycle acceptance. An unchanged EVMole 0.9.3 worker produces the actual reply before a private fixture briefly holds command completion. Public CLI/stdio MCP workflows verify late SDK cancellation, permission-induced cleanup failure, retained-resource retry, preservation of original malformed-input diagnostics, and a healthy real SQLite WASM peer. Production code and existing API/default behavior are unchanged. The verifier records source/runtime/input fingerprints, validates token/native process ownership before fault injection, restores permissions, preserves verification/cleanup errors together, and checks final point-in-time lineage after shutdown. Raw JSON, runtime copies, downloaded artifacts and fixtures remain outside Git. Validation: - Three pinned public carriers (WETH, official Uniswap Factory/Pool templates), each with all three scenarios passing through actual compiled CLI/MCP. Complete CLI normalized facts, parameters and subject match MCP. Real WABT 1.0.42 inspects shipped SQLite WASM during failed EVM cleanup. - Initial three-carrier verifier source SHA-256 `2fec069b53324ef82070d323b26dd613b6da0caa7f18100adbeb39b045cf98dc`; frozen runtime source `67f817e3653efad35f7044e68fbd6f163b86864b`, runtime file table `cf03167870ac9def929cfaab536d6bd791089031660d1b35bff20672ac07cbbf`. Input/runtime/source bytes unchanged; provider token sweeps and final verifier lineage pass. - Source syntax, owning-file formatting/lint, installed dependency check, resolved module-boundary check and pre-commit checks pass. - Serial one-CPU measurements: Factory 23.979 s / 1,132,994,560 peak sampled family bytes / 23.419 s last-observed CPU; WETH 25.595 s / 1,116,884,992 bytes / 23.926 s CPU; Pool 24.589 s / 1,141,415,936 bytes / 24.043 s CPU. No guard abort. Final cgroup counters remain unknown; no final no-OOM proof or performance/model-token improvement is claimed. Limits and baseline issue: - Cancellation is after actual worker analysis, not inside synchronous WASM computation. Server-shutdown owner retry retains the separately labeled injected-provider SDK coverage from #2261. - The existing real malformed/unavailable/capacity matrix is referenced, not rerun for a verifier-only change. Dynamic module ABI preflight remains deferred with the plugin SDK. - Historical main `81cca2e0e3ebd98c21f41d7ad63d6a00e4cbc3f9` failed build with `contractToolHandler.ts(69,38): TS2554 (expected 4 arguments, got 3)`. Independent main `fdd8f826023c568937d237c2f97d855de283a9b8` [CI 38309578208](https://github.com/morluto/rea/actions/runs/38309578208), Build package job 115011872852, reports the identical failure. This PR changes only experiment verifier/docs; the unrelated regression is recorded in the maintainer-requested private /tmp bug handoff and is not repaired here. The maintainer independently fixed the producing caller in main `8fc2043eb8bcedbf34dce064f977e455438635d6`; this branch is rebased onto that correction. A fresh build and all 10 related EVM MCP boundary tests pass. The same verifier also passes real Factory CLI/MCP cancellation/cleanup/healthy-peer workflows on built runtime `b3eadf147221a2fa997ac26667a183ca5bccb1f4`: 24.285 s / 1,146,167,296 sampled peak bytes / 23.662 s last-observed CPU. Earlier frozen receipts remain pinned to their original source. The corrected main [CI 38310533698](https://github.com/morluto/rea/actions/runs/38310533698) completed successfully. Local full typecheck passes with the installed compiler's supported `--singleThreaded` scheduling option: all project files/checks retained, 51.868 s / 2,016,690,176 sampled peak bytes. Default-mode local attempts stopped at the unchanged 3 GiB safeguard and are not passes. For the branch push only, a private command-scoped pre-push hook performs the dependency check, this complete typecheck and unchanged lint; repository hooks/configuration remain unchanged and no check is omitted. Remote CI uses the repository's default mode. Other static gates (lint, format, knip, metadata) pass; architecture guards and generated documentation checks pass (including the two onboarding example checks). No release publication or deployment. Final head `cf558a0661eb29bda932242abc3687b1860428e7` passes all 36 checks, including completed [CI 38313631216](https://github.com/morluto/rea/actions/runs/38313631216). Final manual review is complete. The meaningful launcher-observation correction below is included and verified; automated review approval is not claimed. Final manual-review correction: checking for an absent marker while the gate is off does not prove no worker launch. The fixture now appends a launcher receipt before the actual worker starts; both failed cleanup retries must preserve that log byte-for-byte. All three related real Factory scenarios, CLI parity, healthy WABT peer and final cleanup pass again with final verifier source `fc9a50e2e54e4c8eede4b8a19283e11ddaa1faadea52eebc390b55b5a1902668`: 23.579 s / 1,163,685,888 sampled peak family bytes / 23.110 s last-observed CPU. Only the related workflow and source/docs/static checks are repeated; wider domains/models are not rerun. Final pushed head is `cf558a0661eb29bda932242abc3687b1860428e7`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:47 +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#5204
No description provided.