Claude Code Automation: Publish Gates Blocked 23 Bad Posts in 10 Days
Description and use
Implementing a publish gate in a Claude Code‑generated pipeline prevented 23 defective posts from going live over 10 days, blocking 37 runs and identifying four failure types.
Problem
Automated publishing pipelines can release posts with defects that are not caught by model prompts, leading to unwanted content going live.
Outcome
The gate prevented 23 defective posts from publishing, blocked 37 runs, and identified 4 failure types that led to rule creation.
Workflow
- 1. Give each checker three exit codes: 0 clean, 1 defect, 2 checker broken.
- 2. Append one JSON line per run with timestamp, target, exit code, and defect names.
- 3. Make the publish step call the gate and stop on exit 1, embedding the gate inside the publisher.
- 4. Write the ledger immediately after the irreversible action, not at batch end.
- 5. Restrict completion reports to checker name, exit code, and human‑visible output.
- 6. Log every failure as symptom, cause, fix, and turn fixes into new checks.
Evidence
The gate ran 248 times, blocked 37 runs, and stopped 23 posts, of which 11 were fixed and passed
One run can carry two defects, so the reasons add up to 38 across the 37 blocked runs
Give every checker three exit codes. 0 is clean, 1 is a defect, 2 means the checker itself is broken
- Record date: 2026-10-25T06:11:29.592Z