[PR #1618] [MERGED] fix(ci): preserve cleanup boundaries and bounded failure assertions #4705

Closed
opened 2026-10-31 00:54:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/ci-cleanup-boundaries


📝 Commits (1)

  • e4ac2f8 fix(ci): preserve cleanup boundaries and bounded failure assertions

📊 Changes

5 files changed (+63 additions, -20 deletions)

View changed files

📝 src/browser/CdpTargetSession.ts (+6 -2)
📝 tests/boundary/browser/cdpCleanupCancellation.test.ts (+1 -3)
📝 tests/boundary/evm/evmoleInterfaceProvider.test.ts (+45 -8)
📝 tests/boundary/filesystem/qwenClientConfiguration.test.ts (+9 -1)
📝 tests/boundary/firmware/firmwareIntegration.test.ts (+2 -6)

📄 Description

Summary

Cancel optional CDP domain shutdown promptly while retaining an independent, bounded detach attempt. Repair inherited CI regressions around retained cleanup owners and REA-owned skill removal, without discarding original failure facts or user files.

Found while babysitting #1613: its first shard and another unrelated PR had the same six failures. No separate issue was opened for these directly reproduced blockers. The firmware worker assertion overlaps the correction in #1616; this PR does not implement its workspace recovery feature.

Problem and expected behavior

When cancellation arrives during a hung Page.disable, the optional shutdown currently consumes the entire cleanup budget, preventing Target.detachFromTarget. Cancellation should stop optional shutdown and preserve the remaining detach budget. Already cancelled operations should skip optional domain disabling and still detach; they must never close a user target or browser.

The EVM regression expected an old flattened error and premature workspace deletion, the firmware regression allowed a second unverified worker, and the Qwen regression expected recursive skill-directory deletion. Current ownership rules require preserving the cleanup owner/root, refusing another unverified launch, and removing only managed skill files. The megabyte-sized EVM assertion diff also delayed CI log output by about 25 minutes after the tests had finished.

Change and scope

  • Combine the caller signal with the bounded cleanup signal for optional domain shutdown only; retain the independent signal for detach.
  • Preserve cancellation and external-target assertions. Update the Electron case to expect optional disabling to be skipped after cancellation.
  • Inspect the EVM projected error chain through a bounded test projection, checking original output-limit cause, diagnostic truncation, retained workspace, and successful shutdown after cleanup recovery.
  • Verify all managed Qwen skill files are removed and a user-authored file survives. Keep the uncertain firmware worker/root and reject another launch.

Contract and boundary impact

  • Semantic owner and earliest changed stage: CDP target-session cleanup; integration assertions at process/filesystem boundaries.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: no native engine/bridge changes; CDP caller cancellation releases optional cleanup before detach.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged; original EVM failure and truncation remain checked through the shared projection.
  • Process execution, authorization, cleanup, or containment impact: preserve the existing one-second cleanup deadline, independent detach authority, and user-target preservation. Retained process cleanup must be confirmed before root removal.
  • Generated metadata, package, or installation impact: none; skill uninstall assertions validate the existing managed-file ownership rule.

Evidence and regression coverage

  • Tests updated: four cancellation cases over actual HTTP/WebSocket transport; EVM real subprocess overflow and retryable cleanup; firmware uncertain-worker admission; both Qwen custom/default-home lifecycles.
  • Base reproduction: all six failures reproduced twice locally, including after rebasing onto current main; the CI log shows the same failures on #1613 and an unrelated PR. The late-cancellation detach assertion fails before the production change.
  • User-visible CLI/MCP output: no envelope changes; successful capture and cancelled analysis retain their prior result status.
  • Remaining proof gaps: the cancellation peer and firmware/Qwen fixtures are controlled boundary tests; native firmware-engine and live Qwen-model behavior are unverified. CI also passed normal real Chrome 154 CLI/stdio MCP and real Web runtime workflows; these do not reproduce a hung domain-disable reply in Chrome.

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

  • Integrated worktree: 149 tests passed (2 skipped) across ten affected and onboarding/evaluation files.
  • Repeated the four previously failing files: 64 tests passed (2 skipped).
  • npm run check — passed typecheck, lint, formatting, metadata, unused-code and architecture checks.
  • CI real-browser and real-web-runtime workflows passed on e4ac2f8a.
  • The five changed files in this branch are byte-identical to the verified integration worktree; CI will validate the standalone branch. No live model pass is claimed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Linux x64 process/filesystem and actual HTTP/WebSocket boundary tests; CI real Chrome 154 CLI/stdio MCP and real Web runtime lanes passed. No native firmware/Hopper/Ghidra claim.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no GUI mutation, browser/target close, recursive skill deletion, or new approval authority. Local checks run serially under one CPU core and a 3 GiB process-tree limit.

Review checklist

  • This PR addresses a concrete problem.
  • This PR has one focused outcome and a Conventional Commit title.
  • The reason for not opening a separate issue is stated above.
  • Tests cover changed observable behavior and failure paths.
  • No owning contracts or generated metadata require changes.
  • User-visible result status and unchanged envelopes are described above.
  • The diff was checked 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/1618 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/ci-cleanup-boundaries` --- ### 📝 Commits (1) - [`e4ac2f8`](https://github.com/morluto/rea/commit/e4ac2f8a83b73a14035848db7d282acac14d3645) fix(ci): preserve cleanup boundaries and bounded failure assertions ### 📊 Changes **5 files changed** (+63 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `src/browser/CdpTargetSession.ts` (+6 -2) 📝 `tests/boundary/browser/cdpCleanupCancellation.test.ts` (+1 -3) 📝 `tests/boundary/evm/evmoleInterfaceProvider.test.ts` (+45 -8) 📝 `tests/boundary/filesystem/qwenClientConfiguration.test.ts` (+9 -1) 📝 `tests/boundary/firmware/firmwareIntegration.test.ts` (+2 -6) </details> ### 📄 Description ## Summary Cancel optional CDP domain shutdown promptly while retaining an independent, bounded detach attempt. Repair inherited CI regressions around retained cleanup owners and REA-owned skill removal, without discarding original failure facts or user files. Found while babysitting #1613: its first shard and another unrelated PR had the same six failures. No separate issue was opened for these directly reproduced blockers. The firmware worker assertion overlaps the correction in #1616; this PR does not implement its workspace recovery feature. ## Problem and expected behavior When cancellation arrives during a hung `Page.disable`, the optional shutdown currently consumes the entire cleanup budget, preventing `Target.detachFromTarget`. Cancellation should stop optional shutdown and preserve the remaining detach budget. Already cancelled operations should skip optional domain disabling and still detach; they must never close a user target or browser. The EVM regression expected an old flattened error and premature workspace deletion, the firmware regression allowed a second unverified worker, and the Qwen regression expected recursive skill-directory deletion. Current ownership rules require preserving the cleanup owner/root, refusing another unverified launch, and removing only managed skill files. The megabyte-sized EVM assertion diff also delayed CI log output by about 25 minutes after the tests had finished. ## Change and scope - Combine the caller signal with the bounded cleanup signal for optional domain shutdown only; retain the independent signal for detach. - Preserve cancellation and external-target assertions. Update the Electron case to expect optional disabling to be skipped after cancellation. - Inspect the EVM projected error chain through a bounded test projection, checking original output-limit cause, diagnostic truncation, retained workspace, and successful shutdown after cleanup recovery. - Verify all managed Qwen skill files are removed and a user-authored file survives. Keep the uncertain firmware worker/root and reject another launch. ## Contract and boundary impact - Semantic owner and earliest changed stage: CDP target-session cleanup; integration assertions at process/filesystem boundaries. - CLI and MCP/tool-catalog contract: unchanged. - Provider, bridge, target-format, or platform compatibility: no native engine/bridge changes; CDP caller cancellation releases optional cleanup before detach. - Evidence, artifact, provenance, or reconstruction contract: unchanged; original EVM failure and truncation remain checked through the shared projection. - Process execution, authorization, cleanup, or containment impact: preserve the existing one-second cleanup deadline, independent detach authority, and user-target preservation. Retained process cleanup must be confirmed before root removal. - Generated metadata, package, or installation impact: none; skill uninstall assertions validate the existing managed-file ownership rule. ## Evidence and regression coverage - Tests updated: four cancellation cases over actual HTTP/WebSocket transport; EVM real subprocess overflow and retryable cleanup; firmware uncertain-worker admission; both Qwen custom/default-home lifecycles. - Base reproduction: all six failures reproduced twice locally, including after rebasing onto current main; the CI log shows the same failures on #1613 and an unrelated PR. The late-cancellation detach assertion fails before the production change. - User-visible CLI/MCP output: no envelope changes; successful capture and cancelled analysis retain their prior result status. - Remaining proof gaps: the cancellation peer and firmware/Qwen fixtures are controlled boundary tests; native firmware-engine and live Qwen-model behavior are unverified. CI also passed normal real Chrome 154 CLI/stdio MCP and real Web runtime workflows; these do not reproduce a hung domain-disable reply in Chrome. 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 - Integrated worktree: 149 tests passed (2 skipped) across ten affected and onboarding/evaluation files. - Repeated the four previously failing files: 64 tests passed (2 skipped). - `npm run check` — passed typecheck, lint, formatting, metadata, unused-code and architecture checks. - CI real-browser and real-web-runtime workflows passed on `e4ac2f8a`. - The five changed files in this branch are byte-identical to the verified integration worktree; CI will validate the standalone branch. No live model pass is claimed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Linux x64 process/filesystem and actual HTTP/WebSocket boundary tests; CI real Chrome 154 CLI/stdio MCP and real Web runtime lanes passed. No native firmware/Hopper/Ghidra claim. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no GUI mutation, browser/target close, recursive skill deletion, or new approval authority. Local checks run serially under one CPU core and a 3 GiB process-tree limit. ## Review checklist - [x] This PR addresses a concrete problem. - [x] This PR has one focused outcome and a Conventional Commit title. - [x] The reason for not opening a separate issue is stated above. - [x] Tests cover changed observable behavior and failure paths. - [x] No owning contracts or generated metadata require changes. - [x] User-visible result status and unchanged envelopes are described above. - [x] The diff was checked 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 00:54:10 +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#4705
No description provided.