oc_connect
Loading...
Searching...
No Matches
oc_connect.audit Namespace Reference

Classes

class  AuditRecord
class  AuditFileError
class  AuditStore

Functions

Path default_audit_path (str|Path|None root=None)
datetime utc_now ()
str timestamp (datetime value)
str content_hash (str text)

Variables

 AuditOutcome
int MAX_DECISION_REF = 200

Detailed Description

Append-only authoritative metadata audit for connector delivery.

Dependencies
------------
- oc_connect.workspace (comms_root - locates the audit file inside the comms bus)
- oc_diagnostics (_dbg structured logger)
- option_c_connector_contracts (LaneId, MessageDirection, RiskClass - the lane fields of an audit record)
- pydantic (BaseModel, ConfigDict - the frozen strict AuditRecord model)

Function Documentation

◆ content_hash()

str oc_connect.audit.content_hash ( str text)
Return the lowercase SHA-256 digest of message text.

Definition at line 62 of file audit.py.

◆ default_audit_path()

Path oc_connect.audit.default_audit_path ( str | Path | None root = None)
Return the cross-lane audit file inside the comms bus (ยง3).

Definition at line 45 of file audit.py.

◆ timestamp()

str oc_connect.audit.timestamp ( datetime value)
Render one datetime as an RFC3339 UTC string.

Definition at line 55 of file audit.py.

Here is the caller graph for this function:

◆ utc_now()

datetime oc_connect.audit.utc_now ( )
Return an aware UTC timestamp.

Definition at line 50 of file audit.py.

Variable Documentation

◆ AuditOutcome

oc_connect.audit.AuditOutcome
Initial value:
1= Literal[
2 "queued",
3 "sent",
4 "failed",
5 "deferred",
6 "blocked",
7 "received",
8 "dropped",
9 "overflow",
10 "read",
11 "acted",
12 "pruned",
13]

Definition at line 27 of file audit.py.

◆ MAX_DECISION_REF

int oc_connect.audit.MAX_DECISION_REF = 200

Definition at line 42 of file audit.py.