Skip to content

Let the owner allow a repair ​

A chart can say how to tell that it still works, and what to try when it does not. The owner decides, repair by repair, which ones may run without asking.

1. Say how to tell it still works ​

An alive proof is read on a period. This one checks every hour that the morning brief ran in the last 26 hours, and names the repair to try.

chart.json: proofs.alive
json
{
  "id": "ran",
  "check": {
    "type": "automation",
    "key": "morning-brief",
    "ranWithinHours": 26
  },
  "every": "1h",
  "repair": ["rerun"]
}

examples/chart-agent/morning-brief/chart.json#/proofs/alive/0

2. Declare the repair ​

chart.json: repairs
json
{
  "id": "rerun",
  "kind": "automation.rerun",
  "args": { "key": "morning-brief" }
}

examples/chart-agent/morning-brief/chart.json#/repairs/0

The kind comes from a closed list; its arguments name only what the chart declares, never a value or a secret. alta lint checks both.

This kind, automation.rerun, is always asked: a run may cost a model call. A restart of a service the chart owns (service.restart), pulling a model (model.pull) and recovering the gateway (gateway.recover) may be allowed in advance.

3. What the owner sees ​

At install, the plan lists the chart's repairs, each with an unticked box when it may be allowed. Later, from a terminal:

Terminal
sh
alta repairs list
alta repairs grant alta-os restart-ollama
alta repairs log
alta repairs revoke alta-os restart-ollama
alta repairs pause
alta repairs resume

Each command goes through the machine's server, with its token in WORLD_TOKEN. A grant holds until it is revoked; a new version of the chart that changes the repair voids it.

4. What happens on the machine ​

The guard loop reads the proofs every 5 minutes. When one fails, it runs a granted repair only if the server was started with --allow-repair, then reads the proof again. Everything else is asked. Each decision is one line of the journal.

What's next

Alta OS is open source (MIT).