[PR #411] [MERGED] feat(process): run finite-state replay during capture #1960

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

📋 Pull Request Information

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

Base: codex/issue-355 ← Head: codex/issue-334


📝 Commits (1)

  • 34c583a feat(process): run finite-state replay during capture

📊 Changes

186 files changed (+1699 additions, -663 deletions)

View changed files

📝 docs/api/assets/hierarchy.js (+1 -1)
📝 docs/api/assets/search.js (+1 -1)
📝 docs/api/classes/application_BinarySession.BinarySession.html (+1 -1)
📝 docs/api/classes/application_BinarySessionRecords.BinarySessionRecords.html (+1 -1)
📝 docs/api/classes/application_JavaScriptArtifactGraphAccumulator.JavaScriptArtifactGraphAccumulator.html (+8 -8)
📝 docs/api/classes/application_PermissionAuthority.PermissionPathError.html (+1 -1)
📝 docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html (+1 -1)
📝 docs/api/classes/application_ProcessCheckpoints.ProcessCheckpoints.html (+2 -2)
📝 docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html (+1 -1)
📝 docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html (+1 -1)
📝 docs/api/classes/domain_errors.EvidenceLimitError.html (+3 -3)
📝 docs/api/classes/domain_replayMachineRuntime.ReplayMachineRuntime.html (+7 -7)
📝 docs/api/classes/ghidra_GhidraLauncher.GhidraLaunchError.html (+1 -1)
📝 docs/api/classes/ghidra_GhidraSessionError.GhidraSessionError.html (+1 -1)
📝 docs/api/classes/ghidra_protocol.GhidraRemoteError.html (+1 -1)
📝 docs/api/functions/application_CommandShimReplay.startCommandShimReplay.html (+2 -2)
📝 docs/api/functions/application_ElectronBoundaryGraphContext.electronFindingSourceNode.html (+2 -2)
📝 docs/api/functions/application_FilesystemSnapshot.snapshotRoots.html (+2 -2)
📝 docs/api/functions/application_JavaScriptApplicationEvidence.createJavaScriptApplicationEvidence.html (+2 -2)
📝 docs/api/functions/application_JavaScriptApplicationWorkflowEvidence.createApplicationFeatureTraceEvidence.html (+2 -2)

...and 80 more files

📄 Description

Description

Wires the data-only replay machine into process capture for bounded HTTP and WebSocket login/reconnect workflows. Scenarios can declare states, guarded captures, actions, transition/use/visit limits, and runtime ceilings; Process Capture v4 records a redacted transition journal and exposes it through session evidence resources.

Replay dispatch and actions are serialized across protocols. Finalization stops new replay admission, drains queued work, snapshots events, and validates the journal against declared limits before returning evidence. Sensitive values remain memory-only; response headers and persisted capture sources are validated at the scenario boundary.

Stacked on #410.

Suggested review order:

  1. Replay machine schema and runtime invariants.
  2. Loopback dispatch, serialization, and finalization.
  3. Capture schema, validation, comparison, and evidence projection.
  4. Login/reconnect and lifecycle regressions.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test)
  • Real Hopper verification performed (npm run verify:hopper)
  • Linux real Hopper verification performed (npm run verify:hopper:linux) or unavailability explained
  • Real browser verification performed (npm run verify:browser) or unavailability explained
  • Package verification performed (npm run verify:package)

npm run check passed: 349 test files and 2,382 tests.

Tool Contract Impact

capture_process_scenario accepts an optional finite-state replay machine. Process Capture v4 and its evidence resource add replay_transitions. The canonical tool inventory remains unchanged.

Closes #334


🔄 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/411 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `codex/issue-355` ← **Head:** `codex/issue-334` --- ### 📝 Commits (1) - [`34c583a`](https://github.com/morluto/rea/commit/34c583a170782b4b28d16a2ec33223922608008d) feat(process): run finite-state replay during capture ### 📊 Changes **186 files changed** (+1699 additions, -663 deletions) <details> <summary>View changed files</summary> 📝 `docs/api/assets/hierarchy.js` (+1 -1) 📝 `docs/api/assets/search.js` (+1 -1) 📝 `docs/api/classes/application_BinarySession.BinarySession.html` (+1 -1) 📝 `docs/api/classes/application_BinarySessionRecords.BinarySessionRecords.html` (+1 -1) 📝 `docs/api/classes/application_JavaScriptArtifactGraphAccumulator.JavaScriptArtifactGraphAccumulator.html` (+8 -8) 📝 `docs/api/classes/application_PermissionAuthority.PermissionPathError.html` (+1 -1) 📝 `docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html` (+1 -1) 📝 `docs/api/classes/application_ProcessCheckpoints.ProcessCheckpoints.html` (+2 -2) 📝 `docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html` (+1 -1) 📝 `docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.EvidenceLimitError.html` (+3 -3) 📝 `docs/api/classes/domain_replayMachineRuntime.ReplayMachineRuntime.html` (+7 -7) 📝 `docs/api/classes/ghidra_GhidraLauncher.GhidraLaunchError.html` (+1 -1) 📝 `docs/api/classes/ghidra_GhidraSessionError.GhidraSessionError.html` (+1 -1) 📝 `docs/api/classes/ghidra_protocol.GhidraRemoteError.html` (+1 -1) 📝 `docs/api/functions/application_CommandShimReplay.startCommandShimReplay.html` (+2 -2) 📝 `docs/api/functions/application_ElectronBoundaryGraphContext.electronFindingSourceNode.html` (+2 -2) 📝 `docs/api/functions/application_FilesystemSnapshot.snapshotRoots.html` (+2 -2) 📝 `docs/api/functions/application_JavaScriptApplicationEvidence.createJavaScriptApplicationEvidence.html` (+2 -2) 📝 `docs/api/functions/application_JavaScriptApplicationWorkflowEvidence.createApplicationFeatureTraceEvidence.html` (+2 -2) _...and 80 more files_ </details> ### 📄 Description ## Description Wires the data-only replay machine into process capture for bounded HTTP and WebSocket login/reconnect workflows. Scenarios can declare states, guarded captures, actions, transition/use/visit limits, and runtime ceilings; Process Capture v4 records a redacted transition journal and exposes it through session evidence resources. Replay dispatch and actions are serialized across protocols. Finalization stops new replay admission, drains queued work, snapshots events, and validates the journal against declared limits before returning evidence. Sensitive values remain memory-only; response headers and persisted capture sources are validated at the scenario boundary. Stacked on #410. Suggested review order: 1. Replay machine schema and runtime invariants. 2. Loopback dispatch, serialization, and finalization. 3. Capture schema, validation, comparison, and evidence projection. 4. Login/reconnect and lifecycle regressions. ## Type of Change - [ ] Bug fix - [x] New feature - [x] Documentation update - [ ] Performance improvement - [ ] Refactoring (no functional change) - [x] Tool contract change (MCP schema modification) ## Testing Performed - [x] Unit tests added or updated - [x] TypeScript typecheck passes (`npm run typecheck`) - [x] Linting passes (`npm run lint`) - [x] Full test suite passes (`npm test`) - [ ] Real Hopper verification performed (`npm run verify:hopper`) - [ ] Linux real Hopper verification performed (`npm run verify:hopper:linux`) or unavailability explained - [ ] Real browser verification performed (`npm run verify:browser`) or unavailability explained - [ ] Package verification performed (`npm run verify:package`) `npm run check` passed: 349 test files and 2,382 tests. ## Tool Contract Impact `capture_process_scenario` accepts an optional finite-state replay machine. Process Capture v4 and its evidence resource add `replay_transitions`. The canonical tool inventory remains unchanged. ## Related Issues Closes #334 --- <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:53 +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#1960
No description provided.