Skip to content

A self-improving SRE loop

RunLore investigates alerts and answers from a knowledge base (KB). When it keeps failing on the same resource, it files a knowledge-gap issue. Maku can turn that issue into a drafted KB entry, and a separate path turns an alert into a fix pull request. Together they aim at a loop in which each blind spot becomes knowledge the next investigation can recall.

This loop is not proven closed. Two recorded runs on the reference cluster proved most of its steps. The recall step matched the new entry but was rejected by RunLore’s own verification, and the remediation path stops before verification. Both gaps are tracked below. Every claim on this page comes from the two results runbooks: gap leg and remediation leg.

The loop

    flowchart LR
  I[Critical alert on resource X] --> R[RunLore investigates<br/>instant recall, kb_search]
  R -->|unresolved, recurrence_threshold times| G[knowledge-gap issue<br/>filed by RunLore]
  G -->|maintainer labels factory/ready<br/>or the kb-gaps routine| M[Maku run drafts<br/>one Playbook entry]
  M --> P[PR on the KB repository<br/>shadow decision]
  P -->|maintainer reviews + merges<br/>Refs #gap| KB[(knowledge base)]
  KB -->|git sync| R
  

Without Maku, the arrow from the gap issue to an entry is a person. Everything else is unchanged.

What was proven, and what was not

StepResultRecord
RunLore files a gap for an unresolved, critical alertProvenknowledge-gap: apps/podinfo, runlore-kb#217
A maintainer’s factory/ready label starts a taskProven, after one fixThe first task escalated needs_author: RunLore’s gap issue states no acceptance check. Adding one to the issue let the next task run
A Maku agent drafts one entry under CONTRIBUTING.mdProvenrunlore-kb#218, one new file, authored by the agents App; the docs merge policy recorded a shadow decision (would merge: 1 of 5 files, 83 of 100 lines)
A maintainer reviews the drafted knowledgeProvenThe review requested changes: the draft named a non-existent alert, led with the wrong cause and wrote Fixes instead of Refs. The revision run applied all three. Total cost $0.54
The factory merges on the maintainer’s approvalNot provenAfter the revision, the approval led to nothing; the maintainer merged by hand (maku#887)
The next incident recalls the entryPartialThe first repeat missed: the alert carried no workload labels, fixed in the alert rule. The next repeat matched the entry instantly (reranker 0.98, recall 0.90), then RunLore’s verification rejected it, because no tool reads a paused Crossplane App or a suspended Flux object (runlore#643)
Alert → RunLore diagnosis → Maku proposalProvenA broken image tag on the demo gallery app; RunLore named it at confidence 0.9 and filed an investigate task with a proposal
factory/publish → agent-authored fix PR → merge → recoveryProvencloud-native-ref#2989 restored the tag; merged by a maintainer; the app recovered and the alert resolved about 34 minutes after it fired
RunLore verifies the fix and drafts a kb-entries entryNot provenVerification is not wired: RunLore never received the merge event and no class declares a verification window (maku#886). With no verification, no entry, and nothing to recall
The kb-gaps routine files a task from a real gapProven, run incompleteOne untrusted task for the oldest gap, its input trust recorded (runlore=none); it opened runlore-kb#219 and then ran out of its run budget, escalating budget-run

Other findings from the runs: RunLore re-files closed gaps (runlore#642); investigate task ids repeat across incidents of the same alert (maku#885); and the kb-gaps skip set sees routine and label tasks only, not a task filed for the same gap through the API.

What stays human

  • Reviewing drafted knowledge. The agent reviewer approved a draft with a wrong alert name; the maintainer’s review caught it. Entries land through a merge policy in shadow, never auto-merged.
  • factory/publish. A RunLore proposal becomes a fix task only when a maintainer applies the label.
  • Merges. Both the KB entry and the fix were merged by a person. Closing the gap issue is also a maintainer’s call: entries say Refs #<gap>.

RunLore without Maku

RunLore needs nothing from Maku. Its gap issues are plain GitHub issues, and the KB repository’s CONTRIBUTING.md is written for any contributor, person or agent: one new Playbook entry per gap, resource: set to the gap’s exact namespace/name, sourced sections, and Refs #<gap> in the pull request. A team without Maku answers its gaps by hand with the same file.

Reproduce it

  1. Give the KB repository a CONTRIBUTING.md like the one above, and make sure your alert rules carry the workload’s namespace and deployment labels: without them RunLore cannot tie an incident to an entry’s resource:.
  2. Choose how a gap becomes a task:
    • By label: add an acceptance check and the line “Follow CONTRIBUTING.md: one new Playbook entry” to the gap issue, then label it factory/ready.
    • By routine: bind the kb-gaps routine, which files one untrusted task for the oldest uncovered gap per run.
  3. Bind a narrow merge policy in shadow for the entries (the runs used the catalog’s docs; the routine page shows a stricter kb-gap-entries), review each draft, and merge it yourself.
  4. For the remediation path, connect RunLore as described in RunLore integration. Until maku#886 is resolved, expect the fix to land without RunLore’s verification or a kb-entries entry.