Skip to content

Production runner: wire bounded autonomous worker loop with durable worker tasks #15

@MrFlashAccount

Description

@MrFlashAccount

Goal

Wire /buran run to execute a bounded autonomous worker loop using the durable worker task model from #16: spawn/wait/ingest/transition to the next stage for one approved run.

Dependencies

Current state / evidence

  • README.md positions Buran as the execution layer that turns approved work into review-ready handoffs and tracks durable local state.
  • src/entrypoints/cli.js help still says the current scope is a "local runner skeleton" with no worker execution.
  • src/gates/implementation-contract.js has an implementation-harness-dispatch.v1 contract, but the default adapter is implementation-harness-unavailable.v1 and fails closed.
  • src/application/final-report.js still has unsupportedStageMessage(state) for stages not executed by adapters.
  • Open issue Research task-level orchestration model for Buran #2 covers task-level orchestration research; this issue is the pragmatic production slice for a single run, not the full architecture model.

Scope

  • Use worker tasks from Production runner: add durable worker task model and completion ingestion #16 to spawn implementation/fix/review work through configured adapters.
  • Wait for or poll worker completion through the durable completion ingestion boundary, then transition deterministically to verification, internal review, fix loop, blocked, or handoff-ready states.
  • Enforce bounded attempts/retries and fail-closed behavior when adapters are unavailable, completions are missing/conflicting, or policy blocks action.
  • Preserve epoch/attempt history across implementation, verification failure, internal-review failure, and fix redispatch.
  • Surface current worker task, blocker, and next safe action in the runner report/control-plane output.

Acceptance criteria

  • Given a sufficient approved packet and an acquired/valid workspace lease, /buran run --run <run_id> ... can create a worker task, invoke a configured implementation worker/harness adapter, ingest completion, and record completed implementation evidence.
  • Verification and internal review gates run only after valid implementation/fix worker completion evidence exists.
  • PASS, FAIL, and BLOCKED verification/review results transition through the existing state machine deterministically.
  • Failed verification or internal review can enter the existing bounded fix loop and redispatch fix work without losing prior epoch/attempt/task history.
  • Missing adapter, missing completion, conflicting completion, retry exhaustion, and policy denial all fail closed with structured blockers.
  • All stage transitions and task events are recorded in the registry snapshot/events and reflected in formatted runner reports.
  • Tests cover happy path, blocked implementation dispatch, failed verification -> fix loop, failed internal review -> fix loop, retry exhaustion, and idempotent resume from already-recorded worker artifacts.

Non-goals

Planning notes / questions

Suggested labels

  • enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions