Skip to content

P0: Effect 4 migration left the engine unable to run any workflow #1462

Description

@roninjin10

The Effect 4 migration (d9c96769380abdf1e014) landed main in a state where the engine cannot execute a workflow at all. Three distinct breakages; the first two are fixed on main, the third is open.

Fixed on main

  1. Committed merge-conflict markerspackages/engine/src/engine.js shipped an unresolved conflict block, making the module a syntax error (Unexpected <<). Every smithers command and every engine import died. Fixed in 6cd0020d03.
  2. Effect.either removed in Effect 4 — 11 source call sites plus 2 test call sites survived the migration (packages/engine/src/events.js, packages/engine/src/hot/{overlay,HotWorkflowController}.js, packages/sandbox/src/sandboxPath.js, apps/cli/src/{index,supervisor}.js). Every workflow render failed with Effect.either is not a function. Fixed in aaadd41d0d by porting to Effect.result ("Left"/"Right""Failure"/"Success", .left/.right.failure/.success).

Still open

  1. packages/engine/src/effect/workflow-make-bridge.js is written against the Effect 3 workflow API. Reproduce with any workflow:
bun apps/cli/src/index.js up .smithers/workflows/hello.tsx --input '{}'
# RUN_FAILED: run workflow: undefined is not an object (evaluating 'options.payload')
  • Workflow.make is now make(tag, options), not make({ name, payload, ... }). Passing the tag positionally gets past this error.
  • The next failure is WorkflowInstance.initial is not a functionWorkflowEngine.WorkflowInstance.initial(workflowBridge, runId) no longer exists in effect@4.0.0-beta.102.

There are likely more sites past that point; the bridge needs a real port rather than incremental patches, which is why it is not included in the two fixes above.

Impact

While (3) is open, main cannot run a single workflow — no up, no oneshot, no monitor, no e2e. Any CI job that executes a workflow is red.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions