Audit_log.WriterAppend-only writer. One per directory; not thread-safe, so the daemon owns exactly one and calls it from the single dispatcher fiber.
val open_ : string -> (t, string) Stdlib.resultopen_ dir opens today's file in dir, creating the directory if absent.
Opens O_APPEND | O_CREAT and mode 0o600 — never O_TRUNC. An existing file is continued: the sequence counter and chain head are recovered by reading it, so a restart extends the chain rather than starting a new one.
val append : t -> ?sync:bool -> Audit_record.t -> (unit, string) Stdlib.resultAppend one record, assigning its seq. fsyncs before returning when sync is true, which the daemon sets for control actions.
val close : t -> unitval last_seq : t -> int64Sequence number of the last record written. 0L on an empty log.
val head_hash : t -> stringCurrent chain head, hex. This is the value to anchor out of band.
val path : t -> string