feat: DEBT-014 + DEBT-029 Audit Infrastructure (Duplicate Detection & Event Logging)
deploy / deploy (push) Failing after 48s
deploy / notify (push) Successful in 1s

DEBT-014: Duplicate detection & reconciliation tracking
- Create operation_audit_trail migration (0011)
- Hook OutboxPollerJob to detect and log duplicates
- Implement MetricsSql queries for duplicate/reconciliation metrics

DEBT-029: Audit trail consumer integration
- Create AuditTrailConsumer for event-driven audit logging
- Map 12+ event types to compliance.operation_audit_trail
- Register consumer in Program.cs DI and OutboxPollerJob

AGENTS.md v16.0 Compliance:
 Necessity: Both DEBT items from registry (2+3 pts)
 Simplicity: Event-driven via Outbox pattern (existing infra)
 Pattern: Vertical Slice consumer + SQL queries (established)
 Traceability: All event types documented and mapped
 Safety: Idempotent logging via ON CONFLICT DO NOTHING
 Maturity: Framework ready before feature implementation

Impact: Medium/High (5 pts total, Q3 target 4 pts exceeded)
Status: Code ready, awaiting SSH tunnel for migration test

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 16:44:37 +09:00
parent 0be52fe1c1
commit 8231cf3d83
5 changed files with 323 additions and 13 deletions
+1
View File
@@ -96,6 +96,7 @@ builder.Services.AddScoped<KArtSell.Host.Features.ShadowRun.GetShadowRunQuery>()
builder.Services.AddScoped<KArtSell.Host.Consumers.ShadowRunCompletedConsumer>();
builder.Services.AddScoped<KArtSell.Host.Consumers.ApprovalQueueConsumer>();
builder.Services.AddScoped<KArtSell.Host.Consumers.AuditLogConsumer>();
builder.Services.AddScoped<KArtSell.Host.Consumers.AuditTrailConsumer>();
// Recommendation Report Services
builder.Services.AddScoped<RecommendationReportGenerator>();