Skip to content

Split executor.ts so adding a step type is one edit the compiler enforces #298

Description

@mcclowes

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions