Skip to content

Learn · Audit & evidence

The logbook

A hash-linked chain of everything the platform saw and did.

Checked against the product on · written for people who need the evidence

Every step writes one entry. An entry holds the payload, its position in the chain, the time it was recorded, and a hash computed over the entry before it. Editing an entry breaks every hash after it.

console.dmzagent.com/records

Prove

Records

1All divisionsLast 24 hoursExport evidence
2
#TimeWhat happenedHash
1840212:04:12Approved: turn off access · pump-12 · by dana@9f3c…a71e
1840112:04:11Held for a person: turn off access · pump-124b02…c8d9
1840012:04:11Rule fired: Overheat hold · pump-127ae1…0f34
1839912:04:11Event taken in: observation · pump-12d21f…55ab
3Each entry carries the hash of the one before it. Entries are never edited.
Figure. The logbook. Four entries covering one event from arrival to approval. The logbook: an append-only list of entries with an index, a time, what happened and the entry hash.
  1. Open Records and set the window you need.1

  2. Read the entries bottom to top.2

    One event produces an entry for arrival, one per rule that fired, one for a held call, and one per decision.

  3. Read the chaining line.3

How an entry hash is derived

The derivation is fixed and takes no secret. Anyone holding the entries can recompute every hash.

The derivation, in order.
StepInputResult
1The payload, rendered as canonical JSON: keys sorted, no spaces, unicode kept.The payload hash.
2The previous entry hash, the payload hash, the index, the recorded time, and the scope, joined by a vertical bar.The chain input.
3SHA-256 over the chain input.The entry hash.
FORMULAhash = sha256(prev_hash | payload_hash | index | recorded_at | scope)

The entry hash. payload_hash is sha256 over the canonical JSON of the payload. The first entry in a chain uses the genesis value as its previous hash.

Note. Canonical JSON means keys sorted, the separators comma and colon with no spaces, and non-ASCII characters left as themselves. Two implementations that agree on this produce the same bytes, which is what makes a hash re-derivable off the platform.

What a logbook entry carries

FieldWhat it holds
event_idThe entry’s own identifier.
idxThe position in the chain, counting from the start.
workspace_idThe work area the entry belongs to.
prev_hashThe hash of the entry before it.
payload_hashSHA-256 over the canonical JSON of the payload.
hashThe entry hash, derived as above.
recorded_atThe time the entry was written.
payloadWhat happened, as fields.

Read it from code

curl 'https://api.dmzagent.com/v1/ledger/WORKSPACE_ID?limit=100' \
  -H 'Authorization: Bearer YOUR_API_KEY'

The platform recomputes the chain on request and reports the first break, when there is one.

curl 'https://api.dmzagent.com/v1/ledger/WORKSPACE_ID/verify' \
  -H 'Authorization: Bearer YOUR_API_KEY'