Step 5 of the suggested order in epic #264, filed so it survives the epic closing.
src/interpreter/executor.ts is 1,954 lines and still growing (it was 1,856 at the review commit). Step dispatch, stage orchestration, resume/replay, checkpointing, and event emission all live in one class, so adding a step type means touching several hand-maintained switch sites — the growth pattern that produced #261's whole family of "silently misreported step" bugs.
Goal: adding a step type is one edit (register a handler) and the compiler enforces the rest — an unhandled step type is a type error, not a runtime fall-through. Most step handlers already live in src/interpreter/step-handlers/; the executor's dispatch, per-step effect-id/checkpoint plumbing, and result bookkeeping are what need extracting.
Related: #199 (durability honesty pass) touches the same replay code paths — whichever lands first will make the other easier.
Step 5 of the suggested order in epic #264, filed so it survives the epic closing.
src/interpreter/executor.tsis 1,954 lines and still growing (it was 1,856 at the review commit). Step dispatch, stage orchestration, resume/replay, checkpointing, and event emission all live in one class, so adding a step type means touching several hand-maintained switch sites — the growth pattern that produced #261's whole family of "silently misreported step" bugs.Goal: adding a step type is one edit (register a handler) and the compiler enforces the rest — an unhandled step type is a type error, not a runtime fall-through. Most step handlers already live in
src/interpreter/step-handlers/; the executor's dispatch, per-step effect-id/checkpoint plumbing, and result bookkeeping are what need extracting.Related: #199 (durability honesty pass) touches the same replay code paths — whichever lands first will make the other easier.