How Bleep runs an incident and reads a message

From a failure on your host to the report. The steps and every way between them are the ones Bleep's incident graph wires, and a test keeps this page and the graph the same.

What the watcher reads

  • Docker events over SSH, every 15 s
  • Your URLs, every 30 s
  • Disk, memory and load, every 60 s
  1. 1Notices

    A container dies or keeps restarting, a URL stops answering, or a host runs low on disk or memory, or stays under heavy load. Bleep waits out a grace window first, so a container that comes back by itself opens nothing.

    • Then: Opens an incident
  2. 2Opens an incident

    The failure opens an incident, or joins the one already open for that service. You hear about it on the dashboard, and in Telegram if you set it up. Its run starts in the background.

    • Then: Gathers
  3. The incident graph

    3Gathers

    The containers, the last 200 log lines of the broken ones, the host's basics, your rules, the three most similar past incidents and what Bleep knows about the service. No model call.

    • Then: Investigates
  4. 4Investigates

    The model reads logs, events, container details and the host with read-only tools, at most 8 calls a round. Every result is capped, redacted and marked as untrusted. If the run's cost budget is spent, it stops here and reports.

    • Then: Diagnoses
    • Budget spent: Reports
  5. 5Diagnoses

    It names the root cause, the evidence and how sure it is. Unsure after the first round, it investigates once more, then goes on marked unsure.

    • Then: Proposes
    • Unsure, once: Investigates
  6. 6Proposes

    One to three steps from the allowlist, like start shop-db, or no action and exact instructions for you. Code checks the plan before anyone is asked, and a refused plan goes back to the model once.

    • Then: Asks you
    • Nothing to run: Reports
  7. 7Asks you

    The plan goes to the dashboard, and to Telegram if you set it up, with Yes, go ahead, No, leave it, and Tell Bleep something. The run waits, through a restart if need be. The first answer wins, a reminder goes out every hour, and nothing is ever approved by itself. A plan Bleep's own checks refused twice gets no yes button.

    • You tell it something: Proposes
    • Yes: Runs the fix
    • No: Reports
  8. 8Runs the fix

    It reads every target again first. If one changed since your yes, or the guard now refuses a step, nothing runs and Bleep plans again, at most three times a run. Otherwise the approved steps run in order, each logged before and after, and a failed step skips the rest.

    • Then: Checks
    • Target changed: Proposes
    • Out of re-plans: Reports
  9. 9Checks

    It waits 20 seconds, then checks up to three times that every planned container runs healthy and every URL answers. A failed check investigates again, at most twice. After that the outcome is unverified, never fixed.

    • Then: Reports
    • Check failed: Investigates
  10. 10Reports

    Code sets the outcome, and only a passed check makes it resolved. The model writes the summary, the cause and the follow-ups from Bleep's record, with anything copied from a log cut out. The report goes to every channel and into memory for the next incident.

    The run ends here.

Every step in more detail, with the code that runs it, is in the architecture, and the graph itself is one short file.