feat(control-loop): governed autonomous self-healing — detect AND heal - #22
Merged
Conversation
The difference between a platform that pages a human and one that fixes it.
tools/control_loop.py — ControlLoop senses conditions and, for each it may act on, runs
the SAME governed spine a developer runs (admission -> place -> grant -> verify -> execute),
sealing every action. Three safety properties make it runnable unattended:
- never acts ungoverned: every remediation goes through the grant + quota path; no valid
Grant / over quota -> nothing runs, recorded, loop continues.
- decides a persistent condition ONCE per cooldown (no remediation storms).
- one bad condition never kills the loop: a block, deny, or raised exception is caught,
recorded, and skipped.
tick() is one sense->act pass; run(max_ticks, interval) is the daemon; ledger() is the
sealed action log.
Tests: +6 (remediates through the spine, decide-once-per-cooldown, fail-closed block +
quota-deny recorded, exception isolation, multi-tick run) = 98 tools tests green.
capd/self-healing-loop.mesh.capd.json (caps.compute.self-healing-loop) — ingested by the
commons as a first-class citable capability. Wired validate REQUIRED + CapD, Makefile loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The difference between a platform that pages a human and one that fixes it. Most platforms detect; almost none heal under governance.
tools/control_loop.pyControlLoopsenses conditions and, for each it may act on, runs the same governed spine a developer runs (admission → place → grant → verify → execute), sealing every action. Three properties make it safe to run unattended:tick()is one sense→act pass;run(max_ticks, interval)is the daemon;ledger()is the sealed action log.senseandto_workloadare pluggable, so the loop drives any detector (stale backend, fired advisory, drifted vendor…).Tests
+6 (remediates through the spine, decide-once-per-cooldown, fail-closed block and quota-deny recorded without acting, exception isolation, multi-tick run) = 98 tools tests green;
validatepasses.capd/self-healing-loop.mesh.capd.json(caps.compute.self-healing-loop) — ingested by the knowledge commons as a first-class reproducible citable capability. Wired validate REQUIRED + CapD checks, Makefileloop.