Browse the documentation

Preview documentation for AEL Beta 0.0.1 — launching soon

Recovering an interrupted change

In AEL, the Agent Engineering Language, adding, installing, updating and removing packages will be atomic and safe to roll back. If a change is interrupted, by a power cut, a stopped process or a full disk, ael pack repair (command names may change before launch) will bring the scope back to a complete state and check it.

Status

Planned for AEL Beta 0.0.1. AEL is not available yet.

Usage

Preview syntax — may change before launch
ael pack repair
ael pack repair --scope src/api
ael pack repair --json
OptionMeaning
--scope <folder>Repair that folder's scope. Without it, the scope that covers the folder you are in.
--jsonA machine-readable report of every action taken.

How package changes stay recoverable

Before a package command replaces anything, it will record its plan beside the scope's manifest: which files it will replace, in which order, and what the scope looked like before. It will remove that record only when the change is complete.

That record will make recovery possible. A scope will always be either as it was before the change or as it is after it, never a mix of the two.

What it does

  1. Recovery. If an interrupted change left its record behind, ael pack repair will finish the change or undo it, whichever brings the scope to a complete state, and report every action.
  2. An integrity check. It will then check the scope: that pack.lock matches pack.ael and the project's metadata.ael, and that every installed file matches the fingerprint the lock file records.

You will rarely need to run it yourself: every package command that changes a scope will first run the same recovery there, and report what it did. Run ael pack repair on its own after a crash, or to check a scope without changing any package.

What it never does

  • It will never delete a file it cannot restore, and never remove the previous state before its replacement is in place.
  • It will follow a recorded plan only when that plan describes the scope as it is. When it cannot tell what happened, it will report that and change nothing.
  • It will use no network and run no package code.
  • It will act on one scope only: other folders' manifests and packages will be left untouched.

If the integrity check finds a mismatch that recovery cannot explain, the report will name the file. ael pack install --locked will reinstall the scope from its lock file.