A policy snapshot file and a Python check before each AI ad batch
Keep platform AI rules in a JSON file with source and read date, and run a short Python check that flags rules older than 30 days before you queue a batch.

Store each rule as data and refuse to queue a batch when a rule is stale. The rules in this area moved several times in August and September 2026; Common Thread, for example, reports Meta changes on 08-21, 08-26, 08-27, 09-15 and 09-29 (read 2026-10-02). A file with a read date turns "did anyone re-check this" into a failing script.
What goes in the file?
One object per rule: platform, the claim in your words, the source URL, whether the source is the platform's own page, and the date you read it.
[
{"platform": "tiktok",
"claim": "Four penalty tiers (reported)",
"source": "https://www.auditsocials.com/blog/tiktok-ai-content-disclosure-rules-2026",
"platform_page": false,
"read": "2026-10-02"}
]How do you check it?
The script exits non-zero when any rule is older than 30 days or comes from a non-platform page. Put it in front of whatever queues your Sume jobs.
import json, sys
from datetime import date, timedelta
limit = date.today() - timedelta(days=30)
bad = []
for r in json.load(open('policy.json')):
if date.fromisoformat(r['read']) < limit:
bad.append((r['platform'], 'stale'))
if not r['platform_page']:
bad.append((r['platform'], 'not a platform page'))
for b in bad:
print(*b)
sys.exit(1 if bad else 0)Should the check block the batch?
Block on stale, warn on third-party. Waiting a day to re-read a rule costs less than re-rendering a batch. Rendering is the part Sume bills, and the bulk-run and spend-cap posts linked here cover how to size it first. The 30-day limit is an arbitrary choice; shorten it in a week with news.
Sources
Related posts
More in Developers
- Poll a Sume bulk-run queue in Python and list items not completed
A short asyncio script that polls GET /v1/format-run-queues/{id} until the queue is completed, prints the counts and lists every item that did not complete.
- Dedupe Sume webhooks with Postgres ON CONFLICT DO NOTHING
Insert job_id or request_id with ON CONFLICT DO NOTHING RETURNING. A returned row means first delivery; no row means a duplicate. Includes the SQL.
- Preflight a video request against the catalog before you pay
Check duration, resolution, aspect ratio, frame types and reference types against a GET /v1/videos/models entry in Python, and catch the 400 fields up front.
- Python preflight for a YouTube Short: length and shape check
A short Python script that reads Sume's video inspect probe and flags a clip over 180 seconds or not square or vertical, including 90 degree rotation.
Written by Sume