From 5b27bb0950fd03d29c223b5960faff89baf37970 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 09:20:39 +0200 Subject: audit: verify voucher chains and attachment hashes --- docs/PROTOCOL.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/PROTOCOL.md') diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index 7052b83..47f6f26 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -443,10 +443,11 @@ be created. |---|---|---| | `backup.snapshot` | `dest?` | `path`, `sha256`, `size`, `at` — uses SQLite `VACUUM INTO`, no downtime | | `audit.list` | `from?`, `to?`, `action?`, `actor?`, `limit`, `cursor` | behandlingshistorik | -| `audit.verify` | `full?` | recomputes voucher and audit hash chains; `ok`, `checked`, first/last mismatch if any | +| `audit.verify` | `full?` | recomputes the voucher and audit hash chains, flags unbalanced vouchers, and with `full:true` re-hashes attachments; `ok`, `checked` (audit entries), `vouchers_checked`, `attachments_checked`, `unbalanced_vouchers` and the first bad `first_bad_voucher_id` / `first_bad_seq` / `first_bad_attachment_id` / `first_unbalanced_voucher_id` on failure | `audit.verify` is cheap enough to run after every import and before every -backup; `full:true` includes attachment hashes. +backup; `full:true` includes attachment hashes. The voucher chain is verified +per org in posting order (SCHEMA.md §7.1); the audit chain globally. ## 8. The TUI is just a client -- cgit v1.3