Represent a complete pipeline execution for a paper.
pipeline_runs allows multiple executions to coexist for the same paper. A new
run must not silently overwrite previous runs.
pipeline_run_idpipeline_run_id is globally unique inside the processing registry.pipeline_run_id is immutable after creation.paper_id links the run to the processable paper.pipeline_runs is owned by victus-processing.
CREATE TABLE pipeline_runs (
pipeline_run_id TEXT PRIMARY KEY,
paper_id TEXT NOT NULL REFERENCES papers(paper_id),
pipeline_name TEXT NOT NULL,
pipeline_version TEXT NOT NULL,
pipeline_profile TEXT NOT NULL,
status TEXT NOT NULL,
triggered_by TEXT,
parent_run_id TEXT REFERENCES pipeline_runs(pipeline_run_id),
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
started_at TIMESTAMPTZ,
finished_at TIMESTAMPTZ
);
| Field | Type | Description |
|---|---|---|
pipeline_run_id |
TEXT | Primary identifier for the pipeline run. |
paper_id |
TEXT | Paper being processed by the run. |
pipeline_name |
TEXT | Pipeline name. |
pipeline_version |
TEXT | Version of the pipeline definition. |
pipeline_profile |
TEXT | Execution profile used by the run. |
status |
TEXT | Current run status. |
triggered_by |
TEXT / NULL | Actor or process that triggered the run. |
parent_run_id |
TEXT / NULL | Parent run when this run derives from another run. |
created_at |
TIMESTAMPTZ | Run creation timestamp. |
started_at |
TIMESTAMPTZ / NULL | Run start timestamp. |
finished_at |
TIMESTAMPTZ / NULL | Run finish timestamp. |
pipeline_runs must:
pipeline_runs must not store:
pipeline_run_id, paper_id, pipeline_name, pipeline_version,pipeline_profile, and status are required.paper_id must reference an existing papers.paper_id.parent_run_id, when present, must reference an existingpipeline_runs.pipeline_run_id.status must be one of the allowed states.started_at must not be set before created_at.finished_at must not be set before started_at when both are present.createdrunningcompletedcompleted_with_warningsfailedcancelledsupersededCreated when a pipeline execution is registered.
Updated as execution starts, completes, fails, is cancelled, or is superseded.
Not deleted under normal operation.
Superseded by marking the run superseded, not by overwriting it.
ProcessingPapersStageRunsProcessingArtifactsProcessingErrorspipeline_runs.paper_id -> papers.paper_idpipeline_runs.parent_run_id -> pipeline_runs.pipeline_run_idstage_runs.pipeline_run_id -> pipeline_runs.pipeline_run_idartifacts.pipeline_run_id -> pipeline_runs.pipeline_run_idprocessing_errors.pipeline_run_id -> pipeline_runs.pipeline_run_idPipeline runs are append-friendly execution records. Promotion of a new run over
an older run must be explicit.
Documentation clarification or validation wording refinement.
Backward-compatible additions such as nullable columns or new non-breaking
status values.
Breaking schema changes, identity changes, status meaning changes, or field
removals.