The state of a machine as it is kept in Git: the keyed records of an observation and the status of each policy, with no time, no probe version and no counter that changes on its own, written as JSON with its keys in order so that a machine that did not change gives the same bytes and so no change in Git; and the structured difference of two states, which names each path added, removed or changed with both values, and each policy whose status moved.
typeMachineState= {
readonlyformat:"machine-state/1";
readonlyrecords:Readonly<Record<string, Json>>;
/** The finding of each policy that does not depend on the time (a policy about how old the observation is is the journal's). */readonlypolicies:Readonly<Record<string, string>>;
};
The state of a machine: what was observed of it and how each policy judges it.
The text of a state: JSON with the keys in order, two spaces and a final line break, the same for the same state, so that a line that changed is a line Git shows.
The difference between an earlier state and a later one: the keyed records as grc tells drift (added, removed and changed, naming the path and both values) and each policy that moved, in order of the policies' ids.
typeMachineState= {
readonlyformat:"machine-state/1";
readonlyrecords:Readonly<Record<string, Json>>;
/** The finding of each policy that does not depend on the time (a policy about how old the observation is is the journal's). */readonlypolicies:Readonly<Record<string, string>>;
};
The state of a machine: what was observed of it and how each policy judges it.
The text of a state: JSON with the keys in order, two spaces and a final line break, the same for the same state, so that a line that changed is a line Git shows.
The difference between an earlier state and a later one: the keyed records as grc tells drift (added, removed and changed, naming the path and both values) and each policy that moved, in order of the policies' ids.