Repository navigation
Closed
Labels
proposalA proposed change to Itinera's behaviourstatus: readyAgreed; ready for the spec pull requesttier: 1Belongs to tier 1
Description
Agreed design as of 2026-10-02. Proposed by @marlon-sousa; the original text is in this issue's edit history.
The local executor (tier 1)
What an executor is, how it is called, the tier 1 capabilities, and the guarantee that nothing leaks between journeys. Builds on proposals 0002, 0008, 0009, 0010, 0011 and 0032.
Executors
- Executors differ in capability, never in meaning. A lifecycle, an outcome, a status or an event means the same under every executor.
- The local executor runs a journey in process, with no persistence: a journey lives only as long as the call that runs it, and nothing survives a crash. Durable executors belong to a later tier.
Running a journey
run(workflow instance)runs exactly one journey and returns its result: succeeded, failed or aborted (proposal 0009). It never throws for anything that happens inside the journey; failures and aborts are in the result. An asynchronous executor returns the same result asynchronously.- The executor asks the workflow instance for its step descriptors, data and reporters (proposals 0009 and 0011).
- A workflow instance runs at most one journey. Handing an instance that has already run, or is running, to an executor is a configuration error: its data bag already belongs to a journey.
Stateless, one journey at a time
- An executor is stateless between journeys. When
runreturns, nothing of that journey remains in the executor: no data, no statuses, no reporters. An executor may run many journeys, one after another. - One journey at a time. An executor never runs two journeys concurrently. A call to
runwhile another journey is running on the same executor is refused before anything starts: no journey, no events. Implementations should make this impossible where their language allows it. For parallelism, create several executors, for example one per thread. - One dispatcher per journey. The default dispatcher is created afresh for each journey. A dispatcher given to the executor (proposal 0011) is used for each journey in turn; the workflow's reporters added for a journey are removed when that journey ends, so they never receive another journey's events.
Capabilities in tier 1
- Execution modes:
syncandasync. An executor declares which modes it accepts, for steps, hooks and reporters alike. Anything it does not accept is a configuration error (proposal 0032): caught when the workflow is built if the language can, otherwise when the journey runs. A language offers whichever executors make sense for it; whether an asynchronous executor also accepts synchronous steps is that language's choice, stated as a capability. - Configuration checks:
build-time-configuration-checkorrun-time-configuration-check(proposal 0032). A language claims exactly one. - A language claims its capabilities alongside its tier, and its conformance runner runs the cases tagged with them.
Not in tier 1
- Executors that require particular hooks, for example for pending steps: with durable runs.
- Persistence, resuming after a crash, and pending steps: durable runs.
Tier
Metadata
Metadata
Assignees
Labels
proposalA proposed change to Itinera's behaviourstatus: readyAgreed; ready for the spec pull requesttier: 1Belongs to tier 1
Activity
marlon-sousa commentedon Oct 2, 2026
Claude summary
Posted by Claude (Claude Code) from a maintainer's account, as described in PROCESS.md.
Evaluated with the maintainer outside the thread on 2026-10-02; every question was settled. The issue body holds the agreed design. The conformance checklist is updated in itinera-dev/conformance#12. This proposal is ready for a maintainer to set
status: ready.github-actions commentedon Oct 2, 2026
Accepted on 2026-10-02 in #37.