Jobs and checks
A check is a named piece of work, such as types or unit. nuf runs it as a job on exact code and records how it went. This page describes the commands as they are built on nuf’s main branch.
Workloads
Section titled “Workloads”A workload is a check that your settings declare for an app: its name, what it covers, whether it starts a lab, and its time limit. nuf workload list shows them.
Work sets
Section titled “Work sets”A work set holds the worktrees of one change, across the repositories it touches. You make one with nuf set new. It has an owner, the session that works on the change, and a check runs on the set’s heads.
nuf set new shop --item feat-fold --owner builder-7nuf set rm removes a set, and refuses while anything in it is uncommitted or not landed.
Ask, or ask and wait
Section titled “Ask, or ask and wait”nuf check <workload>... --set <id> --by <session>asks for checks, waits for them and answers.nuf job request <workload> --set <id> --by <session>only asks. Its 0 means the request was taken.nuf wait <job>...waits until the jobs have a stored report. Its exit code is the notice.
nuf check types unit --set feat-fold --by builder-7--by names who asks. Most acts require it; nuf set new takes --owner instead. It is a name, not proof: nuf cannot yet tell one session from another. --timeout stops the waiting, not the job.
Job states
Section titled “Job states”A job’s state comes from its records in the ledger. The states nuf reports are:
held,starting,queued,runningandstoppingwhile it is under way;green,redordid-not-runwhen it is over;lostwhen its run is gone.
nuf job show <job> shows a job’s state and its current step, its time so far and its usual time, and the step that failed. nuf job log <job> shows the latest log lines, and for a red job its failing step. A job nobody follows shows as orphaned, and the next act adopts it.
A job’s identity comes from its code, its checks and the shared part of its job environment. When an identical job already has a stored result, or one is in flight, nuf can answer from it. Two different environments never share a result. nuf metrics shows how many requests reuse answered.
Due work
Section titled “Due work”There is no scheduled tick. Before every act and follow-up, nuf first does the work that is due:
- it checks the ledger’s sums;
- it follows every job that needs it;
- it collects the jobs nobody follows.
nuf tick does the same work on its own. Every run on a rented machine is designed to carry a time limit on the vendor’s side, so a run nobody follows still ends.
Exit codes
Section titled “Exit codes”| Code | Answer | Meaning |
|---|---|---|
| 0 | yes | Green, taken, recorded, rendered |
| 1 | no | Red, or a definite refusal |
| 2 | cannot judge | Did not run, timed out, or the record is unreadable |
| 3 | held | A hold is open, or Policy changed and is not adopted yet |
| 64 | usage | A malformed line, or a name that does not exist. The act writes nothing |
| 70 | bug | An internal error |
Any other code, such as a killed process, reads as 2. Reads never answer 1 or 3. Over several jobs in one call, the worst answer wins. nuf env run is the one exception: it ends with its own command’s exit code.
The JSON envelope
Section titled “The JSON envelope”Agents call nuf with --json. Standard output is then exactly one object:
command,exitandanswer, the word for the exit code;result, the command’s own data;why, the reason, present exactly when the exit code is not 0;acts, the records this call wrote, andalready, the earlier acts that made it a repeat;dry_run,hintanddue, the work that was due and ran first.
Repeating an act returns the first act’s id, so a crash followed by a re-run never makes a duplicate. --dry-run on an act says what it would write, and writes nothing.
Every field and command: the command reference.