Migrate logAudit to explicit admission and retire Audit severity [#58] #63
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.66) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 351 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #63"
general
weight: 0.35
AM-L
Summary
SimpleLogger::logAudit()andLog::logAudit()to accept a completeAuditInputand return synchronousAuditWriteResultfrom a configured audit ring. Missing ring configuration returnsUnconfigured; invalid stream identity and invalid fields retain their explicit refusal reasons.LogLevel::Audit, and audit-only fields on diagnosticLogRecord. Unknown severity strings, includingAUDIT, now yieldnulloptfromfromString()instead of silently becomingInfo.AuditSinkAdapter.Validation
Migration and scope
The old positional call must be rewritten with a category, phase, action, target, actor, correlation and host time as applicable.
messagebecomesdetail; a free-formriskLeveldoes not automatically becomeriskRef. A ring binding must be cleared before its ring is destroyed. The return value promises only in-memory admission. Durable confirmation remains in #11; ADR-002 remains Proposed and epic #9 remains open pending separate review.Closes #58.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Audit events can now be submitted as structured records to a bounded in-memory ring, with clear results for accepted or refused submissions.
Applications can connect and clear an audit ring, and optionally hand records off through a separate audit sink. Sink health is observable; durable, tamper-evident storage is not provided.
Audit records can include a stable risk-control reference.
Updates
Audit events are separated from diagnostic logging and its severity filters. Unknown severity names, including “AUDIT,” are no longer treated as valid diagnostic levels.
* Updated examples and migration guidance describe structured audit submission, admission results, and the limits of in-memory storage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->