fix(gap-5): PostgreSQL audit persistence — replaces warning-only stub in ComplianceEngine#83
fix(gap-5): PostgreSQL audit persistence — replaces warning-only stub in ComplianceEngine#83cryptoxdog wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
✅ PR size is within recommended limits |
|
PR #83 Review: fix(gap-5): PostgreSQL audit persistence — replaces warning-only stub in ComplianceEngineAuthor: cryptoxdog DescriptionGap 5File: Wires asyncpg pool into audit flush so entries actually persist instead of being silently dropped.
pool = await asyncpg.create_pool(dsn)
await configure_audit_pool(pool)Tests: CommitsChanged Files🐍 Python (3 files)
Automated AnalysisDiff Findings✅ No issues found in diff analysis Test CoverageFiles without corresponding test changes:
Local LintSkipped (repo not checked out locally or linters not found). Summary✅ LOOKS GOOD — No automated issues found. Ready for human review. Automated PR review • 2026-04-21 18:09 |
|
Automated PR patrol review — 2026-04-22 UTC Patrol note only; not a human approval. This PR has been open for 538.6h with no review.
Top findings:
Suggested next action: fix failing CI, then request review . |
|



Gap 5
File:
engine/compliance/audit_persistence.pyWires asyncpg pool into audit flush so entries actually persist instead of being silently dropped.
configure_audit_pool(pool)— call once at startup; auto-createsaudit_logtable + indexflush_audit_entries(entries)— bulk INSERT viaexecutemany, returns row countaudit_log(id, tenant_id, actor, action, detail, created_at)+ idx on(tenant_id, created_at DESC)Tests:
tests/gap_fixes/test_gap5_audit.py— no pool, empty list, mock pool insert