feat(podcasts): publish podcasts to zero

This commit is contained in:
CREDO23 2026-06-10 18:44:12 +02:00
parent 5d956e8d03
commit 1ebb57e1df

View file

@ -55,6 +55,22 @@ AUTOMATION_RUN_COLS = [
"created_at", "created_at",
] ]
# Enough to drive the lifecycle UI by push: status, the reviewable brief, and
# its version. The bulky source_content and transcript are deliberately excluded
# and fetched over REST when a gate opens.
PODCAST_COLS = [
"id",
"title",
"status",
"spec",
"spec_version",
"duration_seconds",
"error",
"search_space_id",
"thread_id",
"created_at",
]
ZERO_PUBLICATION: Mapping[str, Sequence[str] | None] = { ZERO_PUBLICATION: Mapping[str, Sequence[str] | None] = {
"notifications": None, "notifications": None,
"documents": DOCUMENT_COLS, "documents": DOCUMENT_COLS,
@ -65,6 +81,7 @@ ZERO_PUBLICATION: Mapping[str, Sequence[str] | None] = {
"chat_session_state": None, "chat_session_state": None,
"user": USER_COLS, "user": USER_COLS,
"automation_runs": AUTOMATION_RUN_COLS, "automation_runs": AUTOMATION_RUN_COLS,
"podcasts": PODCAST_COLS,
} }
@ -92,7 +109,9 @@ def _expected_columns(conn: Connection, table: str) -> list[str] | None:
return None return None
expected = list(columns) expected = list(columns)
if table in {"documents", "user"} and _column_exists(conn, table, "_0_version"): if table in {"documents", "user", "podcasts"} and _column_exists(
conn, table, "_0_version"
):
expected.append("_0_version") expected.append("_0_version")
return expected return expected