Changelog¶
Unreleased¶
PartitionManager.drop_expired(): drops monthly partitions past their per-severity retention withDETACH ... CONCURRENTLY, finishing interrupted detaches;PartitionManager.health()reports partition coverage ahead, pending detaches and orphaned tablesensure_partitions()works with tables declared without a schema and returns schema-qualified names- Renovate opens pull requests for dependency and GitHub Actions updates
check_models(): static checks for CI that report sensitive-looking columns without an audit policy, JSON columns whose in-place changes go undetected, relationships tracked on both sides, and tracked names that are not collection relationshipsAuditTrail.install(): the session listener writes oneentity.created/updated/deletedrow per flush and object, with a lazily createdaudit_transactionrow per database transaction, inside the business transaction;on_error="log"isolates audit write failures in a savepointAuditTrailgainsdefault_severity,system_severity,eventsandglobal_redact, and exposescontext(),set_actor(),bind(),pseudonymize()andmaintenance- Audit options read a column never set on a new instance as
Noneinstead of falling back as if it were not loaded AuditTrail.log(): records an explicit event in the session's transaction, with payload validation,Pseudonymizedpayload fields, a per-entryactor=and aTarget(also returned by thetargetoption);warn_on_bulkwarns about bulkUPDATE/DELETEstatements on audited tables, which bypass the trailaudit.query.list_groups()/alist_groups(): lists audit entries grouped by transaction, newest first, with keyset pagination (Cursor), filters,Visibilityrestrictions and read-time compaction of per-flush rows; queries prune partitions and force custom plans- Async sessions:
AuditTrail.install()accepts anasync_sessionmakerorAsyncSessionsubclass with async_session_class, andAuditTrail.alog()records explicit events from async code - Durable and
fail_closedevents are written on a separate small pool and committed beforelog()/alog()returns, surviving the caller's rollback; a missing partition is created and the write retried once;fail_closedfailures raiseAuditWriteError AuditTrail.dispose()/adispose()close the durable pool the library created
0.1.0a1 - 2026-09-25¶
Pre-release to verify the publishing pipeline. The flush listener and the read API are not included yet, so no audit entries are written.
AuditContextandActor: request context set withcontext(), updated in place withset_actor(), or attached to one session withbind()- Value serialization for audit entries and keyed HMAC pseudonyms with versioned keys;
Pseudonymized[...]marks payload fields AuditEventwith per-event severity, payload schema and durability, declared withevent(); the defaultSeveritylevels; a registry that validates events against the configured severity enum- Relationship tracking: net
added/removedchanges of chosen collection relationships, captured from ORM events - Audit tables partitioned by severity and month, DDL helpers for migrations, and
PartitionManager.ensure_partitions(), which creates missing partitions under a lock timeout - Entity change sets with per-column
exclude/redact/hashpolicies, and theAuditedmixin withAuditOptionsfor labels, scope and target read from loaded attributes only