[PR #7022] [MERGED] test(cli): follow prepared projection ownership during cancellation #7581

Closed
opened 2026-11-03 13:38:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: test/projection-finalization-20261024


📝 Commits (1)

  • dc978cb test(cli): follow prepared projection ownership during cancellation

📊 Changes

1 file changed (+20 additions, -10 deletions)

View changed files

📝 tests/process-global/commandFinalizationCancellation.test.ts (+20 -10)

📄 Description

Problem and outcome

Main-based CI fails five analysis-view finalization cases after 731109b7d. The prepared projection owns its admission budget and calls the domain projector lexically. Spying on the old module export misses that call, so three controls observe zero projections and two bundle cases never inject their intended interrupt.

Observe the imported preparation boundary, invoke the real factory, and intercept each returned owner's actual project method while preserving its receiver, closure, budget and Result. Capture the real completed projection before queueing the interrupt. All 20 scenarios and their close, listener, exit-status, parent-link and partial-Evidence assertions remain. Only the test file changes; no production hook or compatibility wrapper is added.

Executed validation

Linux x64, Node 24.22.1 / npm 11.16.0, two CPUs:

  • Unchanged producing/test files on base 41cf869949: five failed, 15 passed (10.01 s wall / 11.11 s family CPU / 690.1 MiB sampled family RSS). These files remain identical on fresh base 397aa62f2.

  • Fixed focused file: all 20 passed (5.72 s / 6.30 s CPU / 621.7 MiB).

  • Negative control: remove partial Evidence from the real post-projection cancellation response; both SIGINT/SIGTERM projection assertions fail. Mutation restored. Removing only the inner cancellation guard was non-discriminating because the CLI's outer guard preserves the observable result; that experiment is not presented as regression proof.

  • Expanded validation: 138 passed in eight files, executed in five serial, single-worker batches: process finalization/cancellation/authentication 26, services/readers 58, caller paths 2, compiled CLI 27 and MCP 25. Includes actual OS/event interrupts during final sealing, exact partial/provenance checks, saved Grafana-shaped HAR projection, and retained/portable/file MCP parity. Completed batches total 238.28 s wall / 275.40 s family CPU, maximum sampled family RSS 2441.0 MiB.

  • Final npm run check and git diff --check: passed (46.88 s wall / 86.36 s CPU / 2615.3 MiB; static checks used an 8 GiB sampled stop).

An initial mixed-project run hit its 3 GiB sampled family-memory guard at 3080.4 MiB and was stopped after 44.25 s; it is incomplete, not a pass. Forced-stop CPU accounting is unavailable. No process with this worktree as cwd remained afterward. Serial batches then completed below the guard. No OS OOM occurred. RSS sampling sums descendants around every 100 ms, may double-count shared pages or miss short/reparented processes, and is not a hard aggregate cap. Agent tokens were not measured; runtime payloads and analysis performance are unchanged. Task scopes/cache state differ, so these timings are not an analysis speedup comparison.

The exact dc978cb3f head passed complete selected CI: 32,648 tests passed, zero failed, 233 skipped, all eight built shards and source/static/build/final gates passed. Codex and Greptile reviewed that head without actionable findings.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly delegated readiness declarations and agent-managed review. Inspection and execution were performed by Codex; no separate human inspection is claimed.

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

🔄 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/7022 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `test/projection-finalization-20261024` --- ### 📝 Commits (1) - [`dc978cb`](https://github.com/morluto/rea/commit/dc978cb3f124af5d8a4cc6047a897245b2f0bc3c) test(cli): follow prepared projection ownership during cancellation ### 📊 Changes **1 file changed** (+20 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `tests/process-global/commandFinalizationCancellation.test.ts` (+20 -10) </details> ### 📄 Description ## Problem and outcome [Main-based CI](https://github.com/morluto/rea/actions/runs/40109654433/job/120918802586) fails five analysis-view finalization cases after `731109b7d`. The prepared projection owns its admission budget and calls the domain projector lexically. Spying on the old module export misses that call, so three controls observe zero projections and two bundle cases never inject their intended interrupt. Observe the imported preparation boundary, invoke the real factory, and intercept each returned owner's actual `project` method while preserving its receiver, closure, budget and Result. Capture the real completed projection before queueing the interrupt. All 20 scenarios and their close, listener, exit-status, parent-link and partial-Evidence assertions remain. Only the test file changes; no production hook or compatibility wrapper is added. ## Executed validation Linux x64, Node 24.22.1 / npm 11.16.0, two CPUs: - Unchanged producing/test files on base `41cf869949`: **five failed, 15 passed** (10.01 s wall / 11.11 s family CPU / 690.1 MiB sampled family RSS). These files remain identical on fresh base `397aa62f2`. - Fixed focused file: **all 20 passed** (5.72 s / 6.30 s CPU / 621.7 MiB). - Negative control: remove partial Evidence from the real post-projection cancellation response; **both SIGINT/SIGTERM projection assertions fail**. Mutation restored. Removing only the inner cancellation guard was non-discriminating because the CLI's outer guard preserves the observable result; that experiment is not presented as regression proof. - Expanded validation: **138 passed in eight files**, executed in five serial, single-worker batches: process finalization/cancellation/authentication 26, services/readers 58, caller paths 2, compiled CLI 27 and MCP 25. Includes actual OS/event interrupts during final sealing, exact partial/provenance checks, saved Grafana-shaped HAR projection, and retained/portable/file MCP parity. Completed batches total **238.28 s wall / 275.40 s family CPU**, maximum sampled family RSS **2441.0 MiB**. - Final `npm run check` and `git diff --check`: passed (46.88 s wall / 86.36 s CPU / 2615.3 MiB; static checks used an 8 GiB sampled stop). An initial mixed-project run hit its **3 GiB sampled family-memory guard** at 3080.4 MiB and was stopped after 44.25 s; it is incomplete, not a pass. Forced-stop CPU accounting is unavailable. No process with this worktree as cwd remained afterward. Serial batches then completed below the guard. No OS OOM occurred. RSS sampling sums descendants around every 100 ms, may double-count shared pages or miss short/reparented processes, and is not a hard aggregate cap. Agent tokens were not measured; runtime payloads and analysis performance are unchanged. Task scopes/cache state differ, so these timings are not an analysis speedup comparison. The exact `dc978cb3f` head passed [complete selected CI](https://github.com/morluto/rea/actions/runs/40111964019): **32,648 tests passed, zero failed, 233 skipped**, all eight built shards and source/static/build/final gates passed. Codex and Greptile reviewed that head without actionable findings. ## Author readiness Human owner: @gensokyo-dev The owner explicitly delegated readiness declarations and agent-managed review. Inspection and execution were performed by Codex; no separate human inspection is claimed. - [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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 13:38:52 +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#7581
No description provided.