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.
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
| Step | Result | Record |
|---|---|---|
| RunLore files a gap for an unresolved, critical alert | Proven | knowledge-gap: apps/podinfo, runlore-kb#217 |
A maintainer’s factory/ready label starts a task | Proven, after one fix | The 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.md | Proven | runlore-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 knowledge | Proven | The 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 approval | Not proven | After the revision, the approval led to nothing; the maintainer merged by hand (maku#887) |
| The next incident recalls the entry | Partial | The 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 proposal | Proven | A 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 → recovery | Proven | cloud-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 entry | Not proven | Verification 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 gap | Proven, run incomplete | One 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
- Give the KB repository a
CONTRIBUTING.mdlike the one above, and make sure your alert rules carry the workload’snamespaceanddeploymentlabels: without them RunLore cannot tie an incident to an entry’sresource:. - 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-gapsroutine, which files one untrusted task for the oldest uncovered gap per run.
- By label: add an acceptance check and the line “Follow CONTRIBUTING.md: one new Playbook entry” to the gap issue, then label it
- Bind a narrow merge policy in
shadowfor the entries (the runs used the catalog’sdocs; the routine page shows a stricterkb-gap-entries), review each draft, and merge it yourself. - 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-entriesentry.