Files
canina/scripts/content-research/daily_publisher.py
T
2026-10-28 08:02:30 +00:00

18 lines
1.0 KiB
Python

"""Versioned integration entrypoint; not installed in the active cron runtime.
The supplied publication_preflight callback MUST run the existing guarded NEW preflight,
including publisher_state ownership, quota, immutable QA, backup and intent.
It must return the exact reviewed Blog payload without writing a Blog.
Only the consumer publication endpoint writes; no update or automatic retry path exists.
"""
from consumer import digest
def run_new(consumer, run_id, research, draft_content, independent_review, publication_preflight):
packet = consumer.prepare(run_id, research) # Persist research BEFORE drafting.
draft = draft_content(packet) # Complete fetched CEO directive, not just a keyword.
# Reviewer receives exact immutable content/directive plus digests. A valid receipt
# establishes traceability, not a machine guarantee of free-text obedience.
receipt = independent_review(packet, draft, digest(packet), digest(draft))
return consumer.publish(run_id, packet, draft, receipt, publication_preflight)