From 1ebb57e1dff1edd6dd1fb95d3e85dfdcede5eb4d Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Wed, 10 Jun 2026 18:44:12 +0200 Subject: [PATCH] feat(podcasts): publish podcasts to zero --- surfsense_backend/app/zero_publication.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/surfsense_backend/app/zero_publication.py b/surfsense_backend/app/zero_publication.py index d2755d0a1..a97a4d27c 100644 --- a/surfsense_backend/app/zero_publication.py +++ b/surfsense_backend/app/zero_publication.py @@ -55,6 +55,22 @@ AUTOMATION_RUN_COLS = [ "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] = { "notifications": None, "documents": DOCUMENT_COLS, @@ -65,6 +81,7 @@ ZERO_PUBLICATION: Mapping[str, Sequence[str] | None] = { "chat_session_state": None, "user": USER_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 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") return expected