Skip to main content

Pipeline

Struct Pipeline 

Source
pub struct Pipeline {
Show 16 fields pub name: String, pub label: String, pub steps: Vec<QedStep>, pub params: HashMap<String, ParamDef>, pub on_success: Vec<Outcome>, pub on_fail: Vec<Outcome>, pub triggers: Vec<Trigger>, pub concurrency_key: Option<String>, pub placement: Placement, pub workspace: WorkspaceMode, pub wraps: Option<String>, pub matrix: Option<MatrixSpec>, pub toolchain: Option<ToolchainSpec>, pub binds: Vec<BindSpec>, pub on_change: Vec<OnChangeHook>, pub finally: Vec<QedStep>,
}

Fields§

§name: String§label: String§steps: Vec<QedStep>§params: HashMap<String, ParamDef>§on_success: Vec<Outcome>§on_fail: Vec<Outcome>§triggers: Vec<Trigger>

Triggers that can start this pipeline. Defaults to [Manual] when omitted.

§concurrency_key: Option<String>

Lock key that serializes concurrent runs. When two runs share a key, the second one is Queued until the first finishes. None defaults to the pipeline’s own name (= one-at-a-time per pipeline). Two pipelines that fight for the same resource (e.g. cargo’s shared target/) can pin to the same key to serialize across pipelines. The sentinel "@parallel" opts out — runs of that pipeline never block each other (use for read-only fan-outs).

§placement: Placement

Where this recipe is allowed to run (W170). Defaults to Placement::Anywhere. The runner enforces this at kick time (R435-F2) — the recipe body itself remains environment-agnostic.

§workspace: WorkspaceMode

How the runner positions the on-disk tree this pipeline builds against (W224). Defaults to WorkspaceMode::Checkout (switch to the run’s ref, bail if dirty). Releases set workspace = "isolated" so a tag is always cut from a clean worktree, never a dev’s live edits; local-only pipelines may set workspace = "live" to build the tree as-is.

§wraps: Option<String>

Optional GHA-workflow this pipeline wraps. Set to "gha:<rel-path>" in TOML (e.g. wraps = "gha:.github/workflows/release.yml") when the pipeline exists because it composes a workflow; the daemon then suppresses that workflow’s auto-ingest so the catalog doesn’t show both entries. Purely advisory — not interpreted by the runner.

§matrix: Option<MatrixSpec>

Native matrix expansion (R505). When present, crate::matrix::plan expands the pipeline into one concrete job per matrix row, with ${{ matrix.<key> }} substituted across each step’s argv / env / cwd. Absent or empty → single-job plan (no expansion). Mirrors GHA’s strategy.matrix semantics (cartesian product + include/exclude).

§toolchain: Option<ToolchainSpec>

Declarative toolchain pinning (R507, W208 pillar 3). [pipeline.toolchain] pins tool versions (rust/xcode/ndk/msvc/…) checked against the host at plan time, so a release fails fast with an actionable error instead of dying mid-build on a missing SDK. Per-step toolchain.<tool> overrides (see QedStep::toolchain) layer on top. Absent (the default) ⇒ no pins, no check. See crate::toolchain.

§binds: Vec<BindSpec>

W209: [[bind]] tables — pipeline-output → in-tree-manifest write-backs. Each bind names a target file/path, a producer step output (or URI escape hatch), and an intent predicate. The runner evaluates them mid-pipeline as each producing step completes; failed steps simply skip the binds that reference them. Defaults to empty for pipelines that don’t bind anything.

§on_change: Vec<OnChangeHook>

W209/R510-F6: [[on_change]] hash-change hooks. Each names a bind selector (matched against a changed manifest_bind::AppliedBind’s path) and an action (fire a pipeline, emit an event, or append to a journal). The runner evaluates them after each step’s binds commit, firing only for binds that actually changed bytes on disk. Empty for pipelines without hooks.

§finally: Vec<QedStep>

W207 Gap #6 (R513-F4): always-run teardown steps. Every step here runs unconditionally after the main step loop and the background-sidecar reap — whether the pipeline passed or failed — making it the home for diagnostics/artifact teardown that must happen either way (upload Playwright traces, docker compose down, collect logs). Sidecar teardown itself is already structural (the F2 background reap), so finally is for the once-after-loop work the reap doesn’t cover.

Semantics (see crate::runner): all finally steps are attempted best-effort — a failing one never aborts the rest (teardown should always run to completion). A finally step that fails marks the run Failed (visible in the run tile + RunFinished) unless it sets on_fail = "continue", but it does not change which terminal outcomes fire — on_success vs on_fail is selected from the pipeline’s work result (steps + sidecars), not from teardown. v1 restricts finally steps to StepKind::Subprocess (the teardown shape); composite/background kinds in finally are rejected at load time.

Implementations§

Source§

impl Pipeline

Source

pub fn effective_concurrency_key(&self) -> &str

The effective concurrency key for this pipeline — concurrency_key if set, otherwise the pipeline name. The daemon’s per-key mutex map is keyed off this value.

Source

pub fn is_parallel(&self) -> bool

true when the pipeline opts out of serialization via the sentinel key "@parallel".

Source§

impl Pipeline

Source

pub fn apply_params(&mut self, params: &HashMap<String, String>)

Substitute {{key}} placeholders in every step’s argv and env values with the supplied params (e.g. provider=groq turns "{{provider}}" into "groq"). Unknown placeholders are left untouched. Required-param validation is the caller’s job — this only performs the textual substitution.

Trait Implementations§

Source§

impl Clone for Pipeline

Source§

fn clone(&self) -> Pipeline

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pipeline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Pipeline

Source§

fn default() -> Pipeline

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Pipeline

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Pipeline

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Fruit for T
where T: Send + Downcast,

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more