RFC-006 Phase 3: Migrate workflow-manager process logic to WorkerRuntime #295
Reference in New Issue
Block a user
Delete Branch "refactor/rfc-006-workflow-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Migrates all process management (fork, crash recovery, stderr capture, shutdown) from
workflow-manager.tstoWorkerRuntime.Changes
Production code
workflow-manager.ts: 792 → 498 lines. No morefork(),ChildProcess, crash counting, orteeCapturedStderr. Delegates entirely toWorkerRuntime.workflow-manager-support.ts(new): 256 lines of extracted pure functions — IPC dispatch, thread recovery, exit code extraction, constants.worker-runtime.ts: AddedonCrashLimitReachedcallback,WorkerDrainOptsfor per-call shutdown timeout override.worker-pool.ts: Updated for newevict(key, opts)/drain(key, opts)signature.Hot reload approach
Uses
evict+ conditionalstartinstead ofdrain— allows skipping respawn when a workflow is removed from config.Tests
readyevent emissions for async fork schedulingCloses #282