TagsBrandsSubmit

← All prompts

The Self-Healing Agent VM

Set up a self-healing watchdog for the VM you run on, following the pattern in this open-source repo: github.com/TMTrevisan/self-healing-agent-vm — read its AGENTS.md first, it has the full procedure. Context: this VM's root filesystem can be rebuilt from a base image while my home directory persists, and a rebuild can come back with pieces missing — system packages, runtimes, timezone data — which silently breaks the tools you depend on. I want that class of failure to repair itself. Do this: 1. Inventory everything your stack depends on that lives OUTSIDE my home directory (system Python stdlib, Node, tzdata, [add your own]) and stage byte-exact restore caches for them in persistent storage, using the same builds the system actually runs. For Debian/Ubuntu, extract the distro .deb packages — don't trust standalone builds, they can lack the C extension modules. 2. Install the watchdog from the repo and configure its probes for our stack: sentinel checks that still run when the system is half-broken, restores that only replace missing files (atomically, never overwriting), a trust check on the caches, timeouts on every check, and a verification pass after every heal. 3. Run it with --dry-run first. Then prove it works: move one non-critical system file aside, run the watchdog, show me the restore and the journal entry, and show me a second run reporting healthy. 4. Schedule it every [5] minutes with a heartbeat that alerts me if a run ever goes missing — silent when healthy, loud only on repairs and failures. Rules: never overwrite existing system files; caches must be owned by me or root and not group- or world-writable; keep any pip-repair step off unless we set up a pinned wheelhouse; before any step that needs elevated privileges, tell me what you're about to change.
Comment@toddotGitHub#work

Comments

    No comments yet. Tried this prompt? Say how it went.

    Log in to comment.