The instance record
One file declares one instance, in a directory named for it, beside the state it declares. The set of instances is the directory listing; there is no index.
~/.local/state/yoke/instances/bench-a/
├── instance.yaml the record — the manager writes it, the Core never opens it
├── record.lock taken before the record is rewritten
└── state/
├── registry.db
├── logs.db
├── version the version that last ran against these bytes
├── secrets/
└── storage/
The record sits above state/, so clearing an instance's state removes one directory and removing
the instance removes the one around it. The root is $XDG_STATE_HOME/yoke/instances, with
$HOME/.local/state where the variable is unset.
What it holds
id: com.yoke.station
version: 2.1.0
name: bench-a
autostart: true
desired_state: running
owner: davide
created_at: 2026-08-15T09:20:44Z
last_started_at: 2026-08-15T09:21:02Z
descriptor_digest: "sha256:7d10…"
parameters:
shared:
site_label: "Bench A — Metrology"
acquire:
instrument: /dev/spectro-head-a
| Field | Holds |
|---|---|
id, version | the application, and the version this instance is pinned to — not the newest installed |
name | the instance's name, unique within the account. A record whose name is not its directory's is refused — what a record moved or copied by hand looks like |
autostart | whether it comes up when the host comes up |
desired_state | running or stopped: whether it should be running now |
owner | the account that created it |
created_at, last_started_at | facts about the past. last_started_at is when a start was last asked for; a start at boot does not move it |
descriptor_digest | the digest of the pinned version's yoke.yaml, written by the act that set the pin and no other. Compared before every start |
parameters | the values the site supplied, by group, in clear, checked again before every start |
- Autostart and desired state are two fields. Stopping writes the desired state and leaves autostart: an instance stopped on purpose does not come back at the next power cycle, and one marked to start does come back after a power cut.
descriptor_digestis the one field that is not intent. The install root is writable by a group; the record is in the account's own directory, which is where the expected identity has to be.- It does not hold the current state, which is derived when asked.
- A record declares and authorises nothing. What units may do is the Registry's.
- An unknown key is refused.
An ephemeral record
A run with no record creates one that lasts as long as the run, with fields a declared record cannot carry.
ephemeral: true
source: /home/davide/work/station # only for a run from a working directory
verification: waived # only with a source
admission: unlaunched-permitted # only where the invocation asked for it
outcome: failed # written by the guardian, and only here
| Field | Means |
|---|---|
ephemeral | a field, never a naming convention. Not eligible for autostart |
source | a bundle read from a working directory instead of the install root |
verification | the development waiver: the bundle's integrity is not verified. Only with a source |
admission | the second waiver: a process the Core did not launch may register. Independent of the first |
outcome | the one field the guardian writes: the run ended abnormally |
It disappears on an orderly stop and survives a failure, so the log store of a run that failed is there to be read.
Who writes it
- The manager creates records, re-points them and removes them; the guardian reads them. The guardian
never writes the intent it acts on —
outcomeis an observation. - Two edits to one record are serialised by
record.lock; two records never meet. - A write replaces the file through a temporary one and a rename: a reader sees the record before or after, never between.
- Creating one makes its directory exclusively, and writes the record last. An interrupted creation is a directory with no valid record, which nothing starts.
- Removing an instance's directory by hand removes its declaration.