AltimateAI / AltimateAI/altimate-code

feat: data_diff audit log

Offen
#730 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
811
Forks
134
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
50

Beschreibung

## 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.