Skip to content

Shrink the Promise run loop to a small core with four internal extension points #280

Description

@usirin

Stories: 7
TDD: yes

What to build

Replace the body of the Promise engine's loop with a small core, as in spike #264. The core does serial transitions, save before effects, reconcile subs, run Cmds and dispatch outcomes, and has no special case for any built-in. Rebuild the built-ins on four internal extension points:

  • update middleware (returns null for "no transition"): identity filter, supervision, dev checks
  • interpret middleware: the ok-schema check, clock stamping
  • store wrapper: fenced store
  • commit observer: events, terminal / done

Fix the extension order in code (the identity filter sits inside supervision). Model the stop() drain / discard gate and ctx contributions, which #264 left out. These stay internal, not a user plugin API (#268). withTelemetry moves here as an internal extension.

Acceptance criteria

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

    p1created by fabrika status bootstrap label-taxonomyready-for:agentfabrika pipeline taxonomy (created by hand — status bootstrap label-taxonomy does not mint it)status:triagedcreated by fabrika status bootstrap label-taxonomytype:featurefabrika pipeline taxonomy (created by hand — status bootstrap label-taxonomy does not mint it)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions