[PR #423] [MERGED] feat(process): coordinate reactive capture effects #1972

Closed
opened 2026-10-16 21:12:59 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/423
Author: @morluto
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @morluto

Base: main ← Head: codex/issue-330-runtime


📝 Commits (1)

  • db9a831 feat(process): coordinate reactive capture effects

📊 Changes

7 files changed (+1147 additions, -4 deletions)

View changed files

📝 src/application/ProcessCaptureJournal.ts (+49 -2)
📝 src/application/ProcessCheckpoints.ts (+31 -1)
➕ src/application/ProcessReactiveCoordinator.ts (+284 -0)
➕ src/application/ProcessReactiveEffects.ts (+226 -0)
➕ src/application/ProcessReactiveObservations.ts (+35 -0)
📝 tests/processCapture.test.ts (+21 -1)
➕ tests/processReactiveCoordinator.test.ts (+501 -0)

📄 Description

Problem

The bounded reactive domain from #422 still needs a serialized application shell before it can safely drive Process Capture. Producer callbacks, async checkpoints, deadlines, and effect-generated journal records can otherwise race, reorder evidence, or commit after timeout.

What changed

  • adds a single-owner coordinator that orders observations by capture journal position, gives cancellation priority, owns absolute state/scenario deadlines, aborts in-flight effects, and commits only after acknowledged effects
  • adds journal-backed input, resize, root-signal, and filesystem-checkpoint execution with exact action/evidence correspondence and sensitive-input redaction
  • adds pre-launch detection for unsupported event sources, signal selectors, and reserved checkpoint names
  • makes the capture journal observable through non-reentrant FIFO delivery while preserving existing producer APIs
  • adds an awaited checkpoint API that remains on the existing serialized filesystem scan chain
  • adds the terminal-frame observation subscription used by the next ProcessHarness integration slice

This advances delivery slice 1 of #330. It intentionally remains outside ProcessScenario, CLI, and MCP until the harness can retain the reactive run and partial cancellation evidence end to end.

Review order

  1. ProcessReactiveCoordinator.ts
  2. ProcessReactiveEffects.ts
  3. ProcessCaptureJournal.ts and ProcessCheckpoints.ts
  4. ProcessReactiveObservations.ts
  5. focused coordinator/capture tests

Verification

  • npx vitest run tests/processReactiveCoordinator.test.ts tests/processReactiveRuntime.test.ts tests/processObservation.test.ts tests/processCapture.test.ts --testTimeout=30000 (58 tests)
  • npm run check
  • npm run docs:check
  • git diff --check

Real Hopper and Ghidra verification was not performed; this change does not alter either provider boundary.


🔄 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/423 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/23/2026 **Status:** ✅ Merged **Merged:** 7/23/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/issue-330-runtime` --- ### 📝 Commits (1) - [`db9a831`](https://github.com/morluto/rea/commit/db9a83190b841c8195da0b3036644831770ba369) feat(process): coordinate reactive capture effects ### 📊 Changes **7 files changed** (+1147 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/application/ProcessCaptureJournal.ts` (+49 -2) 📝 `src/application/ProcessCheckpoints.ts` (+31 -1) ➕ `src/application/ProcessReactiveCoordinator.ts` (+284 -0) ➕ `src/application/ProcessReactiveEffects.ts` (+226 -0) ➕ `src/application/ProcessReactiveObservations.ts` (+35 -0) 📝 `tests/processCapture.test.ts` (+21 -1) ➕ `tests/processReactiveCoordinator.test.ts` (+501 -0) </details> ### 📄 Description ## Problem The bounded reactive domain from #422 still needs a serialized application shell before it can safely drive Process Capture. Producer callbacks, async checkpoints, deadlines, and effect-generated journal records can otherwise race, reorder evidence, or commit after timeout. ## What changed - adds a single-owner coordinator that orders observations by capture journal position, gives cancellation priority, owns absolute state/scenario deadlines, aborts in-flight effects, and commits only after acknowledged effects - adds journal-backed input, resize, root-signal, and filesystem-checkpoint execution with exact action/evidence correspondence and sensitive-input redaction - adds pre-launch detection for unsupported event sources, signal selectors, and reserved checkpoint names - makes the capture journal observable through non-reentrant FIFO delivery while preserving existing producer APIs - adds an awaited checkpoint API that remains on the existing serialized filesystem scan chain - adds the terminal-frame observation subscription used by the next ProcessHarness integration slice This advances delivery slice 1 of #330. It intentionally remains outside `ProcessScenario`, CLI, and MCP until the harness can retain the reactive run and partial cancellation evidence end to end. ## Review order 1. `ProcessReactiveCoordinator.ts` 2. `ProcessReactiveEffects.ts` 3. `ProcessCaptureJournal.ts` and `ProcessCheckpoints.ts` 4. `ProcessReactiveObservations.ts` 5. focused coordinator/capture tests ## Verification - `npx vitest run tests/processReactiveCoordinator.test.ts tests/processReactiveRuntime.test.ts tests/processObservation.test.ts tests/processCapture.test.ts --testTimeout=30000` (58 tests) - `npm run check` - `npm run docs:check` - `git diff --check` Real Hopper and Ghidra verification was not performed; this change does not alter either provider boundary. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:59 +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#1972
No description provided.