# Publisher setup The worker is a PEP 723 UV script so the same file runs locally or as a Hugging Face scheduled Job. ## Safety defaults - `LIVE_POSTING` defaults to false. - Missing X credentials cause reply review to skip and live publishing to fail before an API call. - Exactly one post can be recorded per campaign day. - 12-31 August 2026 is enforced in `Europe/Brussels`. - The 12 August launch and 31 August recap are fixed. Reply feedback can reorder the 18 prepared middle posts. - Replies are collected and classified but never answered automatically. - Raw reply text is stored only in the private control dataset. ## One-time X authorization Create an X developer Project/App with read and write access and generate OAuth 1.0a user-context credentials for `@ben_burtenshaw`. Store these four values as scheduled Job secrets, never in this repository: - `X_API_KEY` - `X_API_SECRET` - `X_ACCESS_TOKEN` - `X_ACCESS_TOKEN_SECRET` The worker discovers the authenticated account through `/2/users/me` when it reviews mentions. Posts use `/2/tweets` and set `made_with_ai=true` by default. ## Validate and dry-run From a checkout of this dataset: ```bash uv run automation/publisher.py validate \ --queue ../private/queue.json \ --state ../private/state.json \ --catalogue data/experiments.json uv run automation/publisher.py publish \ --queue ../private/queue.json \ --state ../private/state.json \ --catalogue data/experiments.json \ --date 2026-08-12 \ --dry-run ``` ## Scheduled Jobs The intended Brussels times are: | Purpose | Brussels time | August UTC time | |---|---:|---:| | Morning reply review | 09:00 | 07:00 | | Publish | 16:30 | 14:30 | | Evening reply review | 20:30 | 18:30 | Create schedules suspended first. Pass `HF_TOKEN` so the worker can read and update the private control dataset. Add all four X secrets before resuming. Publishing additionally needs `LIVE_POSTING=true`, `X_USERNAME=ben_burtenshaw`, and `X_MADE_WITH_AI=true`. Both publishing and reply review exit before any X API call outside the campaign dates, so accidentally undeleted schedules become no-ops after 31 August. Delete or suspend all three schedules at the end of the campaign.