Skip to content

Publication Status

Closed enumeration of the publication lifecycle state for a source document or Q&A pair. Standard editorial workflow: draftin_reviewpublishedarchived. Source of truth for the publication state machine: docs/specs/publication-lifecycle-state-machine-spec.md per source §6.2.

None.

keylabelprovenance
draftDraftcore
in_reviewIn Reviewcore
publishedPublishedcore
archivedArchivedcore
  • source_documents.publication_statustext DEFAULT 'published' NOT NULL. Added INLINE at ID-131 M3 (20260628191700_id131_sd_classification_cols); the migration’s own column comment records it as “inline-hot read-path lifecycle field (q_a_search filters publication_status on every query)”. Re-homed off content_items.publication_status, which carried CHECK content_items_publication_status_check; content_items itself was DROPPED at ID-131 M6. source_documents.publication_status carries no DB CHECK — the 4-value enum is soft here.
  • q_a_pairs.publication_statustext NOT NULL DEFAULT 'draft', CHECK q_a_pairs_publication_status_check over the same 4 values (32-q-a-pair.md §2.1). This column is NATIVE to q_a_pairs (baseline T6 schema, not an ID-131 re-home) — this CV was already the correct register for it.
  • Bound to change_type (CV 11) value publication_state — pre-M6, transitions were recorded in content_history; content_history was DROPPED alongside content_items at ID-131 M6. The transition-audit home for source_documents/q_a_pairs publication_status changes post-M6 is not resolved by this CV (q_a_pair_history32-q-a-pair.md §1 — captures q_a_pairs version snapshots generally, not a publication_status-specific audit trail).
  • source_documents.archived_at (baseline column, pre-M3) is the closest adjacent lifecycle-anchor timestamp; source_documents has no published_at column.
  • Layer 2 (administrative metadata): publication state is a top-level lifecycle signal on both source_documents and q_a_pairs rows.
  • lib/governance/publication-transitions.tsVALID_PUBLICATION_STATUSES canonical Zod constant tuple (separate from lib/validation/schemas.ts per spec note there).
  • lib/ingest/draft-final-to-publication-status.ts — draft → published transition logic.
  • lib/mcp/tools/content.ts, lib/mcp/tools/search.ts — MCP publication-state filter (default published).
  • app/api/items/* — publication state machine entry points (pre-M6 content_items-shaped; not re-verified against source_documents by this subtask).
  • app/library/library-content.tsx, app/item/[id]/item-detail-client.tsx — editorial UI surfaces.
  • See docs/specs/publication-lifecycle-state-machine-spec.md for transition rules.
  • Closed enum, but only HARD-enforced on q_a_pairs (DB CHECK); source_documents.publication_status is currently soft (no CHECK) — a candidate ID-131-successor hardening item, not raised as a blocking flag here.
  • See docs/specs/publication-lifecycle-state-machine-spec.md for transition rules.