Skip to content

Operate unattended maintenance runs

Apply trigger, checkpoint and escalation rules to a bounded unattended engineering task.

Scenario

A CI first responder drafts an internal report when documentation tests fail. Retries of the same event can start duplicate jobs. One job lost its context just before sending a notification.

Explanation

Match the trigger to the job. Use a goal with a measurable stopping condition for a bounded cleanup, a schedule for periodic scans, or a verified event for timely triage. Each run needs a scope, permitted tools, time or turn budget, and success and escalation conditions. Keep changes to live systems outside a report-only runner.

Use a stable key for repeated deliveries of the same event. Persist progress and confirmed artifacts as the job runs. When restarting, reconcile notifications and other visible effects with the service that recorded them. Bound retries and alert a human on missing authority, exhausted budget or an ambiguous outcome. Provide the last verified state so the human can pick up the work.

Worked example

The docs responder uses repository, workflow run and attempt as its key. It checks the run's status and writes a private draft linked to that run. When the draft is ready, the responder notifies the docs owner with a link to it. If it reaches its investigation budget first, it escalates with the last verified state. A retry checks whether the draft or notification already exists.