Commit Graph

12 Commits

Author SHA1 Message Date
ac45011794 fix(wfe-core): propagate step_name into execution pointers
Sets step_name on execution pointers when advancing to next steps,
compensation steps, and parallel branch children so that runtime
consumers can identify steps by name without lookup.
2026-04-05 19:55:12 +01:00
7a9af8015e feat(wfe-core): add LogSink trait and wire lifecycle publisher into executor
LogSink trait for real-time step output streaming. Added to
StepExecutionContext as optional field (backward compatible).
Threaded through WorkflowExecutor and WorkflowHostBuilder.

Wired LifecyclePublisher.publish() into executor at 5 points:
StepStarted, StepCompleted, Error, Completed, Terminated.
Also added lifecycle events to host start/suspend/resume/terminate.
2026-04-01 14:33:27 +01:00
d9e2c485f4 fix: pipeline coverage step produces valid JSON, deno reads it with readFile() 2026-03-26 23:37:34 +00:00
aeb51614cb feat: self-hosting CI pipeline with 12 composable workflows
workflows.yaml defines the canonical CI pipeline: preflight → lint →
test (unit + integration + containers) → cover → package → tag →
publish → release, orchestrated by the ci workflow.

Demonstrates: nested workflows, typed I/O schemas, shell + deno executors,
YAML anchors with merge keys, variable interpolation, error handling with
retry, on_failure hooks, ensure hooks, infrastructure detection (docker/lima).

run_pipeline example loads and executes the pipeline with InMemory providers.
2026-03-26 16:01:51 +00:00
856edbd22e feat(wfe): implement HostContext for nested workflow execution
HostContextImpl delegates start_workflow to persistence/registry/queue.
Background consumer passes host_context to executor so SubWorkflowStep
can start child workflows. SubWorkflowStep auto-registered as primitive.

E2E tests: parent-child workflow, typed inputs/outputs, child failure
propagation, nonexistent child definition. 90% line coverage.
2026-03-26 14:15:19 +00:00
71d9821c4c chore: bump version to 1.0.0 and add repository metadata 2026-03-26 00:59:20 +00:00
386cd2255d docs: add README for workspace and all 7 crates
Root README covers architecture, Rust builder API quick start,
YAML pipeline quick start, provider table, deno executor overview,
feature flags, and testing instructions.

Per-crate READMEs follow consistent structure: one-liner, what it
does, quick start code example, API reference, configuration,
testing, license. Engineering-confident tone throughout.
2026-03-26 00:25:23 +00:00
8d0f83da3c feat(wfe-core): add output_data to ExecutionResult and register_step_factory to host
Core plumbing for YAML workflow support:
- Add output_data field to ExecutionResult for step output capture
- Executor merges output_data into workflow.data after step completion
- Add register_step_factory(key, factory) to WorkflowHost for
  dynamic step registration by external crates like wfe-yaml
2026-03-25 21:16:09 +00:00
c8582eb514 feat: add OpenTelemetry tracing support behind otel feature flag
- Add tracing::instrument spans to executor (workflow.execute),
  host (workflow.start, event.publish, event.process)
- Add otel feature flag to wfe-core and wfe crates
- Add wfe/src/otel.rs helper for OTLP exporter initialization
- Dependencies: tracing-opentelemetry, opentelemetry, opentelemetry_sdk,
  opentelemetry-otlp (all optional behind otel feature)
- Step execution stays at info level, executor internals at debug
2026-03-25 20:41:34 +00:00
88fc6bf7ad feat: add executor tracing, auto-register primitives, and Default impls
- Add info!-level tracing to workflow executor: logs each execution
  round, each step run (with type and name), step completion, and
  workflow completion
- WorkflowHost.start() now auto-registers all built-in primitive step
  types so users don't need to register them manually
- Add #[derive(Default)] to all primitive steps and PollEndpointConfig
- Add tracing-subscriber to wfe crate for the pizza example
- Pizza example now shows full step-by-step execution logs
2026-03-25 20:32:47 +00:00
6d57f8ef22 test: add end-to-end tests and pizza workflow example
E2E tests covering: linear workflows, conditional branching, while loops,
foreach iteration, parallel branches, event-driven waiting, delays,
error handling (retry/suspend/terminate), saga compensation, versioning.

Pizza workflow example demonstrating the full API: parallel prep,
quality checks with retry, oven timer events, and delivery routing.

252 tests total, 93%+ coverage, zero clippy warnings.
2026-03-25 20:14:48 +00:00
8b946e86e3 feat(wfe): add WorkflowHost, registry, sync runner, and purger
WorkflowHost orchestrates the engine: background workflow and event
consumers, start/stop lifecycle, workflow CRUD, event publishing.
WorkflowHostBuilder (owned-self, returns Result).

InMemoryWorkflowRegistry with version support. SyncWorkflowRunner
for testing. WorkflowPurger stub.

Event consumer acquires distributed locks before modifying workflows
to prevent lost updates from concurrent event processing.
2026-03-25 20:11:06 +00:00