stateOf MUST give the keyed records of the observation (observedState) and the finding of each policy, and MUST NOT hold the time of the observation, the version of the probe, a counter that changes on its own (the memory, the disk in use, the updates waiting) or the policy about how old the observation is.
Enforced (check): .github: cd commons/machine-probe && bun run verify — suite/state.test.ts
stateText MUST give JSON with the keys of every object in order, indented by two spaces, ending with a line break, the same text for the same state whatever the order the keys were made in; and readState MUST give back the state of a text that stateText made and MUST refuse a text that is not JSON or not a state, saying which.
Enforced (check): .github: cd commons/machine-probe && bun run verify — suite/state.test.ts
diffStates MUST say a state equal to itself, and between two states MUST name each key added, removed and changed (with the path of the field and both values) as grc tells drift, and each policy whose finding moved with the finding before and after, in the order of the policies' ids; and a difference of the time alone MUST NOT be one.
Enforced (check): .github: cd commons/machine-probe && bun run verify — suite/state.test.ts
Given the output of a real probe, When its state is made, Then it holds no time, per FR-001.
Given the same machine observed an hour later with other counters, When the two states are written, Then the texts are equal, per FR-003.
Given a machine whose firewall was turned on, When the two states are compared, Then the path and both values are named and the policy moved from fail to pass, per FR-004.