AltimateAI / AltimateAI/altimate-code

feat: data_diff audit log

未關閉
#730 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
811
分支
134
平均合併
3 天 2 小時
30 天內合併 PR
50

描述

## What does this PR do?
Write a structured append-only audit record on every `data_diff` call so SOC 2 / HIPAA reviewers have forensic evidence of cross-warehouse data comparisons.

## Why
Flagged during the v0.6.0 release review (Chaos Gremlin persona — regulated enterprise perspective). SOC 2 CC7.2 requires "who compared which production tables, with which key columns, when, and what differences were found." Currently `data_diff` returns stats to the caller but nothing durable is persisted; `ctx.ask` captures permission grants but without source/target/key_columns.

## Proposed
- Emit `{ts, user, source, target, source_warehouse, target_warehouse, key_columns, extra_columns, rows_source, rows_target, differences, algorithm}` to a local append-only log file
- Log path: `~/.local/share/altimate-code/audit/data-diff.log` (unix) / equivalent on Windows
- File mode `0600`
- Document rotation policy in the data-parity guide

## Deferred from
v0.6.0 release review. Filed at tag time per no-follow-up-PRs release policy.

## Type of change
- [x] New feature

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。