paper_pipeline_state stores the latest lifecycle state for one paper stage
attempt. Detailed events remain in local pipeline_events.jsonl.
pipeline_state_id, derived from the stage-attempt identity.(paper_id, run_id, stage, attempt_number) must be unique.paper_processing_state.paper_id, stage, run_id, pipeline metadata, and updated_at are required.attempt_number must be greater than zero.pending, running, succeeded, failed, skipped,blocked, or warning.ended_at; the first start sets started_at.Lifecycle events and explicit stage-state updates upsert the same attempt row.
Rows are rebuilt only by an explicitly destructive schema reset.
paper_processing_state summarizes these rows by paper_id. Scientific tables
use logical paper identifiers rather than foreign keys to this operational
table.
The executable schema is
ops/sql/005_simplified_postgres_schema.sql.