Skip to content

FE-1125: Reconcile executor run driver#285

Open
kostandinang wants to merge 6 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 6 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
The new driver chains git worktree, agent, test, and run-local land steps; behavior is heavily tested but failures mid-run now depend on halt semantics instead of explicit per-step calls.

Overview
Adds execute_orchestrate, a single tool/agent surface that advances an executor run from created through run-local promotion_prepared instead of invoking each execute_* lifecycle step manually.

The core change is drive() in orchestrate.ts: a loop reads run.json, asks a pure RunScheduler (linearScheduler today) for the next ready step, and dispatches to the existing step functions via ExecutionPorts. Slice progression uses completion facts (completedSliceIds), not only the coarse status enum. The loop halts without advancing when a step returns unchanged status (failed tests, land failures, no changes). Host promotion/land stays off the driven path—the scheduler returns no steps at promotion_prepared. The scheduler’s set-returning ready() contract is shaped for a future Petri-style driver.

Wiring: Pi extension registration, executor allowed-tools policy, execute_status ported-tools list, and a large orchestrate.test.ts suite (end-to-end drive, manual-crank parity, halt cases).

Also clarifies AgentRunnerPort’s fail-closed message when subagent deps are missing (diagnosable vs “not implemented”). Minor test tweak for review-set render-honesty (nodes.2.body vs wildcard).

Reviewed by Cursor Bugbot for commit 70f9687. 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.

@kostandinang kostandinang self-assigned this Jul 3, 2026
@kostandinang kostandinang requested a review from lunelson July 3, 2026 07:48
@kostandinang kostandinang force-pushed the ka/fe-1118-executor-host-promotion branch from c8f0c42 to 9be8e5f Compare July 3, 2026 16:52
@kostandinang kostandinang force-pushed the ka/fe-1125-executor-orchestrate-loop branch from e1646b0 to 7078d9f Compare July 3, 2026 16:52
@kostandinang kostandinang force-pushed the ka/fe-1118-executor-host-promotion branch from 9be8e5f to 4867ea0 Compare July 3, 2026 16:59
@kostandinang kostandinang force-pushed the ka/fe-1125-executor-orchestrate-loop branch from 7078d9f to 70f9687 Compare July 3, 2026 16:59

kostandinang commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

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