httk.workflow.backends

Runner-backend contracts used by the workflow manager.

Classes

AttemptLaunch

Paths and context needed to construct an attempt command.

OutcomeCommit

A published outcome being committed by the authoritative manager.

RunnerBackend

Execution behavior selected by runner.backend in job.json.

PathRunnerBackend

The normal backend which directly executes runner.path.

Module Contents

class httk.workflow.backends.AttemptLaunch[source]

Paths and context needed to construct an attempt command.

runner is the executable the manager resolved for this attempt. A payload runner is the file inside payload; a shared runner is the verified copy the manager staged below control, never the original.

job: httk.workflow.models.JobDefinition[source]
marker: httk.workflow.models.Marker[source]
payload: pathlib.Path[source]
workdir: pathlib.Path[source]
control: pathlib.Path[source]
context_path: pathlib.Path[source]
context: collections.abc.Mapping[str, Any][source]
runner: pathlib.Path | None = None[source]
property runner_command: pathlib.Path[source]

Return the executable to run, defaulting to the payload runner.

class httk.workflow.backends.OutcomeCommit[source]

A published outcome being committed by the authoritative manager.

job: httk.workflow.models.JobDefinition[source]
marker: httk.workflow.models.Marker[source]
payload: pathlib.Path[source]
outcome_path: pathlib.Path[source]
outcome: collections.abc.Mapping[str, Any][source]
class httk.workflow.backends.RunnerBackend[source]

Bases: Protocol

Execution behavior selected by runner.backend in job.json.

name: str[source]
validate(job: httk.workflow.models.JobDefinition, payload: pathlib.Path) None[source]

Validate backend-specific immutable payload requirements.

abstractmethod command(launch: AttemptLaunch) collections.abc.Sequence[str][source]

Return the command argument vector for one attempt.

commit_outcome(commit: OutcomeCommit) None[source]

Complete backend-specific idempotent work before the marker advances.

reconcile(workspace: httk.workflow.workspace.Workspace) None[source]

Repair backend-specific derived views; never alter authoritative state.

marker_changed(workspace: httk.workflow.workspace.Workspace, marker: httk.workflow.models.Marker) None[source]

Refresh derived views after an authoritative marker transition.

class httk.workflow.backends.PathRunnerBackend[source]

The normal backend which directly executes runner.path.

name = 'path'[source]
validate(job: httk.workflow.models.JobDefinition, payload: pathlib.Path) None[source]
command(launch: AttemptLaunch) collections.abc.Sequence[str][source]
commit_outcome(commit: OutcomeCommit) None[source]
reconcile(workspace: httk.workflow.workspace.Workspace) None[source]
marker_changed(workspace: httk.workflow.workspace.Workspace, marker: httk.workflow.models.Marker) None[source]