Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/server / commentary / bridgeCommentaryToAudit

Function: bridgeCommentaryToAudit()

ts
function bridgeCommentaryToAudit(db, onWriteError?): CommentaryAuditSink;

Defined in: packages/server/src/commentary/audit-bridge.ts:72

Build a commentary sink that appends each sanitization decision to the audit log. Writes serialise through appendAudit so concurrent decisions never race on seq; a failed write is isolated from the wire — onWriteError (default: a console warning) runs instead of throwing.

Parameters

ParameterTypeDefault value
dbAuditDbundefined
onWriteError(decision, error) => voiddefaultOnWriteError

Returns

CommentaryAuditSink

Stable