Skip to content

Distributed work-runner contract types

State: open/verified · Kind: module · Audience: system

  • Domain-blind contract types for a distributed work runner: work orders, the compiled DAG format, run records, leases, the coordination and work-order-source ports, and the stdio step protocol, projected to TypeScript by ontogen at build time.
  • The type layer of D-VSLI-distributed-work-runner-architecture for product PR-FRMN-foreman. No scheduler binding, supervisor loop or CLI lives here yet.

foreman defines the wire vocabulary a scheduler, supervisor and runner agree on: a minimal WorkOrder (goal, acceptance, kind routing key), a versioned DagDef with nodes and edges kept separate, a tagged StepDef for what a node runs (built-in handler, shell command, child process, or an agent through the agent-driver port), a symmetric stdio StepMessage protocol, an append-only RunHeader event journal, and TTL-and-fencing Lease types over a compare-and-swap Coordination port. The crate is domain-blind by build constraint: no SDLC entity, task or corpus schema may enter it. Every type is projected to generated/bindings.ts and generated/client.ts so TypeScript consumers bind to the same definitions. NodeStatus and TriggerRule are re-exported from C-PPXU’s graph-scheduler crate.

  • WorkOrder and its WorkOrderSource port (work_order.rs, source.rs).
  • DagDef: the compiled, versioned workflow format with trigger rules (dag.rs).
  • StepDef: tagged step implementations (step.rs).
  • StepMessage: the stdio JSON-RPC step protocol between engine, runner and step (protocol.rs).
  • RunHeader and its sequence-ordered event journal (run.rs).
  • Lease with TTL and fencing over the Coordination CAS port (lease.rs, coordination.rs).
  • The read-only status read model and api::v1::status service functions (status.rs, api/).
  • A committed TypeScript projection emitted by build.rs, drift-checked by tests/codegen_sync.rs.
  • packages/rust/foreman/src/: work_order.rs, dag.rs, step.rs, protocol.rs, run.rs, lease.rs, coordination.rs, source.rs, status.rs, api/mod.rs.
  • packages/rust/foreman/build.rs and generated/{bindings,client}.ts; tests in tests/codegen_sync.rs and tests/round_trip.rs.
  • packages/rust/foreman/
  • packages/rust/foreman/src/lib.rs

← Back to Capabilities