[PR #418] [MERGED] feat(process): add direct replay machine runner #1965

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

📋 Pull Request Information

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

Base: main ← Head: codex/issue-335


📝 Commits (1)

  • b275243 feat(process): add direct replay machine runner

📊 Changes

26 files changed (+1157 additions, -25 deletions)

View changed files

📝 README.md (+2 -1)
📝 README_ar.md (+1 -1)
📝 README_ja.md (+1 -1)
📝 README_ko.md (+1 -1)
📝 README_zh.md (+1 -1)
📝 docs/process-capture.md (+21 -0)
📝 docs/product-catalog.json (+9 -7)
📝 docs/verification/managed-conformance-manifest.json (+2 -2)
📝 skills/reverse-engineer-anything/SKILL.md (+2 -2)
📝 src/cliCommandNames.ts (+1 -0)
📝 src/cliProcessCommands.ts (+44 -0)
➕ src/contracts/replayMachineExample.ts (+38 -0)
📝 src/contracts/toolContractExamples.ts (+2 -0)
📝 src/contracts/toolContracts.ts (+6 -0)
📝 src/contracts/toolEffects.ts (+1 -0)
📝 src/contracts/toolOutputSchemaGroups.ts (+2 -0)
➕ src/domain/replayMachineRun.ts (+279 -0)
📝 src/domain/replayMachineRuntime.ts (+91 -0)
➕ src/server/registerReplayMachineTool.ts (+42 -0)
📝 src/server/registerSessionTools.ts (+15 -5)

...and 6 more files

📄 Description

Description

Add a direct, execution-free boundary for finite replay machines. run_replay_machine and rea run-replay-machine now accept the same validated { machine, events } JSON and evaluate it through the existing ReplayMachineRuntime without opening sockets or launching a target.

The result includes:

  • one typed decision per offered event, including unmatched, guard-failed, transition-exhausted, unexpected-reconnect, invalid-state/capture, and limit-exhausted outcomes;
  • a transition journal with state changes and captured alias metadata;
  • one redacted action-table entry per used transition, avoiding repeated action payloads;
  • final/terminal state plus configured and committed limit use.

Captured values and request content are not returned. Action fields containing a captured secret collapse to a stable alias. Direct runs also cap events, aggregate action JSON, action text fields, and possible sensitive-capture operations so response size and redaction work remain bounded.

The canonical CLI/MCP catalog, bundled skill metadata, Process Capture documentation, and translated tool-family counts are updated for the new command.

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)

Validation run:

  • npm run check
  • npm run docs:check
  • replay-machine domain/runtime/MCP/contract tests: 26 passed
  • application workflow CLI integration tests: 5 passed
  • full npm test: 1,281 passed; seven parallel timing/process assertions failed under suite saturation, and all six affected files then passed serially (45 tests)

Real Hopper, Ghidra, browser, and package verification were not run because this change does not alter provider, browser, packaging, or real-tool execution paths.

Tool Contract Impact

Adds the read-only, idempotent session tool run_replay_machine and CLI command run-replay-machine. MCP tool count becomes 97; primary CLI command count becomes 57.

Closes #335


🔄 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/418 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/issue-335` --- ### 📝 Commits (1) - [`b275243`](https://github.com/morluto/rea/commit/b2752434aa0731d0c465c448ef95b1bc6a7ce2f2) feat(process): add direct replay machine runner ### 📊 Changes **26 files changed** (+1157 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -1) 📝 `README_ar.md` (+1 -1) 📝 `README_ja.md` (+1 -1) 📝 `README_ko.md` (+1 -1) 📝 `README_zh.md` (+1 -1) 📝 `docs/process-capture.md` (+21 -0) 📝 `docs/product-catalog.json` (+9 -7) 📝 `docs/verification/managed-conformance-manifest.json` (+2 -2) 📝 `skills/reverse-engineer-anything/SKILL.md` (+2 -2) 📝 `src/cliCommandNames.ts` (+1 -0) 📝 `src/cliProcessCommands.ts` (+44 -0) ➕ `src/contracts/replayMachineExample.ts` (+38 -0) 📝 `src/contracts/toolContractExamples.ts` (+2 -0) 📝 `src/contracts/toolContracts.ts` (+6 -0) 📝 `src/contracts/toolEffects.ts` (+1 -0) 📝 `src/contracts/toolOutputSchemaGroups.ts` (+2 -0) ➕ `src/domain/replayMachineRun.ts` (+279 -0) 📝 `src/domain/replayMachineRuntime.ts` (+91 -0) ➕ `src/server/registerReplayMachineTool.ts` (+42 -0) 📝 `src/server/registerSessionTools.ts` (+15 -5) _...and 6 more files_ </details> ### 📄 Description ## Description Add a direct, execution-free boundary for finite replay machines. `run_replay_machine` and `rea run-replay-machine` now accept the same validated `{ machine, events }` JSON and evaluate it through the existing `ReplayMachineRuntime` without opening sockets or launching a target. The result includes: - one typed decision per offered event, including unmatched, guard-failed, transition-exhausted, unexpected-reconnect, invalid-state/capture, and limit-exhausted outcomes; - a transition journal with state changes and captured alias metadata; - one redacted action-table entry per used transition, avoiding repeated action payloads; - final/terminal state plus configured and committed limit use. Captured values and request content are not returned. Action fields containing a captured secret collapse to a stable alias. Direct runs also cap events, aggregate action JSON, action text fields, and possible sensitive-capture operations so response size and redaction work remain bounded. The canonical CLI/MCP catalog, bundled skill metadata, Process Capture documentation, and translated tool-family counts are updated for the new command. ## 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`) - [ ] 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`) Validation run: - `npm run check` - `npm run docs:check` - replay-machine domain/runtime/MCP/contract tests: 26 passed - application workflow CLI integration tests: 5 passed - full `npm test`: 1,281 passed; seven parallel timing/process assertions failed under suite saturation, and all six affected files then passed serially (45 tests) Real Hopper, Ghidra, browser, and package verification were not run because this change does not alter provider, browser, packaging, or real-tool execution paths. ## Tool Contract Impact Adds the read-only, idempotent session tool `run_replay_machine` and CLI command `run-replay-machine`. MCP tool count becomes 97; primary CLI command count becomes 57. ## Related Issues Closes #335 --- <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:55 +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#1965
No description provided.