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.

4 min readSume
All posts

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

All Developers posts

Written by Sume