# Guardian's safety rails

> Every rule that limits Guardian: your own jobs only, natural ends only, per-folder and hourly caps, one job per folder, and never a cancel.

Source: https://hiveboard.dev/docs/guardian/safety-rails · Section: Guardian · HiveBoard 0.1.7 · Updated 2026-10-19

## In short

- Guardian acts only on jobs owned by your login user on that server, and only continues where job control is on.
- Only a natural end (COMPLETED or TIMEOUT) of an unconverged VASP relaxation is continued; cancelled, failed, MD and NEB runs never are.
- Each job folder is continued at most a set number of times (3 by default), with a 10-minute cooldown and at most 8 actions an hour in all.
- A stalled job is reported, never cancelled.

Guardian acts while nobody is watching, so it is held by more rules than
anything else in HiveBoard. Its one automatic action is the same **Continue**
the job pane offers, so every guard on that applies — your own jobs only, job
control required, POSCAR backed up first — and Guardian adds rules of its own
on top. This page lists them all. For what Guardian is and how to switch it
on, see [Guardian](/docs/guardian/guardian).

## Your own jobs only

- Guardian compares each job's owner with your login name on that server, as
  the server itself reports it (`whoami`). People named under **Highlight
  users** are never counted as you: their jobs are neither watched nor
  continued.
- If your login name cannot be confirmed on a server, Guardian does nothing
  there and says so: *cannot verify your username on Ember — guardian will
  not act there*.
- The server checks ownership again when the continue request arrives, and
  refuses it for anyone else's job.
- Continuing needs [job control](/docs/job-control/turn-on-job-control) on
  that server. Without it Guardian only watches, and logs *blocked — job
  control disabled*.

## How a job ended decides

A job that leaves the queue is judged by how it ended. Only a natural end of
a VASP relaxation that did not converge is ever continued.

| The job | What Guardian does |
|---|---|
| Relaxation, COMPLETED or TIMEOUT, not converged | Continues it; in Watch, *would resubmit* |
| Cancelled | Never resubmits it |
| FAILED, out of memory, node failure | Flags it: *needs a look* |
| NEB | Never continues it |
| MD run | Never continues it |
| Converged relaxation | Leaves it alone |

A cancel was your decision, and Guardian does not overrule it. A failed run
resubmitted blindly would only repeat the crash. Whether a NEB has converged
is judged image by image, which is for a person to do, and an MD run has no
convergence for Guardian to test.

Jobs of codes other than VASP are not judged when they end; Guardian watches
them for stalled output only.

## Limits on how often

- **Per job folder.** **Continue a job at most** (3 times by default, 1 to
  10) is counted per server and job folder, so a chain of continuations in one
  folder shares one count. When it is reached: *continue cap (3) reached*.
  The count survives a restart, and clearing the Activity list does not reset
  it.
- **Per hour.** At most 8 automatic actions an hour, all servers and all open
  windows together: *hourly action limit (8) reached — pausing*.
- **Cooldown.** At least 10 minutes between attempts on the same job,
  counted from the attempt, so an action that fails is not retried at every
  check.
- **Counted when tried.** An attempt counts even if its answer is lost — a
  closed laptop, a restart — because the job may well have been submitted.

## One folder, one job

The server refuses to copy CONTCAR over POSCAR while any queued or running
job still uses that folder. A double click, a second window, or Guardian and
you at the same moment cannot put two jobs into one folder. Guardian never
uses the override that the job pane's **Continue from latest** passes after
its warning.

Two more refusals stop Guardian where a person would have to decide:

- **Which script?** When the server cannot tell which script submits the
  job, a person has to choose one. Guardian has no person, so it stops and
  logs *continue failed* with the server's explanation.
- **Nothing to continue from.** An empty CONTCAR, a failed backup or a
  failed copy stops the continuation before anything is submitted.

## One Guardian at a time

With several HiveBoard windows or tabs open on one computer, only one
Guardian acts: each check renews a heartbeat, and another window takes over
only after that heartbeat has gone quiet for a few minutes. The caps above
are shared by all of them.

## Stalls are reported, never stopped

- Guardian reads the job's own warning, the one the job pane shows: "No
  output update for … min — job may be stalled." It appears only after more
  than 15 minutes without a write.
- The gap is never longer than the job has been running, so a restarted job
  that finds old output files in its folder is not called stalled because of
  them.
- The first sighting is logged as *watching — stalled … (confirming)*; the
  next check confirms it with *looks stalled* and a message. Each stall is
  reported once.
- Each check reads at most five running jobs per server, taking turns, so
  with many jobs running each is looked at less often.
- Guardian never cancels a stalled job (see
  [why Guardian never cancels](/docs/guardian/guardian#guardian-never-cancels)).

## What Guardian leaves alone

- **Servers switched off** in the Jobs page's servers filter: not watched,
  and what Guardian knew about them is dropped. Servers set aside are never
  contacted at all.
- **A job that left the queue long ago.** If more than 15 minutes passed
  before Guardian could look at a finished job, it logs *finished too long
  ago to act on unattended — check it yourself*. A laptop waking up does not
  resubmit a night's worth of jobs at once.
- **A job whose ending cannot be confirmed.** Right after a job ends the
  scheduler may not have settled its final state; after three tries Guardian
  logs *could not verify how it ended — leaving it alone*.
- **A job it never saw running.** Guardian notices an ending only for a job
  it saw in the queue while it was on, with the window open.

## Check yourself

1. You cancelled one of your unconverged VASP relaxations yourself. What will Guardian do with it?
   - Leave it alone — a cancelled job is never resubmitted ← the answer
   - Continue it, because it did not converge
   - Continue it once, then stop
   - Ask you in a message
   Why: A cancel was a person's decision; Guardian logs it and never resubmits it.

2. How many automatic actions can Guardian take in one hour?
   - At most 8, all servers together ← the answer
   - 8 on each server
   - 3 for each job
   - As many as finish
   Why: The hourly ceiling of 8 is fixed and shared by every server and every open window.

## Try it in the app

- Run Guardian in **Watch and tell me** for a day and read which jobs it says it *would resubmit*, and why it skipped the others.

## Related

- [Guardian](https://hiveboard.dev/docs/guardian/guardian.md)
- [Continuing a VASP run](https://hiveboard.dev/docs/job-control/continue-a-run.md)
- [Turning on job control](https://hiveboard.dev/docs/job-control/turn-on-job-control.md)
- [What HiveBoard may change on a cluster](https://hiveboard.dev/docs/safety/what-hiveboard-may-change.md)
- [HiveBoard's guarantees](https://hiveboard.dev/docs/safety/guarantees.md)
