Skip to content

@usine/core/attempt/salvage

The Attempt’s unfinished work was committed and pushed to ref; commit is the pushed head.

  • Schema.Class

new SalvagePushed(…args): SalvagePushed

Parameter Type
…args [props: object, options?: MakeOptions]

SalvagePushed

readonly commit: string & Brand<"CommitSha">

readonly ref: string & Brand<"SalvageRef">


Salvage failed; path stays on the Worker for reconciliation. commit is the last known commit, or absent when inspection failed.

  • Schema.Class

new SalvageRetained(…args): SalvageRetained

Parameter Type
…args [props: object, options?: MakeOptions]

SalvageRetained

readonly commit: Option<string & Brand<"CommitSha">>

readonly message: string

readonly path: string

Identifies a persisted Attempt whose Worker may still hold a checkout.

readonly attemptId: string & Brand<"AttemptId">

readonly open: boolean

The Attempt has no outcome yet: an orchestrator restart may reattach it if its parent task is still live.

readonly ref: string & Brand<"SalvageRef">

readonly repository: string & Brand<"RepositoryName">

readonly succeeded: boolean

The Attempt delivered its result, so a leftover checkout is removed rather than salvaged.

readonly worker: string & Brand<"WorkerName">

AttemptSalvage = typeof AttemptSalvage.Type

What the executor preserved of an Attempt’s workspace when the Attempt ended without a Succeeded outcome.


SalvageRef = typeof SalvageRef.Type

The remote branch name that holds one Attempt’s unfinished work, usine/salvage/<run>/<attempt>.

const AttemptSalvage: Schema.Union<readonly [typeof SalvagePushed, typeof SalvageRetained]>

What the executor preserved of an Attempt’s workspace when the Attempt ended without a Succeeded outcome.


const SalvageRef: Schema.brand<Schema.NonEmptyString, "SalvageRef">

The remote branch name that holds one Attempt’s unfinished work, usine/salvage/<run>/<attempt>.


const salvageRefFor: (runId, number) => SalvageRef

The salvage branch an Attempt pushes to when it ends without success.

Parameter Type
runId RunId
number AttemptNumber

SalvageRef