AltimateAI / AltimateAI/altimate-code
feat: data_diff audit log
- Dominant language
- TypeScript
- Stars
- 811
- Forks
- 134
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 50
Description
## 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
Contributor guide
Assessment
This issue has not been assessed yet.