Skip to content

FE-1125: Reconcile executor run driver#285

Open
kostandinang wants to merge 4 commits into
ka/fe-1118-executor-host-promotionfrom
ka/fe-1125-executor-orchestrate-loop
Open

FE-1125: Reconcile executor run driver#285
kostandinang wants to merge 4 commits into
ka/fe-1118-executor-host-promotionfrom
ka/fe-1125-executor-orchestrate-loop

Conversation

@kostandinang

@kostandinang kostandinang commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds execute_orchestrate: drives a run end-to-end (created → run-local promotion_prepared) instead of calling each execute_* step by hand.
  • src/executor/orchestrate.ts — a pure RunScheduler (linearScheduler) plus a generic drive() loop; run.json status is the loop state, and per-slice readiness comes from completion facts.
  • Halts without advancing if a step cannot execute. Host promotion stays off the driven chain (separate accepted surface).
  • ready() returns a set (length-1 today) so a future PetriScheduler drops in without reshaping the loop (D102-L).
  • Clarifies the AgentRunnerPort fail-closed message so a launch without subagent deps is diagnosable, not mistaken for an unbuilt feature (surfaced during driver testing).

Verification

  • npm run verify

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New orchestration path composes many lifecycle steps and injected ports in one call; tests use fake ports and assert parity/halt semantics, but real LLM+git E2E is still unexercised per plan notes.

Overview
Adds end-to-end executor run driving so a cook run can advance from created through run-local promotion_prepared in one CODE-mode call instead of stepping each execute_* tool manually.

Core: src/executor/orchestrate.ts introduces a pure RunScheduler (linearScheduler) whose ready() returns a set of next steps (length 1 today) from run.json status and slice completion facts, plus drive() that loops those steps through existing lifecycle functions and injected ExecutionPorts. Failed steps halt without advancing metadata; host promotion stays off the driven chain.

Product surface: New execute_orchestrate Pi tool (registered in execute mode, wired in app extensions) calls drive() with model/runtime context for agent slices. D102-L is added to SPEC; PLAN/topology docs mark the orchestrate-loop frontier as built.

Tests: Parity vs hand-cranked lifecycle, halt on port failures, scheduler contract, and once-per-slice runner invocation. AgentRunnerPort missing-deps error text is clarified (no behavior change).

Reviewed by Cursor Bugbot for commit e1646b0. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant