fix(P01): migrate audit trail to git-native and replace audit_file with commit_hash

---ci---
project: ci
phase: 1
milestone: v0.8
status: in_progress
decisions:
  - id: D-024
    decision: Audit trail reads from git log instead of .ciagent/audit/*.json
    rationale: Git-native context means audit data should come from commit history, not files
    confidence: 0.88
  - id: D-025
    decision: Replace audit_file with commit_hash in Escalation type
    rationale: Escalations are committed to git; reference by hash instead of deprecated file path
    confidence: 0.90
requirements:
  covered: [FIX-04, FIX-05]
---/ci---

FIX-04: audit.ts logDecision/logEscalation now emit deprecation warnings
and are no-ops (decisions/escalations live in ---ci--- blocks). readAudit()
and getAuditSummary() parse git log for ---ci--- blocks instead of reading
.ciagent/audit/*.json files. ArtifactManager no longer creates audit dir.

FIX-05: Escalation type replaces audit_file: string with commit_hash: string.
All consumers updated (escalation.ts, ollama-base.ts, opencode.ts).
Audit tests rewritten for git-native approach.
This commit is contained in:
Jon Chery
2026-05-29 20:02:07 +00:00
parent 5fb285cf46
commit 04c4489e70
7 changed files with 222 additions and 132 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export interface Escalation {
resolution: EscalationResolution;
resolved_at?: string;
resolution_detail?: string;
audit_file: string;
commit_hash: string;
}
export interface EscalationResult {