Skip to content

Patterns

Pattern: ci-sweeper

A red main blocks everyone behind it, so this kit fires the instant CI finishes and tells you whether the failure is a flake worth ignoring or a real…

A red main blocks everyone behind it, so this kit fires the instant CI finishes and tells you whether the failure is a flake worth ignoring or a real break worth fixing — plus a scheduled sweep every ten minutes to catch anything the event dropped. Its eventual job is to fix real failures for real, in an isolated worktree, as a reviewable PR; today it only classifies and drafts, because every kit here earns write access, it doesn't start with it.

Quick facts

FieldValue
CategoryA · Repo maintenance
Heartbeatschedule/event
Cadence5–15m
LevelL1 (report-only) — catalog target L2, an earned promotion
CostVery high
GroupA — course-native

The six parts

PartThis kit
Heartbeatschedule/event — a CI-completion event fires a beat immediately; a 10-minute sweep is the reconciliation pass
Bodyreads CI run logs and main's status; writes only ci-sweeper-report.md, its own state file, and the run log
Spineci-sweeper-state.md — per-failure status and classification
Stopping conditiona beat is complete when the triggering failure has a report entry: classification, why it matters, a suggested-not-applied fix
Checkerloop-verifier (read-only) — grades the classification and format; never the maker
Human gateyou decide whether to apply the suggested fix, and separately whether this kit has earned promotion to L2

The three valid stops

  • Success — each beat: the report has a classified, ranked entry for the triggering failure with a suggested fix, and state marks are updated.
  • Limit — 40 runs/day or 300k tokens/day.
  • No progress — 3 consecutive beats with no new failure on main → log a quiet beat and stop.

Source: Panaversity's Loop Engineering: A Crash Course (S1), Part V §15A's catalog entry (schedule/event, 5–15m, L2 target, Very high — "red main blocks everything," the fleet's top priority) and the doom-loop retry-cap bound from docs/10-operating/infinite-loops.md, scenario 1. Full attribution: resources/sources.md.