[PR #5497] [MERGED] test: stabilize worker cancellation and trailer regressions #6939

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5497
Author: @gensokyo-dev
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @gensokyo-dev

Base: main ← Head: audit/ci-tests-20261020-round5


📝 Commits (9)

  • 6818ad7 test(browser): deduplicate attached session scenarios
  • 4182fb2 chore: update CI recovery branch to latest main
  • d097c3e fix(evm): preserve cancellation after runtime-root cleanup
  • 96cd237 fix(javascript): order initializers through export declarations
  • bf48de0 test: align path diagnostics and split trailer regressions
  • 5ebeb58 test(javascript): make worker cancellation order deterministic
  • 52219e7 chore: refresh CI recovery against current main
  • 1360a90 chore: retain upstream fixes while refreshing the CI audit
  • 086cb86 test(javascript): defer frame observers until runtime adoption

📊 Changes

5 files changed (+173 additions, -76 deletions)

View changed files

📝 src/cliJsonPaths.test.ts (+2 -0)
📝 tests/acceptance/applications/electronInvalidPaths.test.ts (+2 -0)
📝 tests/acceptance/tools/protobufCapture.test.ts (+69 -64)
📝 tests/boundary/filesystem/javascript-applications/javascriptApplicationTypeScript.test.ts (+35 -0)
📝 tests/boundary/javascript/workerOrderAudit.test.ts (+65 -12)

📄 Description

Summary

Stabilize cancellation and malformed-trailer regressions on main f5d1012fa while preserving their failure oracles.

  • Worker fixtures now cancel on schema-valid protocol frames before terminal admission, and send phase/failure frames together through the real child pipe. This removes process-close and 20 ms delivery races. The observer waits for runtime adoption before starting to read stdout, preserving buffered startup bytes; a regression proves the runtime receives the original bytes.
  • Split the 14 malformed gRPC-web trailer workflows into independent CLI/MCP cases. All framings, headers, status, partial facts and original-byte assertions remain, with the default deadline and file-owned MCP connection.
  • Retain explicit shared-schema format diagnostics for rejected URL paths and composed earlier/later exported-initializer controls.

The final diff changes five test files. Upstream independently integrated the EVM cleanup cancellation, export-position and browser deduplication fixes, so this branch retains those upstream implementations. No provider or tool capability is added; required maintainer scope decision is not applicable. Found in a latest-main CI audit; no separate issue.

Executed evidence

  • Latest integrated run on 086cb866f: 317 passed / 2 inapplicable host controls skipped, 15 files. This includes all 35 worker-order, 20 protobuf capture and 12 TypeScript graph cases, plus browser lifecycle, shared error projection, EVM boundaries and the upstream filtered-CLI regression fix.
  • npm run check:ci: 8 tasks passed, plus architecture/module guards. Duplication 3.4786%, below the unchanged 3.5% gate. npm run build:cached and git diff --check passed.
  • Restoring the eager observer makes the new startup-byte regression fail; fixed source was restored exactly. A separate controlled mutation that ignores caller cancellation makes the three cancellation controls fail while the success control passes; restored production source passed all four selected cases. No production worker change remains.
  • Current-head Codex review: no findings. Greptile review: 5/5, no actionable findings. The startup-reader thread is fixed and resolved with root cause, ownership change and counterfactual evidence.
  • Merged with the owner-authorized bypass as e52a71602 while PR CI was queued. The qualified preview used f5d1012fa; actual main had advanced through 7b2087e44 and 8443692e2, adding timer-overflow and Kuna fixture changes in four other files. All five PR files match the qualified head. Post-merge verification of the exact e52a71602 tree passed 333 tests / 2 existing host skips across 18 files, including both new upstream changes. Exact merged-main CI was superseded while pending by the next main push; latest main CI remains pending. The obsolete queued PR CI was cancelled after merge to avoid duplicate work. Complete remote portable-suite coverage is not claimed.
  • This change uses real CLI/MCP fixtures and controlled worker subprocesses. No new real-provider or Windows verification is claimed. Authored commits omit Co-authored-by.

Heavy local work uses two-CPU affinity and runs sequentially. Final integrated suites: 64.14 s wall / 112.23 s family CPU / 2,538.7 MiB sampled family RSS; final static gate: 170.72 s / 168.12 s / 4,990.6 MiB. RSS samples descendants every 100 ms and can double-count shared pages or miss short/reparented children; it is not a hard aggregate cap. No observed OOM. Whole-CI cost and agent tokens are unmeasured; no speedup claim.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly delegated these declarations, authorized main-CI repairs and permitted bypass merge after verification in this session. Codex reviewed the final diff and evidence; independent human review was not observed. No CI policy or required-check configuration is changed.

  • 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/5497 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `audit/ci-tests-20261020-round5` --- ### 📝 Commits (9) - [`6818ad7`](https://github.com/morluto/rea/commit/6818ad7febe396ef3000e26fef602643e24f025d) test(browser): deduplicate attached session scenarios - [`4182fb2`](https://github.com/morluto/rea/commit/4182fb26df3718b2231c0a681c4939220e2c1aa5) chore: update CI recovery branch to latest main - [`d097c3e`](https://github.com/morluto/rea/commit/d097c3e32d10ae8a8f65ae254749e65c80a3ce51) fix(evm): preserve cancellation after runtime-root cleanup - [`96cd237`](https://github.com/morluto/rea/commit/96cd237346b26b5c0f83876aaedb1640f4919c9f) fix(javascript): order initializers through export declarations - [`bf48de0`](https://github.com/morluto/rea/commit/bf48de0b8c61a14d4b083a48f99379b25d2d59c1) test: align path diagnostics and split trailer regressions - [`5ebeb58`](https://github.com/morluto/rea/commit/5ebeb5819511968b0c9c3d9c9a0d68754fbe185d) test(javascript): make worker cancellation order deterministic - [`52219e7`](https://github.com/morluto/rea/commit/52219e7e166729554a4a24c11d47c6901b1b606b) chore: refresh CI recovery against current main - [`1360a90`](https://github.com/morluto/rea/commit/1360a90ab89c7ade7a03e486e82214ab24cc93b7) chore: retain upstream fixes while refreshing the CI audit - [`086cb86`](https://github.com/morluto/rea/commit/086cb866fd805ec9a334c92cf7c838163c5a7b32) test(javascript): defer frame observers until runtime adoption ### 📊 Changes **5 files changed** (+173 additions, -76 deletions) <details> <summary>View changed files</summary> 📝 `src/cliJsonPaths.test.ts` (+2 -0) 📝 `tests/acceptance/applications/electronInvalidPaths.test.ts` (+2 -0) 📝 `tests/acceptance/tools/protobufCapture.test.ts` (+69 -64) 📝 `tests/boundary/filesystem/javascript-applications/javascriptApplicationTypeScript.test.ts` (+35 -0) 📝 `tests/boundary/javascript/workerOrderAudit.test.ts` (+65 -12) </details> ### 📄 Description ## Summary Stabilize cancellation and malformed-trailer regressions on main `f5d1012fa` while preserving their failure oracles. - Worker fixtures now cancel on schema-valid protocol frames before terminal admission, and send phase/failure frames together through the real child pipe. This removes process-close and 20 ms delivery races. The observer waits for runtime adoption before starting to read stdout, preserving buffered startup bytes; a regression proves the runtime receives the original bytes. - Split the 14 malformed gRPC-web trailer workflows into independent CLI/MCP cases. All framings, headers, status, partial facts and original-byte assertions remain, with the default deadline and file-owned MCP connection. - Retain explicit shared-schema format diagnostics for rejected URL paths and composed earlier/later exported-initializer controls. The final diff changes five test files. Upstream independently integrated the EVM cleanup cancellation, export-position and browser deduplication fixes, so this branch retains those upstream implementations. No provider or tool capability is added; required maintainer scope decision is not applicable. Found in a latest-main CI audit; no separate issue. ## Executed evidence - Latest integrated run on `086cb866f`: **317 passed / 2 inapplicable host controls skipped, 15 files**. This includes all **35 worker-order**, **20 protobuf capture** and **12 TypeScript graph** cases, plus browser lifecycle, shared error projection, EVM boundaries and the upstream filtered-CLI regression fix. - `npm run check:ci`: **8 tasks passed**, plus architecture/module guards. Duplication **3.4786%**, below the unchanged **3.5%** gate. `npm run build:cached` and `git diff --check` passed. - Restoring the eager observer makes the new startup-byte regression fail; fixed source was restored exactly. A separate controlled mutation that ignores caller cancellation makes the three cancellation controls fail while the success control passes; restored production source passed all four selected cases. No production worker change remains. - Current-head [Codex review](https://github.com/morluto/rea/pull/5497#issuecomment-6290214342): no findings. [Greptile review](https://github.com/morluto/rea/pull/5497#issuecomment-6290252889): **5/5**, no actionable findings. The startup-reader thread is fixed and resolved with root cause, ownership change and counterfactual evidence. - Merged with the owner-authorized bypass as `e52a71602` while [PR CI](https://github.com/morluto/rea/actions/runs/39443959597) was queued. The qualified preview used `f5d1012fa`; actual main had advanced through `7b2087e44` and `8443692e2`, adding timer-overflow and Kuna fixture changes in four other files. All five PR files match the qualified head. Post-merge verification of the exact `e52a71602` tree passed **333 tests / 2 existing host skips across 18 files**, including both new upstream changes. Exact merged-main CI was superseded while pending by the next main push; [latest main CI](https://github.com/morluto/rea/actions/runs/39445784441) remains pending. The obsolete queued PR CI was cancelled after merge to avoid duplicate work. Complete remote portable-suite coverage is not claimed. - This change uses real CLI/MCP fixtures and controlled worker subprocesses. No new real-provider or Windows verification is claimed. Authored commits omit `Co-authored-by`. Heavy local work uses two-CPU affinity and runs sequentially. Final integrated suites: **64.14 s wall / 112.23 s family CPU / 2,538.7 MiB sampled family RSS**; final static gate: **170.72 s / 168.12 s / 4,990.6 MiB**. RSS samples descendants every 100 ms and can double-count shared pages or miss short/reparented children; it is not a hard aggregate cap. No observed OOM. Whole-CI cost and agent tokens are unmeasured; no speedup claim. ## Author readiness Human owner: @gensokyo-dev The owner explicitly delegated these declarations, authorized main-CI repairs and permitted bypass merge after verification in this session. Codex reviewed the final diff and evidence; independent human review was not observed. No CI policy or required-check configuration is changed. - [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-11-01 21:44:11 +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#6939
No description provided.