Skip to content

Epic 4 — Build engine (MVP) #218

Description

@brent-hoover

Epic 4 — Build engine (MVP)

Migrate the orchestrator god-object onto the pure decide() state machine.

Tasks:

  1. (Spike 1 resolved, Spike 1: Can decide() be genuinely pure under the async SDK? #201) Migrate all ticket transitions to the state machine.
  2. Migrate review-federation orchestration into the Build engine (currently orchestrator._run_review_federation).
  3. Migrate dependency resolution (_unblock_dependents, _cascade_fail_dependents) into decide() transitions.
  4. Partial multi-action dispatch error handling (BLOCKER before real side effects): decide() can return multiple actions in one transition. The dispatch shell must define what happens when action N succeeds and action N+1 fails — idempotent effect handlers (safe to retry), at-least-once delivery with ack tracking, and a defined recovery state. Without this, a mid-batch failure leaves the ticket in an inconsistent state. Design must be reviewed before any real side effects (agent spawn, worktree merge) are wired through the seam.
  5. Serialized coordinator performance gate (BLOCKER before production use): the initial Build coordinator serializes all ticket processing through one decide() loop. Define an explicit acceptance criterion for maximum ticket throughput before production use — e.g. "N concurrent tickets complete within T seconds on the fixture corpus." Per-ticket concurrency is a post-MVP optimization, but the serialized path must have a measured baseline before any production routing relies on it.

Gate: Spike 1 (#201, done). Depends on: CORE + Substrate + Runtime + Build bones.
Parent: #191 · Plan ref: architecture/plan.md Epic 4 — MVP

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

    code-factoryeval/code-factory improvements revealed by eval runs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions