Lights Out, Part 1: The Flat Loop
说明与用途
博客发布实现自动化:所有检查转移到 CI,PR 在通过结构验证后自动合并,人工监督仅限于短暂的否决窗口。
问题
A blog publishing pipeline was bottlenecked by a human merge gate that caused PR queues to grow, conflicts to accumulate, and editorial oversight to be inconsistent.
结果
The pipeline now operates lights‑out: PRs merge automatically after passing structural checks, with a bounded human override window. Queue depth is reduced to minutes, conflicts are eliminated, and editorial control remains via veto labels.
工作流
- 1. Agent generates draft markdown and pushes to a per‑post branch.
- 2. CI runs post‑guardrails.yml to enforce path allowlist and forbid non‑post files.
- 3. CI runs schema gate to validate frontmatter against a JSON schema and enforce naming conventions.
- 4. CI ensures atomic push: either the entire PR is merged or none of it is applied.
- 5. CI applies a 60‑minute veto window; any PR can be held by labeling "hold" and assigning an editor.
- 6. After the veto window, the PR auto‑merges if no hold is present.
- 7. The site is rebuilt and deployed automatically.
- 8. Audit logs record all actions for traceability.
证据
The rebuild moved the review's actual duties into the machinery, one duty at a time.
A bot PR that only touches one blog markdown file passes the check. A bot PR that touches a template, a config, or a shared page fails and escalates to a human.
The design shift underneath the rebuild was replacing an approval queue with a veto window.
- 记录日期: 2026-09-20T02:45:30.098Z