Skip to Content
NeoRun

Checks, watch and undo

What NeoRun verifies after it applies a change, how long it watches, and when it puts the server back.

Applying a change is not the end. NeoRun checks the result, keeps watching, and undoes the change if it fails.

Check right after apply

After an infra change is applied, NeoRun runs read-only checks on the server. The probe, a small program on your server, computes them itself:

CheckPasses when
files_matchevery file the change added or modified has the state recorded in the approved change, and every removed one is gone
packages_installedevery added package is installed at the recorded version
services_activeevery service change NeoRun applied is active (or inactive) as recorded
listeners_expectedevery listener the change adds is present
listeners_unexpectedno new public TCP listener exists that was not in the baseline and not in the change. A new loopback-only listener is reported, not failed

The probe repeats the checks every 2 seconds until a deadline and needs two passing rounds in a row. A service that starts and then dies is a failure, not a pass.

Checks the agent adds

With request_promotion the agent can add up to 10 typed checks. They can only make verification stricter.

TypeMeaning
http_getGET http://127.0.0.1:<port><path> answers the expected status (default 200). Loopback only, redirects are not followed, 5 second timeout
tcp_listeningsomething on the server listens on that TCP port
service_activesystemctl is-active says active for that unit (.service, .socket or .timer)

There is no way to send a command or a host. NeoRun checks the list again on the probe.

Fail closed

NeoRun decides from structured fields only, never from free text. If a check could not run, or the report is malformed, it counts as failed. The safe side of a doubt is the undo.

The watch

A passing check right after the apply is the first check, not the last. After a change is applied, NeoRun repeats the verification on an interval for a window:

  • The window is 10 minutes by default (NEORUN_WATCH_WINDOW, 600 seconds).
  • The interval is 30 seconds by default (NEORUN_WATCH_INTERVAL).
  • Three unhealthy checks in a row end the watch badly. A check that could not run, for example because the server is unreachable, neither counts nor resets the streak.

The deploy lane has the same watch: after a deployment goes live, NeoRun checks its health every 30 seconds for 10 minutes, and three unhealthy checks in a row ask for a rollback to the previous deployment.

Undo

  • Verification fails right after apply. A reversible change is undone at once. NeoRun restores the pre-apply snapshot and the change ends as undone.
  • The apply itself fails. A reversible change is undone automatically once the pre-apply snapshot was taken.
  • The watch sees three failures in a row. NeoRun undoes the change by itself unless that is not safe. It holds for a person, and asks you, when the server's safety level is ask_first, when the change cannot be undone, or when the change touches SSH access, users or data deletion. Restoring the earlier state could cost access or what was written since.
  • A change that cannot be undone is never undone automatically. It ends as failed and needs a person, with a sentence saying why.

A person can undo an applied change at any time.

Known limits

  • A new public listener unrelated to the change fails listeners_unexpected and counts, but undoing this change would not close it.
  • UDP listeners are not checked.
  • A host that stays unreachable for the whole window ends the watch as lapsed, which says so instead of claiming success.

See Safety levels for what runs without a person.

Edit this page on GitHub

On this page