Repository navigation
Make core orchestration state transitions explicit #21227
JustYannicc
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The status schemas name run, provider-turn, and runtime-request states, but they do not describe legal transitions. The code also repeats provider-turn terminal checks in several places. That makes each state change harder to review and gives those checks room to drift.
A previous upstream issue (#1882) asked for guards in the older Turn decider and was closed as misfiled. This proposal covers current Orchestration V2 event types and keeps transition decisions in command handlers.
I propose starting with a narrow contract-first slice:
The working branch is proposal/explicit-lifecycle-catalog-20261018 at
4f9cd5ccb15dae75ad64d1261726387f9e36c2d3, based on upstreammainat9c161462c94f7d9d6d9169da5c841457cbadf213. The replay uses a recorded Codex protocol fixture and a temporary workspace. It checks the resulting domain-event history and stored events; it does not seed projections directly. The demo data is a local file operation that requires approval.This branch covers only run, provider-turn, and runtime-request transitions plus one replay path in a static catalog. It is not a loader that seeds a development environment into arbitrary named states. Provider-session and other lifecycle tables, the UI states that surface them, a scenario CLI or dev menu, an all-state coverage gate, and model-based command-invariant tests remain separate follow-ups. No runtime dependency was added.
Would maintainers approve this first slice? Which additional lifecycles, if any, should be included before a PR?
Verification on the branch:
The focused lifecycle contract and replay tests passed (2 files, 3 tests). Filtered contracts/server typechecks passed with concurrency 2. Targeted lint passed on all changed files; after removing one unused import, lint passed again on the changed execution file.
All reactions